On STM32MP157C-DK2 board, how to config and enable SPI5 under u-boot and linux runtime?
With STM32MP157C-DK2, I like to exercise SPI5 hardware, to use this interface to do talk to FPGA and DSP chips. And I need to use SPI5 in both U-boot and Linux runtime, here I got some issues to enable the SPI5 device.
1, Within U-boot.
How to enable SPI5 device and config pin mux.
I already recompiled u-boot source code and add in command of sspi, but when issue sspi under uboot terminal, it return failure, apparently the default SPI bus not even configured and enabled at all.
ubi - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume
ums - Use the UMS [USB Mass Storage]
usb - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
TRIFECTA> sspi
Invalid bus 0 (err=-19)
TRIFECTA> help sspi
sspi - SPI utility command
Usage:
sspi [<bus>:]<cs>[.<mode>] <bit_len> <dout> - Send and receive bits
<bus> - Identifies the SPI bus
<cs> - Identifies the chip select
<mode> - Identifies the SPI mode to use
<bit_len> - Number of bits to send (base 10)
<dout> - Hexadecimal string that gets sent
TRIFECTA>
2, Within Linux runtime.
I looked at device under /dev/ directory, there is no device mapped as “spidev�? or anything associated with “spi�?,
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 2.6-openstlinux-4.19-thud-mp1-19-02-20 stm32mp1 ttySTM0
stm32mp1 login: root (automatic login)
root@stm32mp1:~#
root@stm32mp1:~# ls -la /dev/spi*
ls: cannot access '/dev/spi*': No such file or directory
root@stm32mp1:~# ls -la /dev/*spi*
ls: cannot access '/dev/*spi*': No such file or directory
root@stm32mp1:~#
I reverted device tree binary .dtb file to string .dts file, and looks like SPI5 has been declared with status of “disabled�?, what’s the procedure to config and use SPI5 in linux side, I already succeed on using SPI4 at M4 side, but I guess here by default SPI5 is reserved for M4 core also, is there a way to enable SPI5 dynamically in runtime on linux side? Or I have to modify .dts file? What I need to do, please specify.
spi@44009000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "st,stm32h7-spi";
reg = <0x44009000 0x400>;
interrupts = <0x0 0x55 0x4>;
clocks = <0x5 0x86>;
resets = <0x5 0x4c4a>;
dmas = <0x7 0x55 0x400 0x1 0x7 0x56 0x400 0x1>;
dma-names = "rx", "tx";
power-domains = <0x12>;
status = "disabled";
pinctrl-names = "default", "sleep";
pinctrl-0 = <0x3c>;
pinctrl-1 = <0x3d>;
};
Yours: Hai
