Skip to main content
MEnge.3
Associate
Mar 18, 2022 5:09 PM UTC
Solved

Linux 5.10 pinctrl driver fails to configure GPIO port Z pad 7 with AF7 (USART1_TX)

I have the following pinctrl entry in my 5.10 device tree to use the USART1 and the serial port fails, due to an incorrect pin configuration for PZ7 AF7.

usart1_pins_c: usart1-2 {
 pins1 {
 pinmux = <STM32_PINMUX('Z', 7, AF7)>, /* USART1_TX */
 <STM32_PINMUX('A', 12, AF7)>; /* USART1_RTS */
 bias-disable;
 drive-push-pull;
 slew-rate = <0>;
 };
 pins2 {
 pinmux = <STM32_PINMUX('Z', 1, AF7)>, /* USART1_RX */
 <STM32_PINMUX('A', 11, AF7)>; /* USART1_CTS_NSS */
 bias-pull-up;
 };
 };

Does anybody know why this is happening?

Does the PZ7 require any specific setup to be used as USART1_TX?

Best regards,

--

Mike

This topic has been closed for replies.
MEnge.3
MEnge.3Best answer
Associate
Mar 23, 2022 10:15 AM UTC

I found the problem. For all the GPIOZ pin you need to specify them in the pinctrl_z DT node. Once I changed that the USART1 was detected correctly and initialized.

1 reply

MEnge.3
MEnge.3AuthorBest answer
Associate
Mar 23, 2022 10:15 AM UTC

I found the problem. For all the GPIOZ pin you need to specify them in the pinctrl_z DT node. Once I changed that the USART1 was detected correctly and initialized.