2020-09-16 03:11 AM
Hi everyone,
I want to make a LoRa gateway using the STM32MP157C-DK2 and ICC880A-SPI boards. For that, I have to implement SPI communication between the two boards. I already did the hardware connections, but I am not able to enable SPI on the STM32MP157C-DK2.
I want to set up SPI5 on the STM32 board (M4 context) and I use CubeMX to get the device tree (DT) files that I need. Then I modify the stm32mp157c-dk2.dts file that is already present in the Distribution package with the files given by CubeMX, before cross-compiling the Linux kernel and updating the kernel image on the board.
I have attached the stm32mp157c-dk2.dts file to this post, with all the modifications I made.
I also added the line DECPROT(STM32MP1_ETZPC_SPI5_ID, DECPROT_NS_RW, DECPROT_UNLOCK) in &etzpc section within TFA.
When I reboot the STM32MP157C-DK2 board, I cannot see anything showing that SPI was correctly implemented (I2C is working and the red LED is on, so the DT is well updated). More, the folder /sys/class/spidev is empty, no device is present.
My guess is that I am doing something wrong (it is my first time working on a device tree), but I cannot figure out what the problem is. If you have any hints or ideas that could help me, they will be very appreciated.
Have a nice day!
2020-11-26 07:36 AM
Hi @LewisN ,
I'am not sure to understand if you want to use SPI5 from M4 firmware, or from Linux running on A7 ?
Your DT looks good if you want that the M4 controls SPI5 :
BR,
Christophe