I am running Debian on a Variscite i.MX8 mini SoM. I have verified with a logic analyzer that all the SPI signals are working except CS. No matter what I do, CS is always low. I have tried writing to SPI via command line:
$echo "test" > /dev/spidev0.2
I have also tried writing to it in my code (C++) using ioctl(), but CS never changes state. I'm beginning to think I'm probing the wrong pin. Linux tells me the SPI device is spidev0.2, which is supposed to be bus zero CS 2. The schematics say CS is on pin ECSPI1_SS0/GPIO5_IO9. I'm not sure how to verify I have the correct CS pin.
Can someone tell me how to verify which pin I am using for SPI CS, or how to map the correct pin?
Not sure the design and dts of Variscite i.MX8 mini SoM, you can ask Variscite about this issue.