serial: stm32: Add support for U(S)ART4/5/6/7/8/9/10

Add support for U(S)ART 4 to 10 that can be found at least on some
members of the STM32F4 family.

Change-Id: Ie870492511f885005cf023040e498bd4d800e807
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
This commit is contained in:
Florian Vaussard 2017-05-01 15:22:02 +02:00 committed by Anas Nashif
commit a327de30cf
2 changed files with 154 additions and 0 deletions

View file

@ -71,4 +71,130 @@ config UART_STM32_PORT_3_NAME
This is the device name for USART3 port, and is This is the device name for USART3 port, and is
included in the device struct. included in the device struct.
# --- port 4 ---
config UART_STM32_PORT_4
bool "Enable STM32 UART4 Port"
default n
depends on UART_STM32
help
Enable support for UART4 port in the driver. Say y here
if you want to use UART4 device.
config UART_STM32_PORT_4_NAME
string "Device Name for STM32 UART4 Port"
default "UART_4"
depends on UART_STM32_PORT_4
help
This is the device name for UART4 port, and is
included in the device struct.
# --- port 5 ---
config UART_STM32_PORT_5
bool "Enable STM32 UART5 Port"
default n
depends on UART_STM32
help
Enable support for UART5 port in the driver. Say y here
if you want to use UART5 device.
config UART_STM32_PORT_5_NAME
string "Device Name for STM32 UART5 Port"
default "UART_5"
depends on UART_STM32_PORT_5
help
This is the device name for UART5 port, and is
included in the device struct.
# --- port 6 ---
config UART_STM32_PORT_6
bool "Enable STM32 USART6 Port"
default n
depends on UART_STM32
help
Enable support for USART6 port in the driver. Say y here
if you want to use USART6 device.
config UART_STM32_PORT_6_NAME
string "Device Name for STM32 USART6 Port"
default "UART_6"
depends on UART_STM32_PORT_6
help
This is the device name for USART6 port, and is
included in the device struct.
# --- port 7 ---
config UART_STM32_PORT_7
bool "Enable STM32 UART7 Port"
default n
depends on UART_STM32
help
Enable support for UART7 port in the driver. Say y here
if you want to use UART7 device.
config UART_STM32_PORT_7_NAME
string "Device Name for STM32 UART7 Port"
default "UART_7"
depends on UART_STM32_PORT_7
help
This is the device name for UART7 port, and is
included in the device struct.
# --- port 8 ---
config UART_STM32_PORT_8
bool "Enable STM32 UART8 Port"
default n
depends on UART_STM32
help
Enable support for UART8 port in the driver. Say y here
if you want to use UART8 device.
config UART_STM32_PORT_8_NAME
string "Device Name for STM32 UART8 Port"
default "UART_8"
depends on UART_STM32_PORT_8
help
This is the device name for UART8 port, and is
included in the device struct.
# --- port 9 ---
config UART_STM32_PORT_9
bool "Enable STM32 UART9 Port"
default n
depends on UART_STM32
help
Enable support for UART9 port in the driver. Say y here
if you want to use UART9 device.
config UART_STM32_PORT_9_NAME
string "Device Name for STM32 UART9 Port"
default "UART_9"
depends on UART_STM32_PORT_9
help
This is the device name for UART9 port, and is
included in the device struct.
# --- port 10 ---
config UART_STM32_PORT_10
bool "Enable STM32 UART10 Port"
default n
depends on UART_STM32
help
Enable support for UART10 port in the driver. Say y here
if you want to use UART10 device.
config UART_STM32_PORT_10_NAME
string "Device Name for STM32 UART10 Port"
default "UART_10"
depends on UART_STM32_PORT_10
help
This is the device name for UART10 port, and is
included in the device struct.
endif # UART_STM32 endif # UART_STM32

View file

@ -372,3 +372,31 @@ UART_DEVICE_INIT_STM32(USART, 2, APB1)
#ifdef CONFIG_UART_STM32_PORT_3 #ifdef CONFIG_UART_STM32_PORT_3
UART_DEVICE_INIT_STM32(USART, 3, APB1) UART_DEVICE_INIT_STM32(USART, 3, APB1)
#endif /* CONFIG_UART_STM32_PORT_3 */ #endif /* CONFIG_UART_STM32_PORT_3 */
#ifdef CONFIG_UART_STM32_PORT_4
UART_DEVICE_INIT_STM32(UART, 4, APB1)
#endif /* CONFIG_UART_STM32_PORT_4 */
#ifdef CONFIG_UART_STM32_PORT_5
UART_DEVICE_INIT_STM32(UART, 5, APB1)
#endif /* CONFIG_UART_STM32_PORT_5 */
#ifdef CONFIG_UART_STM32_PORT_6
UART_DEVICE_INIT_STM32(USART, 6, APB2)
#endif /* CONFIG_UART_STM32_PORT_6 */
#ifdef CONFIG_UART_STM32_PORT_7
UART_DEVICE_INIT_STM32(UART, 7, APB1)
#endif /* CONFIG_UART_STM32_PORT_7 */
#ifdef CONFIG_UART_STM32_PORT_8
UART_DEVICE_INIT_STM32(UART, 8, APB1)
#endif /* CONFIG_UART_STM32_PORT_8 */
#ifdef CONFIG_UART_STM32_PORT_9
UART_DEVICE_INIT_STM32(UART, 9, APB2)
#endif /* CONFIG_UART_STM32_PORT_9 */
#ifdef CONFIG_UART_STM32_PORT_10
UART_DEVICE_INIT_STM32(UART, 10, APB2)
#endif /* CONFIG_UART_STM32_PORT_10 */