Commit e31498cf authored by Fabrice DJIATSA's avatar Fabrice DJIATSA Committed by Chris Friedt
Browse files

tests: drivers: uart: elementary: stm32: add support for hw flow control



- Configure and attach DMA for each USART node.
- Enable hardware flow control capability.
- Add RTS/CTS pin name signals.

Note: Some platform series are missing due to conflicts with other pins
used by different test drivers
(RTS pin should be connected to the CTS pin.)

Signed-off-by: default avatarFabrice DJIATSA <fabrice.djiatsa-ext@st.com>
parent a86d9029
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 STMicroelectronics
 *
 * SPDX-License-Identifier: Apache-2.0
 */

dut: &usart3 {
	pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9 &usart3_rts_pd2 &usart3_cts_pb13>;
	dmas = <&gpdma1 0 29 STM32_DMA_PERIPH_TX>,
	       <&gpdma1 1 28 STM32_DMA_PERIPH_RX>;
	dma-names = "tx", "rx";
	hw-flow-control;
};
+15 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 STMicroelectronics
 *
 * SPDX-License-Identifier: Apache-2.0
 */

dut: &usart3 {
	pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11 &usart3_rts_pb14 &usart3_cts_pb13>;
	pinctrl-names = "default";
	dmas = <&dma1 2 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH)>,
	       <&dma1 1 (STM32_DMA_PERIPH_RX | STM32_DMA_PRIORITY_HIGH)>;
	dma-names = "tx", "rx";
	hw-flow-control;
	status = "okay";
};
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 STMicroelectronics
 *
 * SPDX-License-Identifier: Apache-2.0
 */

dut: &usart1 {
	pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7 &usart1_rts_pa12 &usart1_cts_pa11>;
	dmas = <&dmamux1 3 51 STM32_DMA_PERIPH_TX>,
	       <&dmamux1 4 50 STM32_DMA_PERIPH_RX>;
	dma-names = "tx", "rx";
	hw-flow-control;
};

&dma1 {
	status = "okay";
};

&dmamux1 {
	status = "okay";
};

&usb {
	status = "disabled"
};
+21 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 STMicroelectronics
 *
 * SPDX-License-Identifier: Apache-2.0
 */

dut: &usart1 {
	pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5  &usart1_rts_pa12 &usart1_cts_pa11>;
	dmas = <&dmamux1 2 25 STM32_DMA_PERIPH_TX>,
	       <&dmamux1 1 24 STM32_DMA_PERIPH_RX>;
	dma-names = "tx", "rx";
	hw-flow-control;
};

&dma1 {
	status = "okay";
};

&dmamux1 {
	status = "okay";
};
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 STMicroelectronics
 *
 * SPDX-License-Identifier: Apache-2.0
 */

dut: &usart2 {
	dmas = <&dmamux1 2 44 STM32_DMA_PERIPH_TX>,
	       <&dmamux1 3 43 STM32_DMA_PERIPH_RX>;
	dma-names = "tx", "rx";
	pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>;
	pinctrl-names = "default";
	current-speed = <115200>;
	hw-flow-control;
	status = "okay";
};

&dma1 {
	status = "okay";
};

&dma2 {
	status = "okay";
};

&dmamux1 {
	status = "okay";
};
Loading