Jump to content

device tree on upgraded kernel not creating spi devices.


Dan Walton76
Go to solution Solved by Dan Walton76,

Recommended Posts

I'm trying to upgrade my kernel. However on the new kernel the boot loader says 'Applying kernel provided DT overlay sun50i-h5-spi-spidev.dtbo'. But there are no spi devices.

 

If I run the old kernel, everything is there.

 

In a bit more detail...

 

1) Download linux source 5.16.10

2) Copy config from /boot/ directory

3) Make menuconfig

4) turn on real time  PREEMPT (something I want to experiment with)

5) build

6) build the modules

7) copy the kernel and modules to the sd card

8) link Image to the new version.

reboot

 

The device comes up and networking is working, but I have no /dev/spi

 

Is there something I'm doing wrong? Is there a way to debug?

Thanks

 

 

Edited by Dan Walton76
change of word
Link to comment
Share on other sites

I've just installed a RPI dvb hat (sony cxd2880 spi device) on a bpim2plus with kernel 5.10.60-sunxi #21.08.2 SMP Tue Sep 14 16:28:44 UTC 2021 armv7l.

 

/dev/spi is not populated but the cxd2880 driver can obviously find spi0 (thanks to a dtb found on armbian forum) because I can stream DVB-T ?!?

 

I suppose the driver don't need spi devices.

 

udev problem on debian bullseye ? (I am afraid to say I don't understand anything on dtb).

 

Kernel seems happy anyway :

 

ls -l /sys/bus/spi/devices/
total 0
lrwxrwxrwx 1 root root 0 Feb 22 12:32 spi0.0 -> ../../../devices/platform/soc/1c68000.spi/spi_master/spi0/spi0.0

Link to comment
Share on other sites

I am just discovering as yourself on this subject (and as I said above, perfectly happy with my armbian config which does not require /dev/spi* nodes)

 

Do you have module spidev loaded (lsmod | grep spi). If not try "modprobe spidev".

 

As far as I know, this is this module that should create device nodes to give userland access to spi devices. Kernel drivers don't need it.

 

It must be enabled by armbian-config for the bus you need for your device. (The dtb overlay is then added to /boot/armbianEnv.txt).

 

Anyway, I found complaints on RPI forum for the lack of /dev/spi interfaces and this may come for dtb for specific devices.

Link to comment
Share on other sites

lsmod does have this:

spidev                 24576  0


 

My armbianEnv.txt contains this:

verbosity=7
bootlogo=false
console=both
disp_mode=1920x1080p60
overlay_prefix=sun50i-h5
param_spidev_spi_bus=1
overlays=analog-codec spi-spidev
rootdev=UUID=558c413f-84e6-4d3e-b9df-b683d55ad429
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines