This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: AM6442: Spidev how to enable

Part Number: AM6442

Hello 

I try to enable spidev device on AM6442-SK. I read related topics

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/947437/faq-ccs-tda4vm-how-to-use-spi-spi_dev-on-tda4-j721e

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1063011/tda4vm-can-t-enable-spidev-on-linux/3944397?tisearch=e2e-sitesearch&keymatch=spidev#3944397

but have not find solution yet.

I build Linux using Yocto. For now I'm sure that driver is loaded and function spidev_init from spidev module is called. It seems that probe function isn't called. But why?

I also tried to use the compatible property of both names: "spidev" and "linux,spidev" but without success.

Bellow are my settings:

Devicetree Overlay:

/dts-v1/;
/plugin/;

 #include "dt-bindings/pinctrl/k3.h"
 #include "dt-bindings/gpio/gpio.h"
/ {

        compatible = "ti,am642-sk", "ti,am642";

        fragment@0 {
                target = <&main_pmx0>;
                __overlay__ {
                        main_spi1_pins_default: main-spi1-pins-default {
                                pinctrl-single,pins = <
                                        AM64X_IOPAD(0x0224, PIN_INPUT, 0) /* (C14) SPI1_CLK */
                                        AM64X_IOPAD(0x021C, PIN_OUTPUT, 0) /* (B14) SPI1_CS0 */
                                        AM64X_IOPAD(0x0220, PIN_OUTPUT, 0) /* (D14) SPI1_CS1 */
                                        AM64X_IOPAD(0x0228, PIN_OUTPUT_PULLDOWN, 0) /* (B15) SPI1_D0 */
                                        AM64X_IOPAD(0x022C, PIN_INPUT_PULLDOWN, 0) /* (A15) SPI1_D1 */
                                >;
                        };
                };

        };

        fragment@2 {
                target = <&main_spi1>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";
                        pinctrl-names = "default";
                        pinctrl-0 = <&main_spi1_pins_default>;
                        ti,spi-num-cs = <2>;

                        spidev1: spidev@1{
                                status = "okey";
                                compatible = "spidev";
                                reg = <1>;      /* CE0 */
                                #address-cells = <1>;
                                #size-cells = <0>;
                                spi-max-frequency = <10000>;
                        };
                };
        };

};

CONFIG_SPI=y
CONFIG_SPI_MASTER=y

CONFIG_SPI_OMAP24XX=y

CONFIG_SPI_SPIDEV=y