UART4 Pins H13 and H14 not working as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-22 02:24 PM
I am trying to use the UART4 TX: H13 and RX: H14 pins for the tty console access.
The TX from the MPU works fine as I can see the kernel boot logs, but cannot access the kernel command line. No prompt shows up on hitting ENTER.
Here are my stm32mp15-pinctrl.dtsi UART4 configurations:
uart4_pins_a: uart4-0 {
pins1 {
//pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
pinmux = <STM32_PINMUX('H', 13, AF8)>; /* UART4_TX */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
//pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
pinmux = <STM32_PINMUX('H', 14, AF8)>; /* UART4_RX */
bias-disable;
};
};
uart4_idle_pins_a: uart4-idle-0 {
pins1 {
//pinmux = <STM32_PINMUX('G', 11, ANALOG)>; /* UART4_TX */
pinmux = <STM32_PINMUX('H', 13, ANALOG)>; /* UART4_TX */
};
pins2 {
//pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
pinmux = <STM32_PINMUX('H', 14, AF8)>; /* UART4_RX */
bias-disable;
};
};
uart4_sleep_pins_a: uart4-sleep-0 {
pins {
//pinmux = <STM32_PINMUX('G', 11, ANALOG)>, /* UART4_TX */
// <STM32_PINMUX('B', 2, ANALOG)>; /* UART4_RX */
pinmux = <STM32_PINMUX('H', 13, ANALOG)>, /* UART4_TX */
<STM32_PINMUX('H', 14, ANALOG)>; /* UART4_RX */
};
};
And the stm32mp15xx-evx.dtsi configurations:
&uart4 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&uart4_pins_a>;
pinctrl-1 = <&uart4_sleep_pins_a>;
pinctrl-2 = <&uart4_idle_pins_a>;
//uart-has-rtscts;
//status = "disabled";
status = "okay";
};
Have also added chosen path as:
chosen {
stdout-path = "serial0:115200n8";
};
aliases {
serial0 = &uart4;
};
What is missing for the configurations?
- Labels:
-
STM32MP15 Lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-26 01:46 AM
Hello @SRaic.1​ ,
Please can you share the complete boot log.
Does it was working previously with the default UART4 config?
Does it work under U-Boot?
Best Regards,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-27 08:12 AM
Hi @Kevin HUBER​
Attaching boot logs after enabling the UART 4 as console uart.
Yes, when using the default uart4 config, uart4 TX and RX worked fine as kernel console.
Not made changes for U-boot uart4 yet.
Regards,
Swapnil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-29 03:56 AM
Hello @SRaic.1​ ,
You are using an ecosystem v2.1 that is no longer supported by ST (deprecated version), it is recommended to switch to the latest environment release which is the v4.1:
https://wiki.st.com/stm32mpu/wiki/STM32_MPU_OpenSTLinux_release_note_-_v4.1.0
Otherwise, regarding your problem I tried on my 157F-EV1 board with the ecosystem v4.1.0 and I was able to use H13 and H14 without issue.
It is possible to verify which pins are used with the command:
root@stm32mp1:~# cat /sys/kernel/debug/pinctrl/soc:pinctrl@50002000/pinmux-pins
pin 125 (PH13): device 40010000.serial function af8 group PH13
pin 126 (PH14): device 40010000.serial function af8 group PH14
For doing that I only modified (for test purpose) the file stm32mp15-pinctrl.dtsi
where I replaced every
- "('G', 11, AF6)" by "('H', 13, AF8)"
- "('B', 2, AF8)" by "('H', 14, AF8)"
In uart4_pins_a, uart4_idle_pins_a, uart4_sleep_pins_a.
I didn't changed anything else.
My uart4 node looks like this:
&uart4 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&uart4_pins_a>;
pinctrl-1 = <&uart4_sleep_pins_a>;
pinctrl-2 = <&uart4_idle_pins_a>;
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
};
Best Regards,
Kevin
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'