Skip to content

Commit c680797

Browse files
Chia-Wei Wangarndb
authored andcommitted
soc: aspeed: Add UART routing support
Add driver support for the UART routing control. Users can perform runtime configuration of the RX muxes among the UART controllers and the UART IO pins. The sysfs interface is also exported for the convenience of routing paths check and update. Signed-off-by: Oskar Senft <[email protected]> Signed-off-by: Chia-Wei Wang <[email protected]> Signed-off-by: Joel Stanley <[email protected]> Tested-by: Lei YU <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected]' Signed-off-by: Arnd Bergmann <[email protected]>
1 parent ac2561f commit c680797

File tree

4 files changed

+645
-4
lines changed

4 files changed

+645
-4
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
What: /sys/bus/platform/drivers/aspeed-uart-routing/*/uart*
2+
Date: September 2021
3+
Contact: Oskar Senft <[email protected]>
4+
Chia-Wei Wang <[email protected]>
5+
Description: Selects the RX source of the UARTx device.
6+
7+
When read, each file shows the list of available options with currently
8+
selected option marked by brackets "[]". The list of available options
9+
depends on the selected file.
10+
11+
e.g.
12+
cat /sys/bus/platform/drivers/aspeed-uart-routing/*.uart_routing/uart1
13+
[io1] io2 io3 io4 uart2 uart3 uart4 io6
14+
15+
In this case, UART1 gets its input from IO1 (physical serial port 1).
16+
17+
Users: OpenBMC. Proposed changes should be mailed to
18+
19+
20+
What: /sys/bus/platform/drivers/aspeed-uart-routing/*/io*
21+
Date: September 2021
22+
Contact: Oskar Senft <[email protected]>
23+
Chia-Wei Wang <[email protected]>
24+
Description: Selects the RX source of IOx serial port. The current selection
25+
will be marked by brackets "[]".
26+
Users: OpenBMC. Proposed changes should be mailed to
27+

drivers/soc/aspeed/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ config ASPEED_LPC_SNOOP
2424
allows the BMC to listen on and save the data written by
2525
the host to an arbitrary LPC I/O port.
2626

27+
config ASPEED_UART_ROUTING
28+
tristate "ASPEED uart routing control"
29+
select REGMAP
30+
select MFD_SYSCON
31+
default ARCH_ASPEED
32+
help
33+
Provides a driver to control the UART routing paths, allowing
34+
users to perform runtime configuration of the RX muxes among
35+
the UART controllers and I/O pins.
36+
2737
config ASPEED_P2A_CTRL
2838
tristate "ASPEED P2A (VGA MMIO to BMC) bridge control"
2939
select REGMAP

drivers/soc/aspeed/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o
3-
obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
4-
obj-$(CONFIG_ASPEED_P2A_CTRL) += aspeed-p2a-ctrl.o
5-
obj-$(CONFIG_ASPEED_SOCINFO) += aspeed-socinfo.o
2+
obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o
3+
obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
4+
obj-$(CONFIG_ASPEED_UART_ROUTING) += aspeed-uart-routing.o
5+
obj-$(CONFIG_ASPEED_P2A_CTRL) += aspeed-p2a-ctrl.o
6+
obj-$(CONFIG_ASPEED_SOCINFO) += aspeed-socinfo.o

0 commit comments

Comments
 (0)