Unable to find SPI node in /dev directory

Hi support team,

I want to test SPI Interface on Colibri VF50 module(Iris carrier board). but there was I am unable to find /dev/spidevB.C node in /dev directory. even I have checked there was driver installed already.

so how to access spi interface from the user-space?

see the below information which may help you to debug the issue:

root@colibri-vf:~# find / -name *spi*

root@colibri-vf:/home# cat /proc/devices | grep spi
153 spi

The spidev node will not be available by default since it is no more supported in device trees, refer this discussion in ml for more info. Said that one could still add spidev node to the device tree. Note that this will lead to a loud warning about using ‘spidev’ from DT.


spidev0: spi@0 {
	compatible = "spidev";
	reg = <1>;
	spi-max-frequency = <10000000>;

I have changed device tree as per given solution and I got the /dev/spidev1.0 node, but there was other kernel modules failed to load in init section.

Is that mcp251x kernel module ?
Do you still have the mcp2515 can enabled in device tree?
To use dspi1_0 with spidev one need to disable mcp2515 can driver since by default we use dspi1_0 for exernal mcp251x CAN controller on evaluation board or use other instance, e.g. dspi1_1

dspi1 set as compatible = “spidev” in DT (vf-colibri-eval-v3.dtsi) and also added compatibility in driver/spi/spidev.c . so I got the node in /dev directory. but there was I got garbage values when I tried to read data from external flash memory which has interfaced via spi and sometimes also get proper values.

can you share helpful information regarding to my issue?

many thanks\

What is the external SPI flash chip you are using ?

I used M25P20-VMN6PB-SOIC8 Flash memory.

Unfortunately I’m not having M25P20 at my end to test. There is driver available for M25Pxx SPI based flash memory chips. Device tree binding example is provided in devicetree binding documentation. May be you could try that.

Do you say anything about this:
[ 23.349682] spi1.0 supply vdd not found, using dummy regulator
[ 23.452040] spi1.0 supply xceiver not found, using dummy regulator

Q. Why it is getting dummy regulator?
Q. Here, i got the spi1.0 node without any modification in DT.but it not showing in /dev directory?

Waiting for your ans on above question…

Many thanks\

Those kernel messages are from mcp251x CAN controller driver, the driver has two optional properties for providing the supply regulators to CAN chip, which in our case are not applicable, by default driver fall back with dummy regulators.
The ‘spi1.0’ in kernel message’s are wrt to mcp251x DT node not with spidev, by default in our device tree DSPI1_CS0 is used for interfacing MCP2515 CAN controller available on Colibri Evaluation Board. If to use DSPI1_CS0 with spidev one would disable the mcp251x node and append the spidev node.

@bhuvan.tx I have same problem(spidev not found) in colibri Imx7 with voila plus board. how to solve it ?

Please create a new post for your query.

@sanchayan.tx but it’s same query ?

@balakumaran, it sounds similar but environment is different and it will be nice to have a new post for better visibility.

I have same problem(spidev not found) in colibri Imx7 with voila plus board. how to solve it ?

By default spidev is disabled and MCP251x CAN driver is enabled, have a look at this. To enable spidev one will need to disable the CAN driver and enable the spidev.

Have you had a chance to open a new topic for this?