All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/13] riscv: add initial Zhihe A210 support using SCMI clocks and resets
@ 2026-11-20 19:15 ` Han Gao via B4 Relay
  0 siblings, 0 replies; 54+ messages in thread
From: Han Gao @ 2026-11-20 19:15 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	Zhiguo Zhu, Jassi Brar, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Thomas Gleixner, Radu Rendec, Samuel Holland,
	Daniel Lezcano, Anup Patel, Greg Kroah-Hartman, Jiri Slaby,
	Michal Simek, Drew Fustini, Icenowy Zheng, Inochi Amaoto,
	Vivian Wang, Yao Zi, Jiaxun Yang
  Cc: linux-riscv, linux-kernel, devicetree, Paul Walmsley,
	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. [1] explains why I picked SCMI over
RPMI.

The series adds the mailbox, the UARTs and their bindings and DTs. It
depends on the arm_scmi Kconfig patch [2] and the pin controller
series [3], both in linux-next. On v7.4-rc3 with the riscv defconfig,
a Melon Pi V2 boots to a shell on the serial console with all eight
CPUs online.

Conor asked about vendor firmware. Zhihe has agreed to use SCMI.
Optional native clock and reset drivers will be sent separately and
need no change to this series.

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

[1] https://lore.kernel.org/r/20261027-a210-scmi-v1-0-74d58ce85bd8@iscas.ac.cn
[2] https://lore.kernel.org/r/20261107-arm-scmi-arch-dep-v1-1-514872e8ede4@iscas.ac.cn
[3] https://lore.kernel.org/r/20261107-a210-pinctrl-v1-0-6ddedfb0b76b@iscas.ac.cn
[4] https://github.com/RevySR/zephyr/tree/xuantie/scmi-v3
[5] https://github.com/revyos/coreboot/tree/a210/scmi-v3
[6] https://github.com/revyos/opensbi/tree/a210/scmi-v3
[7] https://github.com/revyos/edk2/tree/a210/scmi-v3
[8] https://github.com/revyos/ruyiedk2/tree/a210/scmi-v3
[9] https://github.com/RevySR/linux/tree/a210/scmi-v4

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
Changes in v4:
- Rebase on v7.4-rc3.
- Drop the RFC prefix: Zhihe has agreed to use SCMI (Conor).
- Split off the arm_scmi patch (Michal) and the vendor prefix and pin
  controller patches (Conor) [2][3]. Both are in linux-next.
- Link to v3: https://patch.msgid.link/20261103-a210-scmi-v3-0-ee6b31580808@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 (8):
      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 (5):
      riscv: add Zhihe 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 +++
 Documentation/devicetree/bindings/riscv/zhihe.yaml |  27 +
 .../bindings/serial/snps-dw-apb-uart.yaml          |   6 +-
 .../devicetree/bindings/timer/sifive,clint.yaml    |   1 +
 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/mailbox/Kconfig                            |   9 +
 drivers/mailbox/Makefile                           |   2 +
 drivers/mailbox/mailbox-a210.c                     | 176 ++++++
 20 files changed, 1025 insertions(+), 1 deletion(-)
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261027-a210-scmi-ec32fdc246a6
prerequisite-change-id: 20261107-arm-scmi-arch-dep-96a99b32bcca:v1
prerequisite-patch-id: 981f1fd764edde0f9902e6becb276d211172265b
prerequisite-change-id: 20261107-a210-pinctrl-23807183ff68:v1
prerequisite-patch-id: dfda8df6ef73c046f82e5ef8e0c3067d297be8e9
prerequisite-patch-id: ac6f52bb69590d699edb945066f9f8834346ffcd
prerequisite-patch-id: 3dfa6ab6be440f78dceaf873a9e79782872e0265

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


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

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

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 19:15 [PATCH v4 00/13] riscv: add initial Zhihe A210 support using SCMI clocks and resets Han Gao
2026-11-20 19:15 ` Han Gao via B4 Relay
2026-11-20 19:15 ` Han Gao via B4 Relay
2026-11-20 19:15 ` [PATCH v4 01/13] riscv: add Zhihe A210 support Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:20   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 02/13] dt-bindings: mailbox: add Zhihe A210 AP to E902 mailbox Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:19   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 03/13] mailbox: add Zhihe A210 AP to E902 mailbox driver Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:21   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 04/13] dt-bindings: interrupt-controller: add Zhihe A210 PLIC Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:18   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 05/13] dt-bindings: riscv: add Melon Pi V1 and V2 Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:19   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 06/13] dt-bindings: timer: add Zhihe A210 CLINT Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:18   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 07/13] dt-bindings: serial: snps-dw-apb-uart: add Zhihe A210 UART Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:18   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 08/13] riscv: dts: zhihe: add A210 core support Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:21   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 09/13] riscv: dts: zhihe: add A210 UARTs Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:19   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 10/13] riscv: dts: zhihe: add A210 module memory Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:19   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 11/13] riscv: dts: zhihe: add Melon Pi V1 and V2 Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:20   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 12/13] riscv: defconfig: enable A210 support Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:21   ` sashiko-bot
2026-11-20 19:15 ` [PATCH v4 13/13] MAINTAINERS: add Zhihe A210 Han Gao
2026-11-20 19:15   ` Han Gao via B4 Relay
2026-11-20 19:15   ` Han Gao via B4 Relay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.