Skip to content

Add support for StarFive JHB100 UART Routing

Changhuang Liang linux-arm-kernel linux-aspeed linux-devicetree linux-doc lkml openbmc 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 3 repliesIn review
  2. v34 patches 1 replySuperseded
  3. v24 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches12 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4uart-routing: Add common UART routing frameworkDocumentation/driver-api/index.rst Documentation/driver-api/uart-routing.rst MAINTAINERS +6 more+440 -00 replies
2/4soc: aspeed: Move UART routing driver to drivers/uart-routingMAINTAINERS drivers/soc/aspeed/Kconfig drivers/soc/aspeed/Makefile +4 more+443 -6122 replies
3/4dt-bindings: soc: starfive: Add StarFive JHB100 UART routingDocumentation/devicetree/bindings/soc/starfive/starfive,uart-routing.yaml+46 -00 replies
4/4uart-routing: Add UART Routing driver for StarFive JHB100 SoCDocumentation/ABI/testing/sysfs-driver-starfive-uart-routing MAINTAINERS drivers/uart-routing/Kconfig +2 more+264 -10 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchRob Herring (Arm)
1/4
2/4
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] Add support for StarFive JHB100 UART Routing

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/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/

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