xkcd 0 Posted January 22 Share Posted January 22 Hi I'm trying to get the SPI ports to work in a RockPi 4B board. I've done the following: Installed the Armbian_20.11.6_Rockpi-4b_focal_legacy_4.4.213.img.xz image Edited armbianEnv.txt overlays=spi-spidev param_spidev_spi_bus=0 There is a entry at: /sys/class/spidev/spidev0.0, but nothing at /dev/spidev/ Next, I built libmraa, which fails to run any examples with SPI, as it can initialize any SPI devices. What am I missing, Hope you can help me 0 Quote Link to post Share on other sites More sharing options...
martinayotte 678 Posted January 22 Share Posted January 22 4 hours ago, xkcd said: but nothing at /dev/spidev/ It won't appear as subfolder, but as direct node /dev/spidev0.0 ... Also, check with "dmesg | grep spi" ... 0 Quote Link to post Share on other sites More sharing options...
xkcd 0 Posted January 25 Author Share Posted January 25 (edited) On 1/22/2021 at 5:06 PM, martinayotte said: It won't appear as subfolder, but as direct node /dev/spidev0.0 ... Also, check with "dmesg | grep spi" ... Hi, thanks for the swift answer, wasn't expecting that. There are no nodes named /dev/spidev0.0 (or similar). I get the following from dmesg|grep spi (slightly cropped) [...] rockchip-spi ff1c0000.spi: no high_speed pinctrl state [...] ffffffc0f7f737f8: buggy DT: spidev listed directly in DT [...] WARNING: at drivers/spi/spidev.c:722 /skipping some lines/ [...] rockchip-pinctrl pinctrl: pin gpio3-7 already requested by ff1c0000.spi; cannot claim for fe30000.ethernet I should say that the device is only connected to wifi and not ethernet. Hope you can push in the right direction. Edited January 25 by xkcd Add info on /dev/spidev0.0 0 Quote Link to post Share on other sites More sharing options...
piter75 122 Posted January 25 Share Posted January 25 On 1/22/2021 at 12:56 PM, xkcd said: param_spidev_spi_bus=0 Are you sure you are actually using SPI 0? It's not routed out to GPIO pins and its pins are indeed used by ethernet interface. Shouldn't you set bus 2 or 1 according to which GPIO pins you decided to use? 0 Quote Link to post Share on other sites More sharing options...
xkcd 0 Posted January 26 Author Share Posted January 26 On 1/25/2021 at 10:02 AM, piter75 said: Are you sure you are actually using SPI 0? It's not routed out to GPIO pins and its pins are indeed used by ethernet interface. Shouldn't you set bus 2 or 1 according to which GPIO pins you decided to use? I'm not sure of anything. That's is why I asked here. I can't understand what I'm doing wrong or are supposed to do. I tried to use SPI bus 1 as suggested here: but that leads to a kernel panic when I reboot (how does one get out of these, without writing a new image). 0 Quote Link to post Share on other sites More sharing options...
denni_isl 3 Posted January 27 Share Posted January 27 Pin 19, 21, 23, 24 are laid out directly to the pins of SPI device on board. spi bus 1 (Function1), although I have never tried this. 0 Quote Link to post Share on other sites More sharing options...
xkcd 0 Posted January 29 Author Share Posted January 29 Thanks for the reply. I'm not even at a state where can get one single SPI device to work. Either nothing shows up under /dev or kernel panic. Is there some other image that is better to use? 0 Quote Link to post Share on other sites More sharing options...
Recommended Posts
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.