How do I use a 2nd CS Pin with SPI2

Started by gerrikoio, April 14, 2023, 12:11:38 AM

Previous topic - Next topic

gerrikoio

It is not clear from the STMP1 schematic files which is the the 2nd predefined CS pin for SPI and whether it is broken out to one of the GPIO pin headers.

Looking at the DTS file on Github provides a little guidance as it's saying that only 1 CS is provided, which is default enabled high: https://github.com/OLIMEX/olinuxino-overlays/blob/master/stm32mp1/stm32mp1-spi2.dts

It is based on this line: cs-gpios = <&gpioi 0 1>;

Do I therefore assume that I need to define my own 2nd CS pin.

If so, how do I bind the 2nd CS pin to the SPI driver etc.