Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH RFC v3 00/17] riscv: add initial Zhihe A210 support using SCMI clocks and resets
@ 2026-11-02 19:45 Han Gao via B4 Relay
  2026-11-02 19:45 ` [PATCH RFC v3 01/17] firmware: arm_scmi: Drop the ARM architecture dependency Han Gao via B4 Relay
                   ` (16 more replies)
  0 siblings, 17 replies; 34+ messages in thread
From: Han Gao via B4 Relay @ 2026-11-02 19:45 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Michal Simek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti, Zhiguo Zhu, Jassi Brar, Linus Walleij,
	Uwe Kleine-König, 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,
	Han Gao, Conor Dooley

This adds initial support for the Zhihe A210 SoC and the Melon Pi V1
and V2 boards.

The A210 has four C908V and four C920V2 cores, plus an E902 management
core. The E902 firmware handles clocks, resets, power, the PMIC and
CPU DVFS, so Linux uses SCMI for clocks and resets. The only new SCMI
piece is the mailbox to the E902. [2] explains why I picked SCMI over
RPMI.

The series adds the mailbox, the pin controller, the UARTs and their
bindings and DTs. On v7.4-rc1 with the riscv defconfig, a Melon Pi V2
boots to a shell on the serial console with all eight CPUs online.

The numbering follows [1], as Bartosz asked, so the RFC [2] is v2 and
this is v3.

Conor asked about vendor firmware. We are talking to Zhihe about SCMI
support in their firmware. Until that is settled, mainline needs the
firmware below, so this is still an RFC.

The E902 runs a Zephyr based SCMI server [3]. The rest of the boot
chain is coreboot [4], OpenSBI [5] and EDK2 [6][7]. The full Linux tree
with the other peripherals is at [8].

[1] https://lore.kernel.org/r/20261022-a210-init-v1-0-5e438f972d24@iscas.ac.cn
[2] https://lore.kernel.org/r/20261027-a210-scmi-v1-0-74d58ce85bd8@iscas.ac.cn
[3] https://github.com/RevySR/zephyr/tree/xuantie/scmi-v3
[4] https://github.com/revyos/coreboot/tree/a210/scmi-v3
[5] https://github.com/revyos/opensbi/tree/a210/scmi-v3
[6] https://github.com/revyos/edk2/tree/a210/scmi-v3
[7] https://github.com/revyos/ruyiedk2/tree/a210/scmi-v3
[8] https://github.com/RevySR/linux/tree/a210/scmi-v3

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
Changes in v3:
- Rebase on v7.4-rc1, and add zhihe,a210-uart to the list of DW APB
  UARTs with two resets.
- arm_scmi: drop the ARM dependency instead of adding RISCV (Michal).
  Build tested on x86_64 without OF, i386, loongarch64, ppc64le and
  riscv64 (Sudeep).
- Move the SCMI clock and reset IDs from dt-bindings to headers next
  to the DTS, as the firmware assigns them (Conor).
- mailbox binding: use fixed "local" and "remote" regions and add blank
  lines between properties (Conor). Drop the clocks, as the firmware
  keeps the mailboxes running, and call it a mailbox, not a doorbell.
- mailbox driver: don't request a shared interrupt.
- pinctrl: rename to pinctrl-zhihe-a210.c and PINCTRL_ZHIHE_A210, drop
  the 64BIT dependency and a forward declaration, comment the register
  layout and the ____ placeholder, and round drive strength up (Linus).
  Don't include mod_devicetable.h (Uwe).
- pinctrl: drop PERI3. It comes back with the SDIO controller, as pins
  and function, with the shared mux handled in the driver (Conor).
- pinctrl: use one function name per kind, like gpio, spi or pwm, and
  number them only where a pad can pick an instance, as for the UARTs
  (Conor).
- pinctrl: use pm_sleep_ptr() instead of #ifdef CONFIG_PM_SLEEP, and
  don't use dev_err_probe() in resume.
- defconfig: drop SRAM, the SCMI mailbox transport and the SCMI reset
  driver. SCMI maps its shared memory itself, and the other two are
  enabled by default with SCMI. Shorten the NR_UARTS explanation.
- dts: use 0x1000 regions for uart0 and uart4, like the other UARTs.
- dts: describe the PLIC M-mode contexts with 11 instead of -1.
- Spell the vendor name Zhihe everywhere.
- Add Conor's acks.
- Link to v2 (sent as RFC): https://patch.msgid.link/20261027-a210-scmi-v1-0-74d58ce85bd8@iscas.ac.cn

Changes in v2 (sent as RFC):
- Replace the native clock and reset drivers with SCMI. Conor pointed
  out that the clock blocks were not modelled right, and the E902
  firmware uses those registers too.
- Add the AP to E902 mailbox driver as the SCMI transport, and allow
  arm_scmi transports on RISC-V.
- Add dt-bindings headers for the SCMI clock and reset IDs.
- Add zhihe,a210-uart with separate APB and serial resets (Philipp).
- pinctrl: take the pad resets from SCMI, explain the SDIO pad names
  and the shared SDIO mux bit, and order pin nodes as pins, function,
  then config (Conor).
- defconfig: explain why SERIAL_8250_NR_UARTS is 10 (Conor).
- Link to v1: https://patch.msgid.link/20261022-a210-init-v1-0-5e438f972d24@iscas.ac.cn

---
Han Gao (9):
      firmware: arm_scmi: Drop the ARM architecture dependency
      dt-bindings: mailbox: add Zhihe A210 AP to E902 mailbox
      mailbox: add Zhihe A210 AP to E902 mailbox driver
      dt-bindings: timer: add Zhihe A210 CLINT
      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    |  67 ++
 .../bindings/pinctrl/zhihe,a210-pinctrl.yaml       | 146 +++
 Documentation/devicetree/bindings/riscv/zhihe.yaml |  27 +
 .../bindings/serial/snps-dw-apb-uart.yaml          |   6 +-
 .../devicetree/bindings/timer/sifive,clint.yaml    |   1 +
 .../devicetree/bindings/vendor-prefixes.yaml       |   2 +
 MAINTAINERS                                        |  12 +
 arch/riscv/Kconfig.socs                            |  10 +
 arch/riscv/boot/dts/Makefile                       |   1 +
 arch/riscv/boot/dts/zhihe/Makefile                 |   2 +
 arch/riscv/boot/dts/zhihe/a210-clock.h             |  15 +
 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-reset.h             |  13 +
 arch/riscv/boot/dts/zhihe/a210-som.dtsi            |  11 +
 arch/riscv/boot/dts/zhihe/a210.dtsi                | 593 ++++++++++++
 arch/riscv/configs/defconfig                       |   7 +
 drivers/firmware/arm_scmi/Kconfig                  |   1 -
 drivers/mailbox/Kconfig                            |   9 +
 drivers/mailbox/Makefile                           |   2 +
 drivers/mailbox/mailbox-a210.c                     | 176 ++++
 drivers/pinctrl/Kconfig                            |  13 +
 drivers/pinctrl/Makefile                           |   1 +
 drivers/pinctrl/pinctrl-zhihe-a210.c               | 996 +++++++++++++++++++++
 26 files changed, 2183 insertions(+), 2 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261027-a210-scmi-ec32fdc246a6

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



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

end of thread, other threads:[~2026-11-02 20:09 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 19:45 [PATCH RFC v3 00/17] riscv: add initial Zhihe A210 support using SCMI clocks and resets Han Gao via B4 Relay
2026-11-02 19:45 ` [PATCH RFC v3 01/17] firmware: arm_scmi: Drop the ARM architecture dependency Han Gao via B4 Relay
2026-11-02 19:55   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 02/17] dt-bindings: vendor-prefixes: add Zhihe Han Gao via B4 Relay
2026-11-02 19:47   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 03/17] riscv: add Zhihe A210 support Han Gao via B4 Relay
2026-11-02 19:50   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 04/17] dt-bindings: mailbox: add Zhihe A210 AP to E902 mailbox Han Gao via B4 Relay
2026-11-02 19:51   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 05/17] mailbox: add Zhihe A210 AP to E902 mailbox driver Han Gao via B4 Relay
2026-11-02 19:57   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 06/17] dt-bindings: pinctrl: add Zhihe A210 pin controller Han Gao via B4 Relay
2026-11-02 19:59   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 07/17] pinctrl: zhihe: add A210 support Han Gao via B4 Relay
2026-11-02 20:04   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 08/17] dt-bindings: interrupt-controller: add Zhihe A210 PLIC Han Gao via B4 Relay
2026-11-02 20:01   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 09/17] dt-bindings: riscv: add Melon Pi V1 and V2 Han Gao via B4 Relay
2026-11-02 20:03   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 10/17] dt-bindings: timer: add Zhihe A210 CLINT Han Gao via B4 Relay
2026-11-02 20:04   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 11/17] dt-bindings: serial: snps-dw-apb-uart: add Zhihe A210 UART Han Gao via B4 Relay
2026-11-02 20:04   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 12/17] riscv: dts: zhihe: add A210 core support Han Gao via B4 Relay
2026-11-02 20:07   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 13/17] riscv: dts: zhihe: add A210 UARTs Han Gao via B4 Relay
2026-11-02 20:06   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 14/17] riscv: dts: zhihe: add A210 module memory Han Gao via B4 Relay
2026-11-02 20:07   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 15/17] riscv: dts: zhihe: add Melon Pi V1 and V2 Han Gao via B4 Relay
2026-11-02 20:08   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 16/17] riscv: defconfig: enable A210 support Han Gao via B4 Relay
2026-11-02 20:09   ` sashiko-bot
2026-11-02 19:45 ` [PATCH RFC v3 17/17] MAINTAINERS: add Zhihe A210 Han Gao via B4 Relay

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