2020-04-13 06:18 PM
board: stm32mp157a-dk1
device-tree:
pinctrl{
usart2_pins_b: usart2-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 5, AF7)>; /* USART2_TX */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
pinmux = <STM32_PINMUX('F', 4, AF7)>; /* USART2_RX */
bias-disable;
};
};
usart2_idle_pins_b: usart2-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 5, ANALOG)>; /* USART2_TX */
};
pins2 {
pinmux = <STM32_PINMUX('F', 4, AF7)>; /* USART2_RX */
bias-disable;
};
};
usart2_sleep_pins_b: usart2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 5, ANALOG)>, /* USART2_TX */
<STM32_PINMUX('F', 4, ANALOG)>; /* USART2_RX */ };
};
};
&usart2 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&usart2_pins_b>;
pinctrl-1 = <&usart2_sleep_pins_b>;
pinctrl-2 = <&usart2_idle_pins_b>;
status = "okay";
};
error info:
[ 0.574170] STM32 USART driver initialized
[ 0.574825] stm32-usart 4000e000.serial: failed to get alias id, errno -19
[ 0.576148] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 27, base_baud = 4000000) is a stm32-usart
[ 1.404594] console [ttySTM0] enabled
[ 1.408934] stm32-usart 40010000.serial: interrupt mode used for rx (no dma)
[ 1.415351] stm32-usart 40010000.serial: interrupt mode used for tx (no dma)
please give me some.
2020-04-13 06:57 PM
linux kernel:
Linux buildroot 4.19.26-rt16 #1 SMP PREEMPT RT Sat Apr 11 09:24:16 CST 2020 armv7l GNU/Linux
2020-04-13 07:53 PM
I finish it.
I miss to config aliases.
aliases {
ethernet0 = ðernet0;
serial0 = &uart4;
serial1 = &usart2;
serial2 = &uart7;
};
serial1 = &usart2, it's ok.