Christos Posted November 12, 2017 Posted November 12, 2017 Hi, How can I enable both the CS0 and CS1 on the SPI on OPiPC mainline? Need to have both spidev0.0 and spidev0.1 drivers concurently available, yet only one of them is enabled and visible. My armbianEnv.txt verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 rootdev=UUID=72c69678-cb49-4c08-b5d3-396060e8ff18 rootfstype=ext4 overlays=spi-add-cs1 spi-spidev param_spidev_spi_bus=0 param_spidev_spi_cs=1 param_spidev_spi_cs=0 param_spidev_max_freq=10000000 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u If the latest param is param_spidev_spi_cs=1 then I get only spidev0.1, if the latest param is param_spidev_spi_cs=0 then I get spidev0.0, but never both of them. Is there any way that I can have both spidev0.0 and spidev0.1 available ? Christos
zador.blood.stained Posted November 12, 2017 Posted November 12, 2017 32 minutes ago, Christos said: Is there any way that I can have both spidev0.0 and spidev0.1 available ? Yes, by adding a custom overlay: https://github.com/armbian/sunxi-DT-overlays/blob/master/examples/spi-double-spidev.dts You will still need to use spidev-add-cs1 overlay but remove spi-spidev one because the custom one will be used instead of it.
Christos Posted November 12, 2017 Author Posted November 12, 2017 @zador.blood.stained Thank you, nice to see that. Yet, when I tried to build it, got ~$ sudo armbian-add-overlay spi-double-spidev.dts Kernel headers are not installed properly. Please install the kernel headers package The build is a fresh one, mainline next, Ubuntu.
Christos Posted November 12, 2017 Author Posted November 12, 2017 @zador.blood.stained Ok, Manually installed the build-produced headers .deb and re-tried to armbian-add-ovelay, it worked ok now and see the two separate devices. Expected that headers are installed by default and got a bit confused. Thank you.
Recommended Posts