Add spidev

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add spidev

1,777 Views
eishishibusawa
Contributor III

Dear Sir

 

Cuatomer is using MCIMX8M-EVK and BSP L4.9.88_2.0.0 to evaluate.

Customer want to add "spidev" to the device tree.

 

Original device tree

 

ecspi@30820000 {

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

        reg = <0x0 0x30820000 0x0 0x10000>;

        interrupts = <0x0 0x1f 0x4>;

        clocks = <0x4 0x18d 0x4 0x18d>;

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

        interrupt-parent = <0x1>;

        status = "disabled";

};

 

 

(Customer) Modified device tree

 

ecspi@30820000 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_spi1>;

        status = "okay";

        cs-gpios = <&gpio5 9 1>, <&gpio3 2 1>;

        #address-cells = <1>;

        #size-cells = <0>;

 

        spidev: spidev@0 {

                 compatible = "spidev";

                 status = "okay";

                 spi-max-frequency = <5000000>;

                 reg = <0>;

        };

};

 

 

The "spidev @ 0" was confirmed under "/sys/firmware/devicetree/base/ecspi@30820000/".

On the other hand, the "spidev" cannot be registered in "/dev/".

 pastedImage_1.png

 

Customer set up the following in menuconfig and built the kernel.

Device Drivers  --->

  [*] SPI support  --->

   <*>   User mode SPI device driver support

 

Q.

How can we register "spidev" under "/div/"?

 

Best Regards,

Eishi SHIBUSAWA

Labels (2)
0 Kudos
2 Replies

1,226 Views
jimmychan
NXP TechSupport
NXP TechSupport

First, you don't need to modify the fsl-imx8mq.dtsi.

Then add the &ecspi1 in your dts file.

You can take the "&ecspi1" in the following dts file for reference.

Example : http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/boot/dts/imx6ul-14x14-ddr3-arm...

0 Kudos

1,226 Views
eishishibusawa
Contributor III

Dear NXP support member

Please reply this question.

Best Regards,
Eishi SHIBUSAWA

0 Kudos