uCLinux Maxim14830 Driver Not Probing

340 views Asked by At

I am trying to get a Maxim14830 evaluation board to work with my Emcraft STM32F4 SOM. My SOM is running the Emcraft uClinux kernel 2.0.0 (Forked from Kernel 4.4) on github here (I have plans to attempt this with Kernel version 4.5 as well).

The driver is not registering the 4 ttyMAX[n] devices. Upon further inspection, none of the max310x.c driver code is actually being executed based on the printk's I've added. I would at least expect the probe function to run during boot.

The source code on github for the maxim14830 (protocol?) driver is here max310x.c

The source code on github for the spi (controller?) driver is here spi-stm32.c

I have been able to add an spidev device fine, so my belief is that this is a problem unique to the maxim14830.

I see a spi device here:

/sys/devices/platform/soc/40003800.spi/spi_master/spi1/spi1.0 # cat modalias 
spi:maxim14830

I see the max310x driver here:

/sys/bus/spi/drivers/max310x

I see the following devicetree entries:

/sys/firmware/devicetree/base/soc/spi@40003800/max14830@0 # cat compatible 
maxim,maxim14830
/sys/firmware/devicetree/base/clocks/osc_max14830

My devicetree looks like so:

&spi_2 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_spi_2>;
    cs-gpios = <&gpiob 9 OUT>;
    timeouts = <3>;

    max14830: max14830@0 {
        status = "okay";
        compatible="maxim,maxim14830";
        reg = <0>;
        gpio-controller;
        #gpio-cells = <2>;
        spi-max-frequency = <20000000>;
        interrupt-parent = <&exti>;
        interrupts = <10>;
        clocks = <&spi_uart_clk>;
        clock-names = "xtal";
    };

    spidev: spidev@2 {
            status = "disabled";
            compatible = "linux,spidev";
            spi-max-frequency = <20000000>;
            reg = <0>;
    };
};

I'm able to compile my device tree blob, and uboot the corresponding linux image fine. From my printk's, stm32_spi_probe is being called from the "Controller Driver," but to my knowledge no max310x.c driver code is being called after..

Where should I go to debug this further? This is my first embedded linux project and I could use some pointers..

0

There are 0 answers