Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f592540
dt-bindings: mailbox: Add bindings for RPMI shared memory transport
avpatel Aug 18, 2025
c8e765c
dt-bindings: mailbox: Add bindings for RISC-V SBI MPXY extension
avpatel Aug 18, 2025
1af2b1f
RISC-V: Add defines for the SBI message proxy extension
avpatel Aug 18, 2025
f8f38b1
mailbox: Add common header for RPMI messages sent via mailbox
avpatel Aug 18, 2025
4205f04
mailbox: Allow controller specific mapping using fwnode
avpatel Aug 18, 2025
274b08a
byteorder: Add memcpy_to_le32() and memcpy_from_le32()
avpatel Aug 18, 2025
761366d
mailbox: Add RISC-V SBI message proxy (MPXY) based mailbox driver
avpatel Aug 18, 2025
d458be8
dt-bindings: clock: Add RPMI clock service message proxy bindings
avpatel Aug 18, 2025
5a6bb0c
dt-bindings: clock: Add RPMI clock service controller bindings
avpatel Aug 18, 2025
b0bd503
clk: Add clock driver for the RISC-V RPMI clock service group
pathakraul Aug 18, 2025
02c88ed
dt-bindings: Add RPMI system MSI message proxy bindings
avpatel Aug 18, 2025
940d153
dt-bindings: Add RPMI system MSI interrupt controller bindings
avpatel Aug 18, 2025
604090e
irqchip: Add driver for the RPMI system MSI service group
avpatel Aug 18, 2025
c086c54
ACPI: property: Refactor acpi_fwnode_get_reference_args() to support …
vlsunil Aug 18, 2025
67121d8
ACPI: Add support for nargs_prop in acpi_fwnode_get_reference_args()
vlsunil Aug 18, 2025
78e9045
ACPI: scan: Update honor list for RPMI System MSI
vlsunil Aug 18, 2025
5f879aa
ACPI: RISC-V: Create interrupt controller list in sorted order
vlsunil Aug 18, 2025
ea0b845
ACPI: RISC-V: Add support to update gsi range
vlsunil Aug 18, 2025
6992bb1
ACPI: RISC-V: Add RPMI System MSI to GSI mapping
vlsunil Aug 18, 2025
c968e35
irqchip/irq-riscv-imsic-early: Export imsic_acpi_get_fwnode()
vlsunil Aug 18, 2025
676aa16
mailbox/riscv-sbi-mpxy: Add ACPI support
vlsunil Aug 18, 2025
ac1fd86
irqchip/riscv-rpmi-sysmsi: Add ACPI support
vlsunil Aug 18, 2025
7822790
RISC-V: Enable GPIO keyboard and event device in RV64 defconfig
avpatel Aug 18, 2025
477eef4
MAINTAINERS: Add entry for RISC-V RPMI and MPXY drivers
avpatel Aug 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions Documentation/devicetree/bindings/clock/riscv,rpmi-clock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/riscv,rpmi-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: RISC-V RPMI clock service group based clock controller

maintainers:
- Anup Patel <anup@brainfault.org>

description: |
The RISC-V Platform Management Interface (RPMI) [1] defines a
messaging protocol which is modular and extensible. The supervisor
software can send/receive RPMI messages via SBI MPXY extension [2]
or some dedicated supervisor-mode RPMI transport.

The RPMI specification [1] defines clock service group for accessing
system clocks managed by a platform microcontroller. The supervisor
software can access RPMI clock service group via SBI MPXY channel or
some dedicated supervisor-mode RPMI transport.

===========================================
References
===========================================

[1] RISC-V Platform Management Interface (RPMI) v1.0 (or higher)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI) v3.0 (or higher)
https://github.com/riscv-non-isa/riscv-sbi-doc/releases

properties:
compatible:
description:
Intended for use by the supervisor software.
const: riscv,rpmi-clock

mboxes:
maxItems: 1
description:
Mailbox channel of the underlying RPMI transport or SBI message proxy channel.

"#clock-cells":
const: 1
description:
Platform specific CLOCK_ID as defined by the RISC-V Platform Management
Interface (RPMI) specification.

required:
- compatible
- mboxes
- "#clock-cells"

additionalProperties: false

examples:
- |
clock-controller {
compatible = "riscv,rpmi-clock";
mboxes = <&mpxy_mbox 0x1000 0x0>;
#clock-cells = <1>;
};
...
64 changes: 64 additions & 0 deletions Documentation/devicetree/bindings/clock/riscv,rpmi-mpxy-clock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/riscv,rpmi-mpxy-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: RISC-V RPMI clock service group based message proxy

maintainers:
- Anup Patel <anup@brainfault.org>

description: |
The RISC-V Platform Management Interface (RPMI) [1] defines a
messaging protocol which is modular and extensible. The supervisor
software can send/receive RPMI messages via SBI MPXY extension [2]
or some dedicated supervisor-mode RPMI transport.

The RPMI specification [1] defines clock service group for accessing
system clocks managed by a platform microcontroller. The SBI implementation
(machine mode firmware or hypervisor) can implement an SBI MPXY channel
to allow RPMI clock service group access to the supervisor software.

===========================================
References
===========================================

[1] RISC-V Platform Management Interface (RPMI) v1.0 (or higher)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI) v3.0 (or higher)
https://github.com/riscv-non-isa/riscv-sbi-doc/releases

properties:
compatible:
description:
Intended for use by the SBI implementation.
const: riscv,rpmi-mpxy-clock

mboxes:
maxItems: 1
description:
Mailbox channel of the underlying RPMI transport.

riscv,sbi-mpxy-channel-id:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The SBI MPXY channel id to be used for providing RPMI access to
the supervisor software.

required:
- compatible
- mboxes
- riscv,sbi-mpxy-channel-id

additionalProperties: false

examples:
- |
clock-service {
compatible = "riscv,rpmi-mpxy-clock";
mboxes = <&rpmi_shmem_mbox 0x8>;
riscv,sbi-mpxy-channel-id = <0x1000>;
};
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller/riscv,rpmi-mpxy-system-msi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: RISC-V RPMI system MSI service group based message proxy

maintainers:
- Anup Patel <anup@brainfault.org>

description: |
The RISC-V Platform Management Interface (RPMI) [1] defines a
messaging protocol which is modular and extensible. The supervisor
software can send/receive RPMI messages via SBI MPXY extension [2]
or some dedicated supervisor-mode RPMI transport.

The RPMI specification [1] defines system MSI service group which
allow application processors to receive MSIs upon system events
such as P2A doorbell, graceful shutdown/reboot request, CPU hotplug
event, memory hotplug event, etc from the platform microcontroller.
The SBI implementation (machine mode firmware or hypervisor) can
implement an SBI MPXY channel to allow RPMI system MSI service
group access to the supervisor software.

===========================================
References
===========================================

[1] RISC-V Platform Management Interface (RPMI) v1.0 (or higher)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI) v3.0 (or higher)
https://github.com/riscv-non-isa/riscv-sbi-doc/releases

properties:
compatible:
description:
Intended for use by the SBI implementation.
const: riscv,rpmi-mpxy-system-msi

mboxes:
maxItems: 1
description:
Mailbox channel of the underlying RPMI transport.

riscv,sbi-mpxy-channel-id:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The SBI MPXY channel id to be used for providing RPMI access to
the supervisor software.

required:
- compatible
- mboxes
- riscv,sbi-mpxy-channel-id

additionalProperties: false

examples:
- |
interrupt-controller {
compatible = "riscv,rpmi-mpxy-system-msi";
mboxes = <&rpmi_shmem_mbox 0x2>;
riscv,sbi-mpxy-channel-id = <0x2000>;
};
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller/riscv,rpmi-system-msi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: RISC-V RPMI system MSI service group based interrupt controller

maintainers:
- Anup Patel <anup@brainfault.org>

description: |
The RISC-V Platform Management Interface (RPMI) [1] defines a
messaging protocol which is modular and extensible. The supervisor
software can send/receive RPMI messages via SBI MPXY extension [2]
or some dedicated supervisor-mode RPMI transport.

The RPMI specification [1] defines system MSI service group which
allow application processors to receive MSIs upon system events
such as P2A doorbell, graceful shutdown/reboot request, CPU hotplug
event, memory hotplug event, etc from the platform microcontroller.
The supervisor software can access RPMI system MSI service group via
SBI MPXY channel or some dedicated supervisor-mode RPMI transport.

===========================================
References
===========================================

[1] RISC-V Platform Management Interface (RPMI) v1.0 (or higher)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI) v3.0 (or higher)
https://github.com/riscv-non-isa/riscv-sbi-doc/releases

allOf:
- $ref: /schemas/interrupt-controller.yaml#

properties:
compatible:
description:
Intended for use by the supervisor software.
const: riscv,rpmi-system-msi

mboxes:
maxItems: 1
description:
Mailbox channel of the underlying RPMI transport or SBI message proxy channel.

msi-parent: true

interrupt-controller: true

"#interrupt-cells":
const: 1

required:
- compatible
- mboxes
- msi-parent
- interrupt-controller
- "#interrupt-cells"

additionalProperties: false

examples:
- |
interrupt-controller {
compatible = "riscv,rpmi-system-msi";
mboxes = <&mpxy_mbox 0x2000 0x0>;
msi-parent = <&imsic_slevel>;
interrupt-controller;
#interrupt-cells = <1>;
};
...
124 changes: 124 additions & 0 deletions Documentation/devicetree/bindings/mailbox/riscv,rpmi-shmem-mbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mailbox/riscv,rpmi-shmem-mbox.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: RISC-V Platform Management Interface (RPMI) shared memory mailbox

maintainers:
- Anup Patel <anup@brainfault.org>

description: |
The RISC-V Platform Management Interface (RPMI) [1] defines a common shared
memory based RPMI transport. This RPMI shared memory transport integrates as
mailbox controller in the SBI implementation or supervisor software whereas
each RPMI service group is mailbox client in the SBI implementation and
supervisor software.

===========================================
References
===========================================

[1] RISC-V Platform Management Interface (RPMI) v1.0 (or higher)
https://github.com/riscv-non-isa/riscv-rpmi/releases

properties:
compatible:
const: riscv,rpmi-shmem-mbox

reg:
minItems: 2
items:
- description: A2P request queue base address
- description: P2A acknowledgment queue base address
- description: P2A request queue base address
- description: A2P acknowledgment queue base address
- description: A2P doorbell address

reg-names:
minItems: 2
items:
- const: a2p-req
- const: p2a-ack
- enum: [ p2a-req, a2p-doorbell ]
- const: a2p-ack
- const: a2p-doorbell

interrupts:
maxItems: 1
description:
The RPMI shared memory transport supports P2A doorbell as a wired
interrupt and this property specifies the interrupt source.

msi-parent:
description:
The RPMI shared memory transport supports P2A doorbell as a system MSI
and this property specifies the target MSI controller.

riscv,slot-size:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 64
description:
Power-of-2 RPMI slot size of the RPMI shared memory transport.

riscv,a2p-doorbell-value:
$ref: /schemas/types.yaml#/definitions/uint32
default: 0x1
description:
Value written to the 32-bit A2P doorbell register.

riscv,p2a-doorbell-sysmsi-index:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The RPMI shared memory transport supports P2A doorbell as a system MSI
and this property specifies system MSI index to be used for configuring
the P2A doorbell MSI.

"#mbox-cells":
const: 1
description:
The first cell specifies RPMI service group ID.

required:
- compatible
- reg
- reg-names
- riscv,slot-size
- "#mbox-cells"

anyOf:
- required:
- interrupts
- required:
- msi-parent

additionalProperties: false

examples:
- |
// Example 1 (RPMI shared memory with only 2 queues):
mailbox@10080000 {
compatible = "riscv,rpmi-shmem-mbox";
reg = <0x10080000 0x10000>,
<0x10090000 0x10000>;
reg-names = "a2p-req", "p2a-ack";
msi-parent = <&imsic_mlevel>;
riscv,slot-size = <64>;
#mbox-cells = <1>;
};
- |
// Example 2 (RPMI shared memory with only 4 queues):
mailbox@10001000 {
compatible = "riscv,rpmi-shmem-mbox";
reg = <0x10001000 0x800>,
<0x10001800 0x800>,
<0x10002000 0x800>,
<0x10002800 0x800>,
<0x10003000 0x4>;
reg-names = "a2p-req", "p2a-ack", "p2a-req", "a2p-ack", "a2p-doorbell";
msi-parent = <&imsic_mlevel>;
riscv,slot-size = <64>;
riscv,a2p-doorbell-value = <0x00008000>;
#mbox-cells = <1>;
};
Loading
Loading