[RFC PATCH v2 00/17] Linux SBI MPXY and RPMI drivers

From: Anup Patel
Date: Mon Feb 03 2025 - 03:49:36 EST


The SBI v3.0 MPXY extension [1] and RPMI v1.0 [2] specifications are
in stable state and under ARC review at the RISC-V International so
as part of the RVI process we would like to receive an early feedback
on the device tree bindings and mailbox drivers hence this series.

Currently, most of the RPMI and MPXY drivers are in OpenSBI whereas
for Linux only has SBI MPXY mailbox controller driver, RPMI clock
driver.and RPMI system MSI driver This series also includes ACPI
support for SBI MPXY mailbox controller and RPMI system MSI drivers.

These patches can be found in the riscv_sbi_mpxy_mailbox_v2 branch at:
https://github.com/avpatel/linux.git

To test these patches, boot Linux on "virt,rpmi=on,aia=aplic-imsic"
machine with OpenSBI and QEMU from the dev-upstream QEMU branch at:
https://github.com/ventanamicro/opensbi.git
https://github.com/ventanamicro/qemu.git

[1] https://github.com/riscv-non-isa/riscv-sbi-doc/releases
[2] https://github.com/riscv-non-isa/riscv-rpmi/releases

Changes since v1:
- Addressed DT bindings related comments in PATCH2, PATCH3, and
PATCH7 of v1 series
- Addressed comments in PATCH6 and PATCH8 of v1 series
- New PATCH6 in v2 series to allow fwnode based mailbox channel
request
- New PATCH10 and PATCH11 to add RPMI system MSI based interrupt
controller driver
- New PATCH12 to PATCH16 which adds ACPI support in SBI MPXY
mailbox driver and RPMI system MSI driver
- New PATCH17 to enable required kconfig option to allow graceful
shutdown on QEMU virt machine

Anup Patel (11):
riscv: Add new error codes defined by SBI v3.0
dt-bindings: mailbox: Add bindings for RPMI shared memory transport
dt-bindings: mailbox: Add bindings for RISC-V SBI MPXY extension
RISC-V: Add defines for the SBI message proxy extension
mailbox: Add common header for RPMI messages sent via mailbox
mailbox: Allow controller specific mapping using fwnode
mailbox: Add RISC-V SBI message proxy (MPXY) based mailbox driver
dt-bindings: clock: Add bindings for RISC-V RPMI clock service group
dt-bindings: interrupt-controller: Add bindings for RISC-V RPMI system
MSI
irqchip: Add driver for the RISC-V RPMI system MSI service group
RISC-V: Enable GPIO keyboard and event device in RV64 defconfig

Rahul Pathak (1):
clk: Add clock driver for the RISC-V RPMI clock service group

Sunil V L (5):
ACPI: property: Add support for nargs_prop in
acpi_fwnode_get_reference_args()
ACPI: scan: Update honor list for RPMI System MSI
ACPI: RISC-V: Add RPMI System MSI to GSI mapping
mailbox/riscv-sbi-mpxy: Add ACPI support
irqchip/riscv-rpmi-sysmsi: Add ACPI support

.../bindings/clock/riscv,rpmi-clock.yaml | 77 ++
.../riscv,rpmi-system-msi.yaml | 89 ++
.../mailbox/riscv,rpmi-shmem-mbox.yaml | 150 +++
.../bindings/mailbox/riscv,sbi-mpxy-mbox.yaml | 54 +
arch/riscv/configs/defconfig | 2 +
arch/riscv/include/asm/irq.h | 1 +
arch/riscv/include/asm/sbi.h | 70 ++
drivers/acpi/property.c | 15 +-
drivers/acpi/riscv/irq.c | 33 +
drivers/acpi/scan.c | 2 +
drivers/clk/Kconfig | 8 +
drivers/clk/Makefile | 1 +
drivers/clk/clk-rpmi.c | 601 ++++++++++
drivers/gpio/gpiolib-acpi.c | 2 +-
drivers/irqchip/Kconfig | 7 +
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irq-riscv-rpmi-sysmsi.c | 315 +++++
drivers/mailbox/Kconfig | 11 +
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 44 +-
drivers/mailbox/riscv-sbi-mpxy-mbox.c | 1027 +++++++++++++++++
drivers/pwm/core.c | 2 +-
include/linux/acpi.h | 12 +-
include/linux/mailbox/riscv-rpmi-message.h | 235 ++++
include/linux/mailbox_controller.h | 3 +
25 files changed, 2737 insertions(+), 27 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/riscv,rpmi-clock.yaml
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,rpmi-system-msi.yaml
create mode 100644 Documentation/devicetree/bindings/mailbox/riscv,rpmi-shmem-mbox.yaml
create mode 100644 Documentation/devicetree/bindings/mailbox/riscv,sbi-mpxy-mbox.yaml
create mode 100644 drivers/clk/clk-rpmi.c
create mode 100644 drivers/irqchip/irq-riscv-rpmi-sysmsi.c
create mode 100644 drivers/mailbox/riscv-sbi-mpxy-mbox.c
create mode 100644 include/linux/mailbox/riscv-rpmi-message.h

--
2.43.0