Nyx_ Posted November 28, 2020 Share Posted November 28, 2020 Armbianmonitor: http://ix.io/2FPS Hello. Good day. I'm trying to use the SPI on a OragenPI One Plus (Allwinner H6), and, although I have enable it via the /boot/armbianEnv.txt configuration, communication is not working. Here's the armbianEnv.txt armbian@orangepioneplus:~$ cat /boot/armbianEnv.txt verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun50i-h6 rootdev=UUID=19c1886e-0b74-45b8-b9f5-5fbd4bdeb5c2 rootfstype=ext4 overlays=spi-spidev param_spidev_spi_bus=0 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u And here's the SPI device listed under /dev armbian@orangepioneplus:~$ ls -la /dev/sp* crw------- 1 root root 153, 0 nov 28 15:06 /dev/spidev0.0 To test it, I compiled the spidev_test.c (https://github.com/rm-hull/spidev-test) and I jumped the MISO and MOSI pins on the board. This is the response I'm getting when running the spidev_test: armbian@orangepioneplus:~/spidev-test$ sudo ./spidev_test -v spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 KHz) TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....�..................�. RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ I tested it with both a Downloaded image from Armbian website as well as one that I built. Both behave the same way. To make sure this isn't a Hardware issue, I did the same test the a image from the OrangePi website. It worked fine. I'm running kernel 5.9.11. Searching on dmesg from SPI doesn't bring much. Here's it in any case: armbian@orangepioneplus:~/spidev-test$ dmesg | grep spi [ 2.693934] spidev spi0.0: probing from DT Any ideas where I can look next to solve the problem? I appreciate any suggestion/advice. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
Solution martinayotte Posted November 30, 2020 Solution Share Posted November 30, 2020 On 11/28/2020 at 3:14 PM, Nyx_ said: Any ideas where I can look next to solve the problem? I appreciate any suggestion/advice. After hours of investigation, and after having figured out that SPI for H6 wasn't working since 5.7.x, I've found why : missing SPI pins in DT ... https://github.com/armbian/build/commit/e3ade9e9f4292c6b257ad10f676edc4055106d2a 3 Quote Link to comment Share on other sites More sharing options...
Nyx_ Posted December 1, 2020 Author Share Posted December 1, 2020 19 hours ago, martinayotte said: After hours of investigation, and after having figured out that SPI for H6 wasn't working since 5.7.x, I've found why : missing SPI pins in DT ... https://github.com/armbian/build/commit/e3ade9e9f4292c6b257ad10f676edc4055106d2a Wow Martin! Thanks for the investigation and solution. I'll build a new version incorporating those changes and It will probably work. I'll reply the results here. Thank you very much. 2 Quote Link to comment Share on other sites More sharing options...
Nyx_ Posted December 8, 2020 Author Share Posted December 8, 2020 Yep. Just confirming that it's working, building from sources. armbian@orangepioneplus:~/spidev-test$ sudo ./spidev_test -v [sudo] password for armbian: spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 KHz) TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....�..................�. RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....�..................�. 0 Quote Link to comment Share on other sites More sharing options...
bbtoxic Posted July 16, 2021 Share Posted July 16, 2021 I see the same behavior on OrangePi 3 and I'm wondering if there might be a similar fix needed for this board. @martinayotte maybe? /boot/armbianEnv.txt verbosity=1 console=both overlay_prefix=sun50i-h6 overlays=spi-spidev1 param_spidev_spi_bus=1 rootdev=UUID=b9dd15a3-53c5-44e1-96ed-816ea6eb4967 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u Working with this kernel: uname -a Linux magicsky 5.4.88-sunxi64 #21.02.3 SMP Mon Mar 8 08:07:33 UTC 2021 aarch64 GNU/Linux But not with latest buster 5.10. 0 Quote Link to comment Share on other sites More sharing options...
Felix Posted March 6, 2022 Share Posted March 6, 2022 Hi is this only affecting Orange Pi One Plus? I have a SPI working image (Kernel 5.7.15)for Orange Pi Lite 2 (H6) but when I change the board to Orange Pi One Plus through armbianEnv.txt, the SPI /dev/spi0.0 is there but not communicating. I’m confident it is not hardware related. Thanks. 0 Quote Link to comment 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.