soc: stm32f1: add port uart4

Enable supporting UART4 on STM32F107 and STM32F103Xe SoCs.
Modified stm32f1/dts.fixup for replacing USART with UART.

Signed-off-by: Jun Li <jun.r.li@intel.com>
This commit is contained in:
Jun Li 2018-03-15 07:52:57 -07:00 committed by Kumar Gala
commit 8cc002e657
5 changed files with 37 additions and 0 deletions

View file

@ -20,6 +20,12 @@
#define CONFIG_UART_STM32_USART_3_NAME ST_STM32_USART_40004800_LABEL
#define USART_3_IRQ ST_STM32_USART_40004800_IRQ_0
#define CONFIG_UART_STM32_PORT_4_BASE_ADDRESS ST_STM32_UART_40004C00_BASE_ADDRESS
#define CONFIG_UART_STM32_PORT_4_BAUD_RATE ST_STM32_UART_40004C00_CURRENT_SPEED
#define CONFIG_UART_STM32_PORT_4_IRQ_PRI ST_STM32_UART_40004C00_IRQ_0_PRIORITY
#define CONFIG_UART_STM32_PORT_4_NAME ST_STM32_UART_40004C00_LABEL
#define PORT_4_IRQ ST_STM32_UART_40004C00_IRQ_0
#define CONFIG_I2C_1_BASE_ADDRESS ST_STM32_I2C_V1_40005400_BASE_ADDRESS
#define CONFIG_I2C_1_EVENT_IRQ_PRI ST_STM32_I2C_V1_40005400_IRQ_EVENT_PRIORITY
#define CONFIG_I2C_1_ERROR_IRQ_PRI ST_STM32_I2C_V1_40005400_IRQ_ERROR_PRIORITY

View file

@ -41,6 +41,9 @@
#define STM32F1_PINMUX_FUNC_PB10_USART3_TX STM32_PIN_USART_TX
#define STM32F1_PINMUX_FUNC_PB11_USART3_RX STM32_PIN_USART_RX
#define STM32F1_PINMUX_FUNC_PC10_UART4_TX STM32_PIN_USART_TX
#define STM32F1_PINMUX_FUNC_PC11_UART4_RX STM32_PIN_USART_RX
#define STM32F1_PINMUX_FUNC_PB10_I2C2_SCL STM32_PIN_I2C
#define STM32F1_PINMUX_FUNC_PB11_I2C2_SDA STM32_PIN_I2C

View file

@ -33,6 +33,12 @@
tx = <STM32_PIN_PB10 STM32_PIN_USART_TX>;
};
};
uart4_pins_a: uart4@0 {
rx_tx {
rx = <STM32_PIN_PC11 STM32_PIN_USART_RX>;
tx = <STM32_PIN_PC10 STM32_PIN_USART_TX>;
};
};
};
};
};

View file

@ -11,6 +11,15 @@
/ {
soc {
uart4: serial@40004c00 {
compatible = "st,stm32-uart";
reg = <0x40004c00 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>;
interrupts = <52 0>;
status = "disabled";
label = "UART_4";
};
spi3: spi@40003C00 {
compatible = "st,stm32-spi";
#address-cells = <1>;

View file

@ -5,3 +5,16 @@
*/
#include <st/stm32f1.dtsi>
/ {
soc {
uart4: serial@40004c00 {
compatible = "st,stm32-uart";
reg = <0x40004c00 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00080000>;
interrupts = <52 0>;
status = "disabled";
label = "UART_4";
};
};
};