Skip to main content
SChen.11
Associate III
December 20, 2019
Question

The usart1 has issue with PZ6 and PZ7

  • December 20, 2019
  • 8 replies
  • 1620 views

Hi all, I use PZ7 and PZ6 configure for usart1. But it show some error log.

[ 1.633566] stm32mp157-pinctrl soc:pin-controller@50002000: invalid function.
[ 1.640375] stm32-usart: probe of 5c000000.serial failed with error -22

It's right when II try to use another pins . Did you also had this issue?

This topic has been closed for replies.

8 replies

PatrickF
ST Employee
December 20, 2019

Would be easier to support if you provide the DeviceTree.

Meanwhile, some clues

  • 50002000 is GPIOA, normal ?
  • Please check if you have not duplicated of same GPIO definition in the DT
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
SChen.11
SChen.11Author
Associate III
December 20, 2019

Thanks for your quick response. Below is my dts code. And I also enable all uart/usart in dts, only the usart1 had error.

 339 uart1_pins_a: uart1-0 {
 340 pins1 {
 341 pinmux = <STM32_PINMUX('Z', 7, AF7)>; /* USART1_TX */
 342 bias-disable;
 343 drive-push-pull;
 344 slew-rate = <0>;
 345 };
 346 pins2 {
 347 pinmux = <STM32_PINMUX('Z', 6, AF7)>; /* USART1_RX */
 348 bias-disable;
 349 };
 350 };
 
 856 &usart1 {
 857 pinctrl-names = "default", "sleep", "idle";
 858 pinctrl-0 = <&uart1_pins_a>;
 859 pinctrl-1 = <&uart1_sleep_pins_a>;
 860 pinctrl-2 = <&uart1_idle_pins_a>;
 861 status = "okay";
 862 };

PatrickF
ST Employee
December 20, 2019

I assume the nodes "uart1_sleep_pins_a" and "uart1_idle_pins_a" are defined elsewhere. otherwise, try to remove the "pinctrl-1" and "pinctrl-2" lines.

Please check if USART1 is defined as non-secure in etzpc node of TF-A Device Tree?

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
JKlei.1
Visitor II
April 3, 2020

Hi,

I had the same problem. I muxed the pins in uboot and delete the muxing in devicetree.

After this the uasrt1 works fine.

Seems to be an issue in the pinctrl driver.