2025-05-30 1:59 AM - last edited on 2025-05-30 2:06 AM by mƎALLEm
Hi,
We are using STM32mp157DAC som with a custom carrier board.
We have built a custom yocto image.
below is my device tree configuration.
aliases {
serial4 = &usart1
};
&usart1 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&usart1_pins_a>;
pinctrl-1 = <&usart1_sleep_pins_a>;
pinctrl-2 = <&usart1_idle_pins_a>;
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
};
usart1_pins_a: usart1-0 {
pins1 {
pinmux = <STM32_PINMUX('Z', 6, AF7)>; /* USART1_Rx */
drive-push-pull;
bias-disable;
};
pins2 {
pinmux = <STM32_PINMUX('Z', 7, AF7)>; /* USART1_TX */
drive-open-drain;
bias-disable;
};
};
usart1_idle_pins_a: usart1-idle-0 {
pins {
pinmux = <STM32_PINMUX('Z', 7, ANALOG)>, /* USART1_TX */
<STM32_PINMUX('Z', 6, ANALOG)>; /* USART1_RX */
};
};
usart1_sleep_pins_a: usart1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('Z', 7, ANALOG)>, /* USART1_TX */
<STM32_PINMUX('Z', 6, ANALOG)>; /* USART1_RX */
};
};
dmesg | grep tty
[ 0.000000] Kernel command line: root=PARTUUID=491f6117-415d-4f53-88c9-6e0de54deac6 rootwait rw console=ttySTM0,115200
[ 0.802363] 4000e000.serial: ttySTM3 at MMIO 0x4000e000 (irq = 52, base_baud = 4000000) is a stm32-usart
[ 0.805678] 4000f000.serial: ttySTM1 at MMIO 0x4000f000 (irq = 53, base_baud = 4000000) is a stm32-usart
[ 0.817317] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 54, base_baud = 4000000) is a stm32-usart
[ 2.299010] printk: console [ttySTM0] enabled
[ 2.317528] 40018000.serial: ttySTM2 at MMIO 0x40018000 (irq = 55, base_baud = 4000000) is a stm32-usart
[ 2.341213] 5c000000.serial: ttySTM4 at MMIO 0x5c000000 (irq = 56, base_baud = 4000000) is a stm32-usart
[ 7.190264] systemd[1]: Created slice Slice /system/getty.
[ 7.273205] systemd[1]: Created slice Slice /system/serial-getty.
[ 2.329232] stm32-usart 5c000000.serial: interrupt mode for rx (no dma)
[ 2.334421] stm32-usart 5c000000.serial: interrupt mode for tx (no dma)
i am able to see the ttySTM4 port enabled from dmesg log.
but when I try to transmit data using echo command and monitored the tx line using probe there is no activity.
stty -F /dev/ttySTM4 115200
root@stm32mp15-disco:~# stty -F /dev/ttySTM4
speed 115200 baud; line = 0;
-brkint -imaxbel
root@stm32mp15-disco:~# echo test > /dev/ttySTM4
Please let me know if any configuration needs to be changed.
Below are the pins we are using.
Port Z | PZ6 | H1 | UART1_RX | UART1_RX |
Port Z | PZ7 | J3 | UART1_TX | UART1_TX |
Best Regards,
Adnan