Thanks @valter.tx . I already used libgpiod to toggle a pin and got it working. I also was aware that libsoc was deprecated from here, but I wanted to give it a try and use it to have comms over SPI. I thought it would be easier if there was a lib available for it. Anyway, I will discard it.
What would the recommended way to configure SPI in Torizon? Would it be by accessing directly to “/dev/spidev0.0”?
For SPI access in Torizon while we don’t have any Torizon specific documentation on this, it should be more or less the same as described here: SPI (Linux) | Toradex Developer Center
So in short, yes you are correct basically direct spidev access. As a side note you may need to run your container as privileged or as root user to have the right permissions for access. As unlike GPIO we haven’t created any special user group to control SPI peripherals.