Commit c6807970 authored by Chia-Wei Wang's avatar Chia-Wei Wang Committed by Arnd Bergmann

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: default avatarOskar Senft <osk@google.com>
Signed-off-by: default avatarChia-Wei Wang <chiawei_wang@aspeedtech.com>
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
Tested-by: default avatarLei YU <yulei.sh@bytedance.com>
Link: https://lore.kernel.org/r/20210927023053.6728-5-chiawei_wang@aspeedtech.com
Link: https://lore.kernel.org/r/20211022000616.481772-1-joel@jms.id.au'
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent ac2561f9
What: /sys/bus/platform/drivers/aspeed-uart-routing/*/uart*
Date: September 2021
Contact: Oskar Senft <osk@google.com>
Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Description: Selects the RX source of the UARTx device.
When read, each file shows the list of available options with currently
selected option marked by brackets "[]". The list of available options
depends on the selected file.
e.g.
cat /sys/bus/platform/drivers/aspeed-uart-routing/*.uart_routing/uart1
[io1] io2 io3 io4 uart2 uart3 uart4 io6
In this case, UART1 gets its input from IO1 (physical serial port 1).
Users: OpenBMC. Proposed changes should be mailed to
openbmc@lists.ozlabs.org
What: /sys/bus/platform/drivers/aspeed-uart-routing/*/io*
Date: September 2021
Contact: Oskar Senft <osk@google.com>
Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Description: Selects the RX source of IOx serial port. The current selection
will be marked by brackets "[]".
Users: OpenBMC. Proposed changes should be mailed to
openbmc@lists.ozlabs.org
......@@ -24,6 +24,16 @@ config ASPEED_LPC_SNOOP
allows the BMC to listen on and save the data written by
the host to an arbitrary LPC I/O port.
config ASPEED_UART_ROUTING
tristate "ASPEED uart routing control"
select REGMAP
select MFD_SYSCON
default ARCH_ASPEED
help
Provides a driver to control the UART routing paths, allowing
users to perform runtime configuration of the RX muxes among
the UART controllers and I/O pins.
config ASPEED_P2A_CTRL
tristate "ASPEED P2A (VGA MMIO to BMC) bridge control"
select REGMAP
......
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o
obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
obj-$(CONFIG_ASPEED_UART_ROUTING) += aspeed-uart-routing.o
obj-$(CONFIG_ASPEED_P2A_CTRL) += aspeed-p2a-ctrl.o
obj-$(CONFIG_ASPEED_SOCINFO) += aspeed-socinfo.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment