diff --git a/drivers/pinmux/stm32/pinmux_stm32f4.h b/drivers/pinmux/stm32/pinmux_stm32f4.h index 516af25d32b..a0f72ee987a 100644 --- a/drivers/pinmux/stm32/pinmux_stm32f4.h +++ b/drivers/pinmux/stm32/pinmux_stm32f4.h @@ -267,6 +267,8 @@ #define STM32F4_PINMUX_FUNC_PC10_USART3_TX \ (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP) +#define STM32F4_PINMUX_FUNC_PC10_UART4_TX \ + (STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP) #define STM32F4_PINMUX_FUNC_PC11_USART3_RX \ (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL) diff --git a/dts/arm/st/f4/stm32f4-pinctrl.dtsi b/dts/arm/st/f4/stm32f4-pinctrl.dtsi index a313c22b23f..54796f25dfe 100644 --- a/dts/arm/st/f4/stm32f4-pinctrl.dtsi +++ b/dts/arm/st/f4/stm32f4-pinctrl.dtsi @@ -45,6 +45,18 @@ tx = ; }; }; + uart4_pins_a: uart4_a { + rx_tx { + rx = ; + tx = ; + }; + }; + uart4_pins_b: uart4_b { + rx_tx { + rx = ; + tx = ; + }; + }; usart6_pins_a: usart6_a { rx_tx { rx = ; diff --git a/dts/arm/st/f4/stm32f4.dtsi b/dts/arm/st/f4/stm32f4.dtsi index 63c39592397..c97786b25ce 100644 --- a/dts/arm/st/f4/stm32f4.dtsi +++ b/dts/arm/st/f4/stm32f4.dtsi @@ -133,6 +133,15 @@ label = "UART_2"; }; + uart4: serial@40004c00 { + compatible = "st,stm32-usart", "st,stm32-uart"; + reg = <0x40004C00 0x400>; + clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>; + interrupts = <52 0>; + status = "disabled"; + label = "UART_4"; + }; + usart6: serial@40011400 { compatible = "st,stm32-usart", "st,stm32-uart"; reg = <0x40011400 0x400>; diff --git a/soc/arm/st_stm32/stm32f4/dts_fixup.h b/soc/arm/st_stm32/stm32f4/dts_fixup.h index 6176f757a1a..0830718ed75 100644 --- a/soc/arm/st_stm32/stm32f4/dts_fixup.h +++ b/soc/arm/st_stm32/stm32f4/dts_fixup.h @@ -125,6 +125,14 @@ #define DT_UART_STM32_USART_3_CLOCK_BITS DT_ST_STM32_USART_40004800_CLOCK_BITS #define DT_UART_STM32_USART_3_CLOCK_BUS DT_ST_STM32_USART_40004800_CLOCK_BUS +#define DT_UART_STM32_UART_4_BASE_ADDRESS DT_ST_STM32_USART_40004C00_BASE_ADDRESS +#define DT_UART_STM32_UART_4_BAUD_RATE DT_ST_STM32_USART_40004C00_CURRENT_SPEED +#define DT_UART_STM32_UART_4_IRQ_PRI DT_ST_STM32_USART_40004C00_IRQ_0_PRIORITY +#define DT_UART_STM32_UART_4_NAME DT_ST_STM32_USART_40004C00_LABEL +#define DT_UART_4_IRQ DT_ST_STM32_USART_40004C00_IRQ_0 +#define DT_UART_STM32_UART_4_CLOCK_BITS DT_ST_STM32_USART_40004C00_CLOCK_BITS +#define DT_UART_STM32_UART_4_CLOCK_BUS DT_ST_STM32_USART_40004C00_CLOCK_BUS + #define DT_UART_STM32_USART_6_NAME DT_ST_STM32_USART_40011400_LABEL #define DT_UART_STM32_USART_6_BASE_ADDRESS DT_ST_STM32_USART_40011400_BASE_ADDRESS #define DT_UART_STM32_USART_6_BAUD_RATE DT_ST_STM32_USART_40011400_CURRENT_SPEED