AnsweredAssumed Answered

How to enable spidev on i.MX6 using kernel 3.14.28?

Question asked by YaoLin Chang on Jul 7, 2015
Latest reply on Jul 8, 2015 by igorpadykov

Hi All,

      We run imx-test/mxc_spi_test/mxc_spi_test1.c to test spi device, but we can't find any spi device node in /dev/

We also can't find any "spidev" device name in device tree.

Our sample code of device tree as below:

Freescale default setting is connected to nor flash.

Can anyone tell me what is happen ? And how should I modify device tree?

================================

<imx6qdl.dtsi>

ecspi1: ecspi@02008000 {

                                        #address-cells = <1>;

                                        #size-cells = <0>;

                                        compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";

                                        reg = <0x02008000 0x4000>;

                                        interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;

                                        clocks = <&clks IMX6QDL_CLK_ECSPI1>,

                                                 <&clks IMX6QDL_CLK_ECSPI1>;

                                        clock-names = "ipg", "per";

                                        status = "disabled";

};

=================================

<imx6qdl-sabresd.dtsi >

&ecspi1 {

        fsl,spi-num-chipselects = <1>;

        cs-gpios = <&gpio4 9 0>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ecspi1>;

        status = "okay";

 

        flash: m25p80@0 {

                #address-cells = <1>;

                #size-cells = <1>;

                compatible = "st,m25p32";

                spi-max-frequency = <20000000>;

                reg = <0>;

        };

};

 

Thanks,

Best Regards,

Yao

Outcomes