Not able to create /dev/spidev0.0

839 views
Skip to first unread message

Sivanantham M

unread,
Feb 14, 2017, 12:41:40 AM2/14/17
to inside...@googlegroups.com
Hi All ,


          i have insmod the spidev.ko, but not able to see the /dev/spidev0.0. how i can get the spidev node ??

Thanks
Sivanantham M

Praveen Singh

unread,
Feb 14, 2017, 12:46:16 AM2/14/17
to inside...@googlegroups.com
you need to do mknode /dev/spidev0.0

--
You received this message because you are subscribed to the Google Groups "SysPlay's Inside Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inside_linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sivanantham M

unread,
Feb 14, 2017, 12:46:32 AM2/14/17
to inside...@googlegroups.com
In procfs i can see the module, but devnode is not created

root@OpenWrt:/# cat /proc/modules  | grep spid
spidev 4656 0 - Live 0x861fe000
root@OpenWrt:/#

Sivanantham M

unread,
Feb 14, 2017, 12:50:33 AM2/14/17
to inside...@googlegroups.com
Hi Praveen,

            But I have enabled the spi in raspberry pi , i can able to see /dev/spidev0.0 without doing mknode. How i can do that automatically ??

Sivanantham M

unread,
Feb 14, 2017, 12:54:27 AM2/14/17
to inside...@googlegroups.com
Is there any way to mention which pins (CLK,MISO,MOSI,CS )  the /dev/spidev should use for data communication ???

Pradeep Tewani

unread,
Feb 14, 2017, 1:26:48 AM2/14/17
to inside...@googlegroups.com

It seems you are missing the corresponding changes in the DTB. Just check if the SPI1 is enabled and under that you have a spidev node?


Regards,

Pradeep



From: inside...@googlegroups.com <inside...@googlegroups.com> on behalf of Sivanantham M <siva.f...@gmail.com>
Sent: Tuesday, February 14, 2017 11:24 AM
To: inside...@googlegroups.com
Subject: Re: Not able to create /dev/spidev0.0
 
--
You received this message because you are subscribed to the Google Groups "SysPlay's Inside Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inside_linux...@googlegroups.com.

Thaju

unread,
Feb 14, 2017, 1:33:31 AM2/14/17
to inside...@googlegroups.com
Check your DTB. Add spi entry something like below. Please change Chip Select/pinmuxing as per your SoC

This entry is for iMX6 prosessor.

&ecspi1 {
    fsl,spi-num-chipselects = <1>;
    cs-gpios =  <&gpio4 10 0>;     /* Chip Select - CS */
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_ecspi1>;
    status = "okay";

    spi_header: spidev1@0 {       
        compatible = "rohm,dh2228fv";
        spi-max-frequency = <20000000>;
        reg = <0>; /* CS0 */
    };
};

 
pinctrl_ecspi1: ecspi1grp {
            fsl,pins = <
                MX6QDL_PAD_KEY_COL1__ECSPI1_MISO    0x100b1
                MX6QDL_PAD_KEY_ROW0__ECSPI1_MOSI    0x100b1
                MX6QDL_PAD_KEY_COL0__ECSPI1_SCLK    0x100b1     
                MX6QDL_PAD_KEY_COL2__GPIO4_IO10     0x1b0b0 /* SPI Chip Select */
        };

To unsubscribe from this group and stop receiving emails from it, send an email to inside_linux+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "SysPlay's Inside Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inside_linux+unsubscribe@googlegroups.com.

Sivanantham M

unread,
Feb 15, 2017, 1:14:54 AM2/15/17
to inside...@googlegroups.com
Thanks  ppl..

                i have added entry for spidev for device tree.

                 spidev@1 {
               compatible = "linux,spidev";
               spi-max-frequency = <10000000>;
               reg = <1>; 
           }; 

         

           Dev node is created .

           root@OpenWrt:/# ls /dev/spidev32766.1
           /dev/spidev32766.1
           root@OpenWrt:/#

Reply all
Reply to author
Forward
0 new messages