From: Randy Dunlap <rdunlap@infradead.org>
To: Changhuang Liang <changhuang.liang@starfivetech.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Corbet <corbet@lwn.net>, Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>,
Chia-Wei Wang <chiawei_wang@aspeedtech.com>,
Oskar Senft <osk@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
Jani Nikula <jani.nikula@intel.com>,
Vitaly Lubart <lubvital@gmail.com>,
Hanjun Guo <guohanjun@huawei.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Usyskin <alexander.usyskin@intel.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Breno Leitao <leitao@debian.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
James Morse <james.morse@arm.com>,
Paolo Abeni <pabeni@redhat.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Dave Penkler <dpenkler@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Dan Williams <djbw@kernel.org>,
Mukesh Rathor <mrathor@linux.microsoft.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Alexandra Winter <wintera@linux.ibm.com>,
Julian Braha <julianbraha@gmail.com>,
Karthikeyan KS <karthiproffesional@gmail.com>,
Pengpeng Hou <pengpeng@iscas.ac.cn>,
openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org
Subject: Re: [PATCH v2 4/4] uart-routing: Add UART Routing driver for StarFive JHB100 SoC
Date: Sat, 5 Sep 2026 22:12:43 -0700 [thread overview]
Message-ID: <6168d40d-b781-4abb-9be8-ecb25b7688d5@infradead.org> (raw)
In-Reply-To: <20260905102901.126035-5-changhuang.liang@starfivetech.com>
Hi,
On 9/5/26 3:29 AM, Changhuang Liang wrote:
> Add driver support for JHB100 UART Routing control, allowing runtime
> configuration of RX muxes between UART controllers and I/O pins.
>
> A sysfs interface is provided for easy checking and updating of routing
> paths.
>
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> ---
> .../sysfs-driver-starfive-uart-routing | 45 ++++
> MAINTAINERS | 8 +
> drivers/uart-routing/Kconfig | 13 ++
> drivers/uart-routing/Makefile | 1 +
> drivers/uart-routing/starfive-uart-routing.c | 192 ++++++++++++++++++
> 5 files changed, 259 insertions(+)
> create mode 100644 Documentation/ABI/testing/sysfs-driver-starfive-uart-routing
> create mode 100644 drivers/uart-routing/starfive-uart-routing.c
>
> diff --git a/Documentation/ABI/testing/sysfs-driver-starfive-uart-routing b/Documentation/ABI/testing/sysfs-driver-starfive-uart-routing
> new file mode 100644
> index 000000000000..737afdf428bc
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-driver-starfive-uart-routing
> @@ -0,0 +1,45 @@
> +What: /sys/bus/platform/drivers/starfive-uart-routing/\*/uart\*
> +Date: August 2026
> +Contact: Changhuang Liang <changhuang.liang@starfivetech.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/starfive-uart-routing/\*.uart-routing/uart1
> + io0 [io1] io2 io3 io4 io5 io6 io7 io8 io9 io10 io11 io12 io13 io14 uart0 uart1
> + uart2 uart3 uart4 uart5 uart6 uart7 uart8 uart9 uart10 uart11 uart12 uart13 uart14
> +
> + In this case, UART1 gets its input from IO1 (physical serial port 1).
> +
> + To switch the RX source of UART1 to UART2, write the desired source to the file:
> + echo uart2 > /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/uart1
> +
> + This indicates that UART1 now receives its input from UART2.
> +
> +Users: OpenBMC. Proposed changes should be mailed to
> + openbmc@lists.ozlabs.org
> +
> +What: /sys/bus/platform/drivers/starfive-uart-routing/\*/io\*
> +Date: August 2026
> +Contact: Changhuang Liang <changhuang.liang@starfivetech.com>
> +Description: Selects the RX source of IOx serial port. The current selection
> + will be marked by brackets "[]". The list of available options
> + depends on the selected file.
> +
> + e.g.
> + cat /sys/bus/platform/drivers/starfive-uart-routing/\*.uart-routing/io9
> + uart0 uart1 uart2 uart3 uart4 uart5 uart6 uart7 uart8 [uart9] uart10 uart11 uart12
> + uart13 uart14 io0 io1 io2 io3 io4 io5 io6 io7 io8 io9 io10 io11 io12 io13 io14
> +
> + In this case, IO9 (physical serial port 9) gets its input from UART9.
> +
> + To switch the RX source of IO9 to UART10, write the desired source to the file:
> + echo uart10 > /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/io9
> +
> + This indicates that IO9 now receives its input from UART10.
> +
> +Users: OpenBMC. Proposed changes should be mailed to
> + openbmc@lists.ozlabs.org
Please consider the following changes to this ABI file documentation
(or make your own).
---
Avoid 'make htmldocs' warnings (from docutils) and
make console input or output be presented more clearly and
in a monospace font.
Documentation/ABI/testing/sysfs-driver-starfive-uart-routing:25: WARNING: Inline emphasis start-string without end-string. [docutils]
Documentation/ABI/testing/sysfs-driver-starfive-uart-routing:1: WARNING: Inline emphasis start-string without end-string. [docutils]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Documentation/ABI/testing/sysfs-driver-starfive-uart-routing | 32 +++++-----
1 file changed, 18 insertions(+), 14 deletions(-)
--- linux-next-20260902.orig/Documentation/ABI/testing/sysfs-driver-starfive-uart-routing
+++ linux-next-20260902/Documentation/ABI/testing/sysfs-driver-starfive-uart-routing
@@ -1,4 +1,4 @@
-What: /sys/bus/platform/drivers/starfive-uart-routing/\*/uart\*
+What: /sys/bus/platform/drivers/starfive-uart-routing/*/uart*
Date: August 2026
Contact: Changhuang Liang <changhuang.liang@starfivetech.com>
Description: Selects the RX source of the UARTx device.
@@ -7,37 +7,41 @@ Description: Selects the RX source of th
selected option marked by brackets "[]". The list of available options
depends on the selected file.
- e.g.
- cat /sys/bus/platform/drivers/starfive-uart-routing/\*.uart-routing/uart1
- io0 [io1] io2 io3 io4 io5 io6 io7 io8 io9 io10 io11 io12 io13 io14 uart0 uart1
- uart2 uart3 uart4 uart5 uart6 uart7 uart8 uart9 uart10 uart11 uart12 uart13 uart14
+ E.g.::
+
+ cat /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/uart1
+ io0 [io1] io2 io3 io4 io5 io6 io7 io8 io9 io10 io11 io12 io13 io14 uart0 uart1
+ uart2 uart3 uart4 uart5 uart6 uart7 uart8 uart9 uart10 uart11 uart12 uart13 uart14
In this case, UART1 gets its input from IO1 (physical serial port 1).
- To switch the RX source of UART1 to UART2, write the desired source to the file:
- echo uart2 > /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/uart1
+ To switch the RX source of UART1 to UART2, write the desired source to the file::
+
+ echo uart2 > /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/uart1
This indicates that UART1 now receives its input from UART2.
Users: OpenBMC. Proposed changes should be mailed to
openbmc@lists.ozlabs.org
-What: /sys/bus/platform/drivers/starfive-uart-routing/\*/io\*
+What: /sys/bus/platform/drivers/starfive-uart-routing/*/io*
Date: August 2026
Contact: Changhuang Liang <changhuang.liang@starfivetech.com>
Description: Selects the RX source of IOx serial port. The current selection
will be marked by brackets "[]". The list of available options
depends on the selected file.
- e.g.
- cat /sys/bus/platform/drivers/starfive-uart-routing/\*.uart-routing/io9
- uart0 uart1 uart2 uart3 uart4 uart5 uart6 uart7 uart8 [uart9] uart10 uart11 uart12
- uart13 uart14 io0 io1 io2 io3 io4 io5 io6 io7 io8 io9 io10 io11 io12 io13 io14
+ E.g.::
+
+ cat /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/io9
+ uart0 uart1 uart2 uart3 uart4 uart5 uart6 uart7 uart8 [uart9] uart10 uart11 uart12
+ uart13 uart14 io0 io1 io2 io3 io4 io5 io6 io7 io8 io9 io10 io11 io12 io13 io14
In this case, IO9 (physical serial port 9) gets its input from UART9.
- To switch the RX source of IO9 to UART10, write the desired source to the file:
- echo uart10 > /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/io9
+ To switch the RX source of IO9 to UART10, write the desired source to the file::
+
+ echo uart10 > /sys/bus/platform/drivers/starfive-uart-routing/*.uart-routing/io9
This indicates that IO9 now receives its input from UART10.
--
~Randy
prev parent reply other threads:[~2026-09-06 5:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 10:28 [PATCH v2 0/4] Add support for StarFive JHB100 UART Routing Changhuang Liang
2026-09-05 10:28 ` [PATCH v2 1/4] uart-routing: Add common UART routing framework Changhuang Liang
2026-09-05 12:30 ` Julian Braha
2026-09-05 10:28 ` [PATCH v2 2/4] soc: aspeed: Move UART routing driver to drivers/uart-routing Changhuang Liang
2026-09-05 10:29 ` [PATCH v2 3/4] dt-bindings: uart-routing: Add binding for StarFive JHB100 UART routing Changhuang Liang
2026-09-05 10:29 ` [PATCH v2 4/4] uart-routing: Add UART Routing driver for StarFive JHB100 SoC Changhuang Liang
2026-09-06 5:12 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6168d40d-b781-4abb-9be8-ecb25b7688d5@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.usyskin@intel.com \
--cc=andrew@codeconstruct.com.au \
--cc=changhuang.liang@starfivetech.com \
--cc=chiawei_wang@aspeedtech.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=djbw@kernel.org \
--cc=dpenkler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=guohanjun@huawei.com \
--cc=james.morse@arm.com \
--cc=jani.nikula@intel.com \
--cc=jgg@ziepe.ca \
--cc=jic23@kernel.org \
--cc=joel@jms.id.au \
--cc=julianbraha@gmail.com \
--cc=karthiproffesional@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lubvital@gmail.com \
--cc=mrathor@linux.microsoft.com \
--cc=openbmc@lists.ozlabs.org \
--cc=osk@google.com \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=pengpeng@iscas.ac.cn \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=stephen@networkplumber.org \
--cc=vladimir.oltean@nxp.com \
--cc=wintera@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox