mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/4] Add support for StarFive JHB100 UART Routing
@ 2026-10-19 10:06 Changhuang Liang
  2026-10-19 10:06 ` [PATCH v4 1/4] uart-routing: Add common UART routing framework Changhuang Liang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Changhuang Liang @ 2026-10-19 10:06 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet,
	Joel Stanley, Andrew Jeffery, Chia-Wei Wang, Oskar Senft,
	Greg Kroah-Hartman
  Cc: Changhuang Liang, Shuah Khan, Jani Nikula, Vitaly Lubart,
	Hanjun Guo, Andrew Morton, Alexander Usyskin, Jason Gunthorpe,
	Breno Leitao, Philipp Zabel, James Morse, Paolo Abeni,
	Stephen Hemminger, Dave Penkler, Jakub Kicinski,
	Jonathan Cameron, Dan Williams, Mukesh Rathor, Vladimir Oltean,
	Alexandra Winter, Julian Braha, Karthikeyan KS, Pengpeng Hou,
	openbmc, linux-kernel, devicetree, linux-doc, linux-arm-kernel,
	linux-aspeed

Currently, since Aspeed also has a similar driver, there is some code
with identical structures on both sides, but a common framework is
lacking. Therefore, this series introduces a generic UART routing
framework. It also moves aspeed-uart-routing.c under this generic
framework and makes it use the interfaces provided by the generic
framework. At the same time, StarFive also registers its own driver
based on this generic framework.

StarFive JHB100 UART Routing allows dynamic routing of inputs between
built-in UARTs and physical serial I/O ports, enabling use cases such
as Host <-> BMC communication via UARTs.

This series has been tested on the EVB1 board.

changes since v3:

PATCH 1:
- Use dev_get/set_drvdata() to obtain struct uart_routing * to avoid
  null-ptr-deref issues.
- Update uart-routing.rst: since dev_set_drvdata() is now used by the
  framework, remind the SoC driver side not to use dev_set_drvdata().

PATCH 3:
- Add Rob's "Reviewed-by" tag.

v3: https://lore.kernel.org/all/20260925050947.9900-1-changhuang.liang@starfivetech.com/
v2: https://lore.kernel.org/all/20260905102901.126035-1-changhuang.liang@starfivetech.com/
v1: https://lore.kernel.org/all/20260830065118.51551-1-changhuang.liang@starfivetech.com/

Changhuang Liang (4):
  uart-routing: Add common UART routing framework
  soc: aspeed: Move UART routing driver to drivers/uart-routing
  dt-bindings: soc: starfive: Add StarFive JHB100 UART routing
  uart-routing: Add UART Routing driver for StarFive JHB100 SoC

 .../sysfs-driver-starfive-uart-routing        |  49 ++
 .../soc/starfive/starfive,uart-routing.yaml   |  46 ++
 Documentation/driver-api/index.rst            |   1 +
 Documentation/driver-api/uart-routing.rst     | 144 +++++
 MAINTAINERS                                   |  25 +
 drivers/Kconfig                               |   2 +
 drivers/Makefile                              |   1 +
 drivers/soc/aspeed/Kconfig                    |  10 -
 drivers/soc/aspeed/Makefile                   |   1 -
 drivers/soc/aspeed/aspeed-uart-routing.c      | 601 ------------------
 drivers/uart-routing/Kconfig                  |  45 ++
 drivers/uart-routing/Makefile                 |   5 +
 drivers/uart-routing/aspeed-uart-routing.c    | 415 ++++++++++++
 drivers/uart-routing/starfive-uart-routing.c  | 192 ++++++
 drivers/uart-routing/uart-routing.c           | 183 ++++++
 drivers/uart-routing/uart-routing.h           |  84 +++
 16 files changed, 1192 insertions(+), 612 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-starfive-uart-routing
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,uart-routing.yaml
 create mode 100644 Documentation/driver-api/uart-routing.rst
 delete mode 100644 drivers/soc/aspeed/aspeed-uart-routing.c
 create mode 100644 drivers/uart-routing/Kconfig
 create mode 100644 drivers/uart-routing/Makefile
 create mode 100644 drivers/uart-routing/aspeed-uart-routing.c
 create mode 100644 drivers/uart-routing/starfive-uart-routing.c
 create mode 100644 drivers/uart-routing/uart-routing.c
 create mode 100644 drivers/uart-routing/uart-routing.h

--
2.25.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-19 11:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 10:06 [PATCH v4 0/4] Add support for StarFive JHB100 UART Routing Changhuang Liang
2026-10-19 10:06 ` [PATCH v4 1/4] uart-routing: Add common UART routing framework Changhuang Liang
2026-10-19 10:06 ` [PATCH v4 2/4] soc: aspeed: Move UART routing driver to drivers/uart-routing Changhuang Liang
2026-10-19 10:06 ` [PATCH v4 3/4] dt-bindings: soc: starfive: Add StarFive JHB100 UART routing Changhuang Liang
2026-10-19 10:06 ` [PATCH v4 4/4] uart-routing: Add UART Routing driver for StarFive JHB100 SoC Changhuang Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®