cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157d USART1

Micha? Peterek
Associate II

Hi,

What am I doing wrong that USART1 returns -2 during the probe

kernel.dts -> PINS

 

 

 

usart1_pins_mx: usart1_mx-0 {
		pins1 {
			pinmux = <STM32_PINMUX('A', 9, AF7)>, /* USART1_TX */
					 <STM32_PINMUX('A', 12, AF7)>; /* USART1_RTS */
			bias-disable;
			drive-push-pull;
			slew-rate = <0>;
		};
		pins2 {
			pinmux = <STM32_PINMUX('B', 15, AF4)>; /* USART1_RX */
			bias-disable;
		};
	};

	usart1_sleep_pins_mx: usart1_sleep_mx-0 {
		pins {
			pinmux = <STM32_PINMUX('A', 9, ANALOG)>, /* USART1_TX */
					 <STM32_PINMUX('A', 12, ANALOG)>, /* USART1_RTS */
					 <STM32_PINMUX('B', 15, ANALOG)>; /* USART1_RX */
		};
	};

 

 

 

 

Kernel.dts -> Node

 

 

 

&usart1{
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&usart1_pins_mx &usart1_pins_z_mx>;
	pinctrl-1 = <&usart1_sleep_pins_mx &usart1_sleep_pins_z_mx>;
	status = "okay";

	/* USER CODE BEGIN usart1 */
	/* USER CODE END usart1 */
};

 

 

 

 

optee :

 

 

 

	DECPROT(STM32MP1_ETZPC_USART1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)

 

 

 

 

 

 

 

CLK_UART1_PLL4Q

 

 

 

 

 

Log: 

 

 

 

[    0.742385] /soc/interrupt-controller@5000d000: bank0
[    0.742418] /soc/interrupt-controller@5000d000: bank1
[    0.742436] /soc/interrupt-controller@5000d000: bank2
[    0.744351] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOA bank added
[    0.745066] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOB bank added
[    0.749331] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOC bank added
[    0.750171] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOD bank added
[    0.750869] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOE bank added
[    0.751583] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOF bank added
[    0.752239] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOG bank added
[    0.759262] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOH bank added
[    0.760094] stm32mp157-pinctrl soc:pinctrl@50002000: GPIOI bank added
[    0.760166] stm32mp157-pinctrl soc:pinctrl@50002000: Pinctrl STM32 initialized
[    0.762019] stm32mp157-pinctrl soc:pinctrl@54004000: GPIOZ bank added
[    0.762053] stm32mp157-pinctrl soc:pinctrl@54004000: Pinctrl STM32 initialized
[    0.779227] 4000f000.serial: ttySTM1 at MMIO 0x4000f000 (irq = 41, base_baud = 6527435) is a stm32-usart
[    0.781421] stm32-usart 40010000.serial: interrupt mode for rx (no dma)
[    0.781443] stm32-usart 40010000.serial: interrupt mode for tx (no dma)
[    0.781470] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 42, base_baud = 4000000) is a stm32-usart
[    0.933488] Freeing initrd memory: 6096K
[    0.941103] printk: console [ttySTM0] enabled
[    2.047566] stm32-usart: probe of 5c000000.serial failed with error -2

 

 

 

 

1 REPLY 1
Erwan SZYMANSKI
ST Employee

Hello @Micha? Peterek ,
Did you manage to catch your issue ? On which kernel version / OpenSTLinux version are you ? 
Did you try to add debug messages in stm32-usart driver to check which step of the probe put you in troubles ? Did you get inspired by stm32mp157f-ev1 device trees that also configure USART1 ? 

Kind regards,
Erwan.

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.