Jump to content

Enable SPI with CS0 and CS1


Christos

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines