WP7702 two devices on SPI?

Hello,

We want to connect two devices on the SPI bus of the WP7702, but documentation says there is only one chip select pin available SPI1_MRDY.
However Qualcomm docs and linux spi driver say that SPI supports four chip selects.
Even more - Linux device tree documentation states that using “cs-gpios” should be possible to set virtually any gpio as an SPI chip select.

So the question is - how to enable additional SPI1 chip select (preferably hw or at least gpio), so we can connect another SPI device? Which pad of the module could be used for this and which GPIO is it as per the SoC/Device tree

Since we have no the Qualcomm SoC PDF, we do not know which SoC pin supports this functionality. We also have no schematics of the WP7700 module so also do not know which pins of the SoC that function as SPI1 CSs are routed to pads of the module.

I already wasted 3 days trying lots of DTS configuration without success.

OK, I made it work!
I added this to the SPI configuration in the device tree:
num-cs = <2>;
cs-gpios = <0>, <&tlmm_pinmux 16 0>;

But before using the SPI I had to set the GPIO as output in the sysfs:
echo 7 > export
echo out > direction

I believe this can also be avoided, if device tree is further setup properly.

Hi @tihomir.borovski ,
I’m also trying to add a second and third chip select.
Maybe you can share the file?

Thanks,
Simon