cancel
Showing results for 
Search instead for 
Did you mean: 

spi3 can't be used in stm32mp257f-ev1

mteaching
Associate III

I flash the image from FlashLayout_sdcard_stm32mp257f-ev1-ca35tdcid-ostl-m33-examples-optee.tsv

 

pi@inspiron:~/yocto/build-openstlinuxweston-stm32mp2/tmp-glibc/deploy/images/stm32mp2$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp257f-ev1-ca35tdcid-ostl-m33-examples-optee.tsv 

 

 

I copy stm32mp257f-ev1-ca35tdcid-ostl-m33-examples.dts from the following directory.

 

pi@inspiron:~/yocto/build-openstlinuxweston-stm32mp2/tmp-glibc/work-shared/stm32mp2/external-dt/linux$ ls
Makefile						stm32mp257f-dk-ca35tdcid-ostl-resmem.dtsi
stm32mp135f-dk-rt.dts					stm32mp257f-ev1-ca35tdcid-ostl.dts
stm32mp157f-dk2-rt.dts					stm32mp257f-ev1-ca35tdcid-ostl-m33-examples.dts
stm32mp157f-ev1-rt.dts					stm32mp257f-ev1-ca35tdcid-ostl-m33-examples-resmem.dtsi
stm32mp257f-dk-ca35tdcid-ostl.dts			stm32mp257f-ev1-ca35tdcid-ostl-resmem.dtsi
stm32mp257f-dk-ca35tdcid-ostl-m33-examples.dts		stm32mp257f-ev1-rt.dts
stm32mp257f-dk-ca35tdcid-ostl-m33-examples-resmem.dtsi

 

 

I carefully checked the dts and found the spi3 was not enabled.

mteaching_0-1727181955822.png

 

But after I enabled the spi3(line 754), the spi bus can't be probed.

 

root@stm32mp2:~# dmesg | grep spi
[    0.274005] stm32-sys-bus 42080000.rifsc: spi@400c0000: Peripheral will not be probed

 

So how to enable spi3 in stm32mp257f-ev1?

 

even I didn't enable the spi3, the SPI3_SCLK(PB7)/SPI3_MOSI(PB8)/SPI3_MISO(PB10) has been already occupied.

but I in deed can't found which one has used the pins.

root@stm32mp2:~# gpioinfo -c 1
gpiochip1 - 16 lines:
	line   0:	"PB0"           	input
	line   1:	"PB1"           	input consumer="kernel"
	line   2:	"PB2"           	input consumer="kernel"
	line   3:	"PB3"           	input
	line   4:	"PB4"           	input consumer="kernel"
	line   5:	"PB5"           	input consumer="kernel"
	line   6:	"PB6"           	input consumer="kernel"
	line   7:	"PB7"           	input consumer="kernel"
	line   8:	"PB8"           	input consumer="kernel"
	line   9:	"PB9"           	input
	line  10:	"PB10"          	input consumer="kernel"
	line  11:	"PB11"          	input consumer="kernel"
	line  12:	"PB12"          	input
	line  13:	"PB13"          	input
	line  14:	"PB14"          	input
	line  15:	"PB15"          	input

 

1 REPLY 1
ArnaudTiberghien
ST Employee

Hello @mteaching 

I suggest you to follow this wiki page to understand how SPI works and how to configure and use it. Especially the device tree configuration in your case:

https://wiki.st.com/stm32mpu/wiki/SPI_overview

 

Best Regards,

 

Arnaud

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.