mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC 00/18] riscv: add initial Zhihe A210 support using SCMI clocks and resets
@ 2026-10-27 15:36 Han Gao via B4 Relay
  2026-10-27 15:36 ` [PATCH RFC 01/18] firmware: arm_scmi: Allow SCMI transports on RISC-V Han Gao via B4 Relay
                   ` (18 more replies)
  0 siblings, 19 replies; 23+ messages in thread
From: Han Gao via B4 Relay @ 2026-10-27 15:36 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Zhiguo Zhu, Jassi Brar, Linus Walleij,
	Bartosz Golaszewski, Philipp Zabel, Thomas Gleixner, Radu Rendec,
	Samuel Holland, Daniel Lezcano, Anup Patel, Stephen Boyd,
	Brian Masney, Jerome Brunet, Greg Kroah-Hartman, Jiri Slaby,
	Drew Fustini, Icenowy Zheng, Inochi Amaoto, Vivian Wang, Yao Zi,
	Jiaxun Yang
  Cc: arm-scmi, linux-arm-kernel, linux-kernel, devicetree,
	linux-riscv, linux-gpio, Paul Walmsley, linux-clk, linux-serial,
	Han Gao

This adds initial support for the Zhihe A210 SoC and the Melon Pi V1
and V2 boards. It replaces the earlier series [1]. The way clocks and
resets are handled changed completely, so I am posting it as a new RFC
rather than as v2.

The A210 has eight RISC-V cores in two clusters, four C908 and four
C920, plus an E902 management core. In [1] Linux drove the clock and
reset registers directly. Review pointed out that those blocks were not
modelled properly, and they are also used by the E902 firmware, which
owns the power, PMIC and CPU DVFS sequencing. This series leaves those
registers to the firmware and uses the standard SCMI clock and reset
protocols instead.

I also looked at RPMI before settling on SCMI. The firmware has to
provide reset domains for the UARTs and pad controllers and sensors for
thermal management, and RPMI has no ratified protocol for either yet.
SCMI covers everything the firmware exposes today: clock, reset, power
domain, performance, voltage, sensor and system power. Linux, U-Boot
and EDK2 already have SCMI clients, so on the Linux side only the
mailbox transport is new. RPMI support in U-Boot is also still being
debated [8].

The SCMI related changes compared to [1]:

- The native clock and reset drivers and their bindings are gone.
- A new mailbox driver for the AP to E902 doorbell. One channel carries
  SCMI requests, the other carries notifications from the firmware. The
  shared memory lives in the AON SRAM.
- arm_scmi transports can be built on RISC-V.
- New dt-bindings headers for the SCMI clock and reset IDs exported by
  the firmware. Only the IDs used here are defined for now. More will
  be appended later without renumbering the existing ones.
- Each UART has separate APB and serial resets, so the UARTs get a
  "zhihe,a210-uart" compatible with two resets, as Philipp suggested.
- The pin controllers take their pad resets from SCMI.

Other changes since [1]: the pinctrl binding explains the SDIO pad names
and the shared SDIO mux bit, pin nodes are ordered as pins, function,
then configuration, and the defconfig commit explains why ten 8250
ports are needed.

The series covers the mailbox, the pin controller, the UARTs and the
bindings and device trees around them. It is based on v7.3 and boots on
a Melon Pi V2 to a shell on the UART console with all eight CPUs online.
I would mostly like feedback on the SCMI approach and the ID headers
before sending the rest of the platform.

The E902 firmware is a Zephyr based SCMI server [2]. The rest of the
boot chain is coreboot [3], OpenSBI [4] and EDK2 [5][6]. The complete
Linux tree with the remaining peripherals is at [7].

[1] https://lore.kernel.org/r/20261022-a210-init-v1-0-5e438f972d24@iscas.ac.cn
[2] https://github.com/RevySR/zephyr/tree/xuantie/scmi
[3] https://github.com/revyos/coreboot/tree/a210/scmi
[4] https://github.com/revyos/opensbi/tree/a210/scmi
[5] https://github.com/revyos/edk2/tree/a210/scmi
[6] https://github.com/revyos/ruyiedk2/tree/a210/scmi
[7] https://github.com/RevySR/linux/tree/a210/scmi-bootchain-v7.3
[8] https://lists.u-boot-project.org/pipermail/u-boot/2026-October/635007.html

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
Han Gao (10):
      firmware: arm_scmi: Allow SCMI transports on RISC-V
      dt-bindings: mailbox: add the A210 AP to E902 doorbell
      mailbox: add A210 AP to E902 doorbell support
      dt-bindings: timer: add Zhihe A210 CLINT
      dt-bindings: firmware: add A210 SCMI clock and reset IDs
      dt-bindings: serial: snps-dw-apb-uart: add Zhihe A210 UART
      riscv: dts: zhihe: add A210 module memory
      riscv: dts: zhihe: add Melon Pi V1 and V2
      riscv: defconfig: enable A210 support
      MAINTAINERS: add Zhihe A210

Zhiguo Zhu (8):
      dt-bindings: vendor-prefixes: add Zhihe
      riscv: add Zhihe A210 support
      dt-bindings: pinctrl: add Zhihe A210 pin controller
      pinctrl: zhihe: add A210 support
      dt-bindings: interrupt-controller: add Zhihe A210 PLIC
      dt-bindings: riscv: add Melon Pi V1 and V2
      riscv: dts: zhihe: add A210 core support
      riscv: dts: zhihe: add A210 UARTs

 .../interrupt-controller/sifive,plic-1.0.0.yaml    |    1 +
 .../bindings/mailbox/zhihe,a210-ap-mailbox.yaml    |   76 ++
 .../bindings/pinctrl/zhihe,a210-pinctrl.yaml       |  211 ++++
 Documentation/devicetree/bindings/riscv/zhihe.yaml |   27 +
 .../bindings/serial/snps-dw-apb-uart.yaml          |    5 +-
 .../devicetree/bindings/timer/sifive,clint.yaml    |    1 +
 .../devicetree/bindings/vendor-prefixes.yaml       |    2 +
 MAINTAINERS                                        |   14 +
 arch/riscv/Kconfig.socs                            |   10 +
 arch/riscv/boot/dts/Makefile                       |    1 +
 arch/riscv/boot/dts/zhihe/Makefile                 |    2 +
 arch/riscv/boot/dts/zhihe/a210-melonpi-common.dtsi |   55 +
 arch/riscv/boot/dts/zhihe/a210-melonpi-v1.dts      |    9 +
 arch/riscv/boot/dts/zhihe/a210-melonpi-v2.dts      |    9 +
 arch/riscv/boot/dts/zhihe/a210-som.dtsi            |   11 +
 arch/riscv/boot/dts/zhihe/a210.dtsi                |  619 ++++++++++
 arch/riscv/configs/defconfig                       |   10 +
 drivers/firmware/arm_scmi/Kconfig                  |    2 +-
 drivers/mailbox/Kconfig                            |    9 +
 drivers/mailbox/Makefile                           |    2 +
 drivers/mailbox/mailbox-a210.c                     |  205 ++++
 drivers/pinctrl/Kconfig                            |   14 +
 drivers/pinctrl/Makefile                           |    1 +
 drivers/pinctrl/pinctrl-a210.c                     | 1212 ++++++++++++++++++++
 include/dt-bindings/clock/zhihe,a210-scmi.h        |   15 +
 include/dt-bindings/reset/zhihe,a210-scmi.h        |   13 +
 26 files changed, 2534 insertions(+), 2 deletions(-)
---
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
change-id: 20261027-a210-scmi-ec32fdc246a6

Best regards,
--  
Han Gao <gaohan@iscas.ac.cn>



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

end of thread, other threads:[~2026-10-28  8:56 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 15:36 [PATCH RFC 00/18] riscv: add initial Zhihe A210 support using SCMI clocks and resets Han Gao via B4 Relay
2026-10-27 15:36 ` [PATCH RFC 01/18] firmware: arm_scmi: Allow SCMI transports on RISC-V Han Gao via B4 Relay
2026-10-27 15:51   ` Michal Simek
2026-10-27 16:18     ` Sudeep Holla
2026-10-27 15:36 ` [PATCH RFC 02/18] dt-bindings: vendor-prefixes: add Zhihe Han Gao via B4 Relay
2026-10-27 15:36 ` [PATCH RFC 03/18] riscv: add Zhihe A210 support Han Gao via B4 Relay
2026-10-27 15:36 ` [PATCH RFC 04/18] dt-bindings: mailbox: add the A210 AP to E902 doorbell Han Gao via B4 Relay
2026-10-27 15:36 ` [PATCH RFC 05/18] mailbox: add A210 AP to E902 doorbell support Han Gao via B4 Relay
2026-10-27 15:36 ` [PATCH RFC 06/18] dt-bindings: pinctrl: add Zhihe A210 pin controller Han Gao via B4 Relay
2026-10-27 15:36 ` [PATCH RFC 07/18] pinctrl: zhihe: add A210 support Han Gao via B4 Relay
2026-10-28  7:17   ` Uwe Kleine-König
2026-10-27 15:36 ` [PATCH RFC 08/18] dt-bindings: interrupt-controller: add Zhihe A210 PLIC Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 09/18] dt-bindings: riscv: add Melon Pi V1 and V2 Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 10/18] dt-bindings: timer: add Zhihe A210 CLINT Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 11/18] dt-bindings: firmware: add A210 SCMI clock and reset IDs Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 12/18] dt-bindings: serial: snps-dw-apb-uart: add Zhihe A210 UART Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 13/18] riscv: dts: zhihe: add A210 core support Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 14/18] riscv: dts: zhihe: add A210 UARTs Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 15/18] riscv: dts: zhihe: add A210 module memory Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 16/18] riscv: dts: zhihe: add Melon Pi V1 and V2 Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 17/18] riscv: defconfig: enable A210 support Han Gao via B4 Relay
2026-10-27 15:37 ` [PATCH RFC 18/18] MAINTAINERS: add Zhihe A210 Han Gao via B4 Relay
2026-10-28  8:56 ` [PATCH RFC 00/18] riscv: add initial Zhihe A210 support using SCMI clocks and resets Bartosz Golaszewski

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®