Failed to enable "/dev/spidev0.0" to access spi flash from the userspace

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

Failed to enable "/dev/spidev0.0" to access spi flash from the userspace

1,959 Views
DeepakHM
Contributor I

Hi ,

I am trying to create spidev entry in /dev/ by adding the device tree node under qspi node but the device is not showing up in /dev/ can you please help me to get it.

The below is the device tree node I added. 

&qspi {

        status = "okay";

        mt25qu512a0: flash@0 {

                compatible = "jedec,spi-nor";

                #address-cells = <1>;

                #size-cells = <1>;

                spi-max-frequency = <50000000>;

                spi-rx-bus-width = <4>;

                spi-tx-bus-width = <1>;

                reg = <0>;

                partition@0 {

                        label = "u-boot-spl";

                        reg = <0x0 0x4000000>;

                        read-only;

                };

                partition@1 {

                        label = "test";

                        reg = <0x400 0000 0x100000>;

                };

        };

    spidev@0{

        compatible = "spidev";

        reg = <0>;

        spi-max-frequency = <50000000>;

    };

};

 

The below are the dmesg logs.

 

root@localhost:~# dmesg | grep "spi"

[    2.418536] spi-nor spi0.0: mt25qu512a (65536 Kbytes)

[    2.423615] 1550000.spi-0: error parsing ofpart partition /soc/spi@1550000/flash@0/partition@1 (/soc/spi@1550000/flash@0)

[    2.437915] fsl-quadspi 1550000.spi: chipselect 0 already in use

[    2.443933] spi_master spi0: spi_device register error /soc/spi@1550000/spidev@0

[    2.451339] spi_master spi0: Failed to create SPI device for /soc/spi@1550000/spidev@0

root@localhost:~#

Thanks

Deepak H M

0 Kudos
Reply
0 Replies