Skip to content

Commit 069fce7

Browse files
ric96galak
authored andcommitted
boards: uart: Add UART6 for 96b_carbon
Enabled UART 6 on pin PC6 and PC7 for 96b_carbon Signed-off-by: Sahaj Sarup <[email protected]>
1 parent 0528b2b commit 069fce7

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

boards/arm/96b_carbon/96b_carbon.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
status = "ok";
3333
};
3434

35+
&usart6 {
36+
current-speed = <115200>;
37+
pinctrl-0 = <&usart6_pins_a>;
38+
pinctrl-names = "default";
39+
status = "ok";
40+
};
41+
3542
&i2c1 {
3643
status = "ok";
3744
clock-frequency = <I2C_BITRATE_FAST>;

boards/arm/96b_carbon/pinmux.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ static const struct pin_config pinconf[] = {
2222
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX},
2323
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
2424
#endif /* CONFIG_UART_STM32_PORT_2 */
25+
#ifdef CONFIG_UART_STM32_PORT_6
26+
{STM32_PIN_PC6, STM32F4_PINMUX_FUNC_PC6_USART6_TX},
27+
{STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_USART6_RX},
28+
#endif /* CONFIG_UART_STM32_PORT_6 */
2529
#ifdef CONFIG_I2C_1
2630
{STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL},
2731
{STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA},

drivers/serial/uart_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ UART_DEVICE_INIT_STM32(5, STM32_CLOCK_BUS_APB1, LL_APB1_GRP1_PERIPH_UART5)
426426
#endif /* CONFIG_UART_STM32_PORT_5 */
427427

428428
#ifdef CONFIG_UART_STM32_PORT_6
429-
UART_DEVICE_INIT_STM32(6, STM32_CLOCK_BUS_APB2, LL_APB2_GRP1_PERIPH_UART6)
429+
UART_DEVICE_INIT_STM32(6, STM32_CLOCK_BUS_APB2, LL_APB2_GRP1_PERIPH_USART6)
430430
#endif /* CONFIG_UART_STM32_PORT_6 */
431431

432432
#ifdef CONFIG_UART_STM32_PORT_7

dts/arm/st/stm32f4-pinctrl.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
tx = <STM32_PIN_PD8 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
4646
};
4747
};
48+
usart6_pins_a: usart6@0 {
49+
rx_tx {
50+
rx = <STM32_PIN_PC7 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
51+
tx = <STM32_PIN_PC6 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
52+
};
53+
};
4854
};
4955
};
5056
};

0 commit comments

Comments
 (0)