Raspberry Pi Zero W - buggy DT: spidev listed directly in DT

Hi All,

I am using Raspberry Pi Zero W with OpenWrt (openwrt-19.07.3-brcm2708-bcm2708-rpi-ext4-factory.img). The installation and initial configuration went fine, though I have never used OpenWrt before. Everything looked great.

After I have added the SPI related packages:
kmod-spi-bcm2835 - 4.14.180-1
kmod-spi-dev - 4.14.180-1
spidev-test - 4.14.180-4.14.180,

I can run:

root@RPIZeroW:~# spidev_test -D /dev/spidev0.0
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)

root@RPIZeroW:~# spidev_test -D /dev/spidev0.0 -s 25000000
spi mode: 0x0
bits per word: 8
max speed: 25000000 Hz (25000 KHz)

I noticed, immediately after adding the kmod-spi-bcm2835 warnings started to appear:

[ 8.094503] ------------[ cut here ]------------
[ 8.105169] WARNING: CPU: 0 PID: 139 at drivers/spi/spidev.c:734 0xbf173368 [spidev@bf173000+0x3000]
[ 8.120472] /soc/spi@7e204000/spidev@0: buggy DT: spidev listed directly in DT
[ 8.133866] Modules linked in: spidev(+) slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables hid_generic crc_ccitt compat brcmutil spi_bcm2835 snd_bcm2835 hid evdev i2c_bcm2835 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 snd_rawmidi snd_seq_device snd_pcm_oss snd_pcm_dmaengine snd_pcm snd_timer snd_mixer_oss snd_hwdep snd_compress snd soundcore nls_utf8 vfat fat nls_iso8859_1 nls_cp437
[ 8.223976] CPU: 0 PID: 139 Comm: kmodloader Not tainted 4.14.180 #0
[ 8.237623] Hardware name: BCM2835
[ 8.248205] Function entered at [] from []
[ 8.261239] Function entered at [] from []
[ 8.274271] Function entered at [] from []
[ 8.287323] Function entered at [] from []
[ 8.300353] Function entered at [] from []
[ 8.313303] Function entered at [] from []
[ 8.326084] Function entered at [] from []
[ 8.338768] Function entered at [] from []
[ 8.351448] Function entered at [] from []
[ 8.364085] Function entered at [] from []
[ 8.376562] Function entered at [] from []
[ 8.388984] Function entered at [] from []
[ 8.401376] Function entered at [] from []
[ 8.413673] Function entered at [] from []
[ 8.425860] Function entered at [] from []
[ 8.438008] Function entered at [] from []
[ 8.450130] ---[ end trace 97046d4369b04c82 ]---
[ 8.461438] ------------[ cut here ]------------
[ 8.472414] WARNING: CPU: 0 PID: 139 at drivers/spi/spidev.c:734 0xbf173368 [spidev@bf173000+0x3000]
[ 8.488079] /soc/spi@7e204000/spidev@1: buggy DT: spidev listed directly in DT
[ 8.501813] Modules linked in: spidev(+) slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables hid_generic crc_ccitt compat brcmutil spi_bcm2835 snd_bcm2835 hid evdev i2c_bcm2835 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 snd_rawmidi snd_seq_device snd_pcm_oss snd_pcm_dmaengine snd_pcm snd_timer snd_mixer_oss snd_hwdep snd_compress snd soundcore nls_utf8 vfat fat nls_iso8859_1 nls_cp437
[ 8.593283] CPU: 0 PID: 139 Comm: kmodloader Tainted: G W 4.14.180 #0
[ 8.608298] Hardware name: BCM2835
[ 8.619004] Function entered at [] from []
[ 8.632216] Function entered at [] from []
[ 8.645243] Function entered at [] from []
[ 8.658212] Function entered at [] from []
[ 8.671159] Function entered at [] from []
[ 8.684127] Function entered at [] from []
[ 8.697133] Function entered at [] from []
[ 8.710067] Function entered at [] from []
[ 8.722941] Function entered at [] from []
[ 8.735812] Function entered at [] from []
[ 8.748681] Function entered at [] from []
[ 8.761538] Function entered at [] from []
[ 8.774313] Function entered at [] from []
[ 8.787123] Function entered at [] from []
[ 8.799837] Function entered at [] from []
[ 8.812463] Function entered at [] from []
[ 8.824957] ---[ end trace 97046d4369b04c83 ]---

I searched the net and found many links, though I could not find anything that exactly matched my case (RPi Zero W + OpenWrt). My best guess is that, it has to do something with the "spidev_dt_ids".

Is the above warning something to be really concerned about?
Please let me know if I should be using some other kmod instead of "kmod-spi-bcm2835" with RPi Zero W.

I am really looking to use an SPI (ILI9488 based) LCD Display unit.

Appreciate your advise.

Thanks a lot,
Thomas.

You should add your device into compatible in https://elixir.bootlin.com/linux/latest/source/drivers/spi/spidev.c#L671 and then use it with that compatible.

It's just warning, telling you, that you're doing it wrong. It doesn't harm.

1 Like