Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a51820a
riscv: Add new error codes defined by SBI v3.0
avpatel May 25, 2025
b63dec6
dt-bindings: mailbox: Add bindings for RPMI shared memory transport
avpatel May 25, 2025
3f75ecb
dt-bindings: mailbox: Add bindings for RISC-V SBI MPXY extension
avpatel May 25, 2025
a5aa1fa
RISC-V: Add defines for the SBI message proxy extension
avpatel May 25, 2025
4012a6e
mailbox: Add common header for RPMI messages sent via mailbox
avpatel May 25, 2025
3662fcd
mailbox: Allow controller specific mapping using fwnode
avpatel May 25, 2025
c24a2a4
mailbox: Add RISC-V SBI message proxy (MPXY) based mailbox driver
avpatel May 25, 2025
beb02c4
dt-bindings: clock: Add RPMI clock service message proxy bindings
avpatel May 25, 2025
8fc71ac
dt-bindings: clock: Add RPMI clock service controller bindings
avpatel May 25, 2025
9e8d460
clk: Add clock driver for the RISC-V RPMI clock service group
pathakraul May 25, 2025
617c0ea
dt-bindings: Add RPMI system MSI message proxy bindings
avpatel May 25, 2025
7c58cea
dt-bindings: Add RPMI system MSI interrupt controller bindings
avpatel May 25, 2025
b4f41cf
irqchip: Add driver for the RPMI system MSI service group
avpatel May 25, 2025
b86761a
ACPI: property: Refactor acpi_fwnode_get_reference_args()
vlsunil May 25, 2025
51a7460
ACPI: property: Add support for cells property
vlsunil May 25, 2025
536b3a4
ACPI: scan: Update honor list for RPMI System MSI
vlsunil May 25, 2025
9eeb962
ACPI: RISC-V: Create interrupt controller list in sorted order
vlsunil May 25, 2025
ed6c198
ACPI: RISC-V: Add support to update gsi range
vlsunil May 25, 2025
47289de
ACPI: RISC-V: Add RPMI System MSI to GSI mapping
vlsunil May 25, 2025
0911b98
mailbox/riscv-sbi-mpxy: Add ACPI support
vlsunil May 25, 2025
53769d6
irqchip/riscv-rpmi-sysmsi: Add ACPI support
vlsunil May 25, 2025
c37a2d5
RISC-V: Enable GPIO keyboard and event device in RV64 defconfig
avpatel May 25, 2025
213f86e
MAINTAINERS: Add entry for RISC-V RPMI and MPXY drivers
avpatel May 25, 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
61 changes: 61 additions & 0 deletions Documentation/devicetree/bindings/clock/riscv,rpmi-clock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI)
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

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)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI)
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-controller {
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)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI)
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)
https://github.com/riscv-non-isa/riscv-rpmi/releases

[2] RISC-V Supervisor Binary Interface (SBI)
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)
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