Skip to content

Commit c573a29

Browse files
author
Florian Vaussard
committed
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>
1 parent d31014d commit c573a29

File tree

2 files changed

+154
-0
lines changed

2 files changed

+154
-0
lines changed

drivers/serial/Kconfig.stm32

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,130 @@ config UART_STM32_PORT_3_NAME
7171
This is the device name for USART3 port, and is
7272
included in the device struct.
7373

74+
# --- port 4 ---
75+
76+
config UART_STM32_PORT_4
77+
bool "Enable STM32 UART4 Port"
78+
default n
79+
depends on UART_STM32
80+
help
81+
Enable support for UART4 port in the driver. Say y here
82+
if you want to use UART4 device.
83+
84+
config UART_STM32_PORT_4_NAME
85+
string "Device Name for STM32 UART4 Port"
86+
default "UART_4"
87+
depends on UART_STM32_PORT_4
88+
help
89+
This is the device name for UART4 port, and is
90+
included in the device struct.
91+
92+
# --- port 5 ---
93+
94+
config UART_STM32_PORT_5
95+
bool "Enable STM32 UART5 Port"
96+
default n
97+
depends on UART_STM32
98+
help
99+
Enable support for UART5 port in the driver. Say y here
100+
if you want to use UART5 device.
101+
102+
config UART_STM32_PORT_5_NAME
103+
string "Device Name for STM32 UART5 Port"
104+
default "UART_5"
105+
depends on UART_STM32_PORT_5
106+
help
107+
This is the device name for UART5 port, and is
108+
included in the device struct.
109+
110+
# --- port 6 ---
111+
112+
config UART_STM32_PORT_6
113+
bool "Enable STM32 USART6 Port"
114+
default n
115+
depends on UART_STM32
116+
help
117+
Enable support for USART6 port in the driver. Say y here
118+
if you want to use USART6 device.
119+
120+
config UART_STM32_PORT_6_NAME
121+
string "Device Name for STM32 USART6 Port"
122+
default "UART_6"
123+
depends on UART_STM32_PORT_6
124+
help
125+
This is the device name for USART6 port, and is
126+
included in the device struct.
127+
128+
# --- port 7 ---
129+
130+
config UART_STM32_PORT_7
131+
bool "Enable STM32 UART7 Port"
132+
default n
133+
depends on UART_STM32
134+
help
135+
Enable support for UART7 port in the driver. Say y here
136+
if you want to use UART7 device.
137+
138+
config UART_STM32_PORT_7_NAME
139+
string "Device Name for STM32 UART7 Port"
140+
default "UART_7"
141+
depends on UART_STM32_PORT_7
142+
help
143+
This is the device name for UART7 port, and is
144+
included in the device struct.
145+
146+
# --- port 8 ---
147+
148+
config UART_STM32_PORT_8
149+
bool "Enable STM32 UART8 Port"
150+
default n
151+
depends on UART_STM32
152+
help
153+
Enable support for UART8 port in the driver. Say y here
154+
if you want to use UART8 device.
155+
156+
config UART_STM32_PORT_8_NAME
157+
string "Device Name for STM32 UART8 Port"
158+
default "UART_8"
159+
depends on UART_STM32_PORT_8
160+
help
161+
This is the device name for UART8 port, and is
162+
included in the device struct.
163+
164+
# --- port 9 ---
165+
166+
config UART_STM32_PORT_9
167+
bool "Enable STM32 UART9 Port"
168+
default n
169+
depends on UART_STM32
170+
help
171+
Enable support for UART9 port in the driver. Say y here
172+
if you want to use UART9 device.
173+
174+
config UART_STM32_PORT_9_NAME
175+
string "Device Name for STM32 UART9 Port"
176+
default "UART_9"
177+
depends on UART_STM32_PORT_9
178+
help
179+
This is the device name for UART9 port, and is
180+
included in the device struct.
181+
182+
# --- port 10 ---
183+
184+
config UART_STM32_PORT_10
185+
bool "Enable STM32 UART10 Port"
186+
default n
187+
depends on UART_STM32
188+
help
189+
Enable support for UART10 port in the driver. Say y here
190+
if you want to use UART10 device.
191+
192+
config UART_STM32_PORT_10_NAME
193+
string "Device Name for STM32 UART10 Port"
194+
default "UART_10"
195+
depends on UART_STM32_PORT_10
196+
help
197+
This is the device name for UART10 port, and is
198+
included in the device struct.
199+
74200
endif # UART_STM32

drivers/serial/uart_stm32.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,31 @@ UART_DEVICE_INIT_STM32(USART, 2, APB1)
377377
#ifdef CONFIG_UART_STM32_PORT_3
378378
UART_DEVICE_INIT_STM32(USART, 3, APB1)
379379
#endif /* CONFIG_UART_STM32_PORT_3 */
380+
381+
#ifdef CONFIG_UART_STM32_PORT_4
382+
UART_DEVICE_INIT_STM32(UART, 4, APB1)
383+
#endif /* CONFIG_UART_STM32_PORT_4 */
384+
385+
#ifdef CONFIG_UART_STM32_PORT_5
386+
UART_DEVICE_INIT_STM32(UART, 5, APB1)
387+
#endif /* CONFIG_UART_STM32_PORT_5 */
388+
389+
#ifdef CONFIG_UART_STM32_PORT_6
390+
UART_DEVICE_INIT_STM32(USART, 6, APB2)
391+
#endif /* CONFIG_UART_STM32_PORT_6 */
392+
393+
#ifdef CONFIG_UART_STM32_PORT_7
394+
UART_DEVICE_INIT_STM32(UART, 7, APB1)
395+
#endif /* CONFIG_UART_STM32_PORT_7 */
396+
397+
#ifdef CONFIG_UART_STM32_PORT_8
398+
UART_DEVICE_INIT_STM32(UART, 8, APB1)
399+
#endif /* CONFIG_UART_STM32_PORT_8 */
400+
401+
#ifdef CONFIG_UART_STM32_PORT_9
402+
UART_DEVICE_INIT_STM32(UART, 9, APB2)
403+
#endif /* CONFIG_UART_STM32_PORT_9 */
404+
405+
#ifdef CONFIG_UART_STM32_PORT_10
406+
UART_DEVICE_INIT_STM32(UART, 10, APB2)
407+
#endif /* CONFIG_UART_STM32_PORT_10 */

0 commit comments

Comments
 (0)