We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
I’ve built the Debian 10.9 image, and it boots with no issues. However, after ‘modprobe spidev’, I have no /dev/spi* devices. It did create /sys/class/spidev, but the directory is empty, as is /sys/class/spi-master and /sys/class/spi-slave (although I don’t care about SPI slave functionality).
I’ve decompiled the stm32mp157c-dk2.dtb device tree binary, and spi1 is present.
The goal is to have SPI on the RPi connector on physical pins 19, 21, 23, and 24 (standard RPi 40 pin mapping)
OK, what am I doing wrong? I’ve edited ./armv7-lpae-multiplatform/KERNEL/arch/arm/boot/dts/stm32mp157c-dk2.dts, but the ./armv7-lpae-multiplatform/build_kernel.sh script seems to be pulling the file from the repo and overwriting the changes. How am I supposed to integrate your test changes?
OK, rebuilt with no DMA changes. Eliminated the DMA error, but still no activity on SCK, MOSI, or NSS. Nothing in dmesg, no errors from the application (which checks all return values). Checked the datasheet, PF6…9 are the correct pins, AF5 is the correct alternate function, no solder jumpers that need to be installed or removed according to the schematic, exact same code runs on a Raspberry Pi 4 correctly. I am at a loss.
My fault. I expected /dev/spidev0.0 to be the SPI device on the RPi bus. When I ls'ed the /dev/ tree, I read spidev1.0 as spidev0.1 (lysdexia!), which I’ve seen present on several implementations, but never used. I think that’s what used when there’s a second NSS pin on that SPI master.
So, from a hardware perspective, this is now working. However, I disabled spi4 (first tried setting it’s status to disabled instead of ok, and then commenting out the spi4 block completely), but spi5 was still appearing as /dev/spidev1.0. I think the RPi connector should be spidev0.0 and spi4 on the Arduino CN13 connector should be spidev1.0.
ST has been wrong about lots of things before I imagine more people are going to run RPi Linux code on the board than the Arduino people would, and, unfortunately, a lot of RPi apps assume that /dev/spidev0.0 is what’s connected to the RPi connector. But anyway…
Not sure if I should tack this on here or open a new report, but i2c5 isn’t “connected” to the RPi or Arduino connectors. The fix (right or wrong) that worked for me was adding: