From: marouene.boubakri@oss.nxp.com
To: Jens Wiklander <jens.wiklander@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Jassi Brar <jassisinghbrar@gmail.com>,
Jonathan Corbet <corbet@lwn.net>
Cc: Sumit Garg <sumit.garg@linaro.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
op-tee@lists.trustedfirmware.org, linux-doc@vger.kernel.org,
linux-riscv@lists.infradead.org,
Marouene Boubakri <marouene.boubakri@oss.nxp.com>
Subject: [RFC PATCH v1 5/6] dt-bindings: firmware: add OP-TEE over the RISC-V RPMI TEE service group
Date: Thu, 10 Sep 2026 03:20:56 +0200 [thread overview]
Message-ID: <20260910012057.106966-6-marouene.boubakri@oss.nxp.com> (raw)
In-Reply-To: <20260910012057.106966-1-marouene.boubakri@oss.nxp.com>
From: Marouene Boubakri <marouene.boubakri@oss.nxp.com>
On RISC-V, OP-TEE runs as a supervisor domain isolated from the Rich
Execution Environment by the M-mode firmware. There is no SMC or HVC
instruction to reach it: the kernel invokes OP-TEE through the TEE
service group of the RISC-V Platform Management Interface (RPMI) v2.0,
carried on an SBI Message Proxy (MPXY) channel. Each call is a TEE_CALL
service request whose service data carries the register arguments of
the OP-TEE SMC ABI, so the ABI itself is unchanged from Arm.
Add a binding for such an OP-TEE instance. The compatible string keeps
the "linaro" vendor prefix of "linaro,optee-tz" which identifies the
OP-TEE reference implementation. The node references the MPXY mailbox
channel implementing the TEE service group, and carries the endpoint
identifiers assigned by the RPMI TEE framework to the REE and to OP-TEE
since the framework does not define any way for an endpoint to learn
them other than the optional TEE_PROBE_SYSTEM service, whose CBOR
encoded response cannot be parsed in the kernel.
Signed-off-by: Marouene Boubakri <marouene.boubakri@oss.nxp.com>
---
.../bindings/firmware/linaro,optee-rpmi.yaml | 79 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 80 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/linaro,optee-rpmi.yaml
diff --git a/Documentation/devicetree/bindings/firmware/linaro,optee-rpmi.yaml b/Documentation/devicetree/bindings/firmware/linaro,optee-rpmi.yaml
new file mode 100644
index 000000000..1c3dffc33
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/linaro,optee-rpmi.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/firmware/linaro,optee-rpmi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OP-TEE accessed through the RISC-V RPMI TEE service group
+
+maintainers:
+ - Marouene Boubakri <marouene.boubakri@oss.nxp.com>
+
+description: |
+ OP-TEE is a piece of software using hardware features to provide a Trusted
+ Execution Environment. On RISC-V, OP-TEE runs as a supervisor domain
+ isolated from the Rich Execution Environment (REE) by the M-mode firmware.
+
+ The REE reaches OP-TEE through the TEE service group of the RISC-V Platform
+ Management Interface (RPMI) [1], carried on a channel of the SBI Message
+ Proxy (MPXY) extension [2]. Each call into OP-TEE is a TEE_CALL service
+ request whose service data carries the register arguments of the OP-TEE
+ SMC ABI (drivers/tee/optee/optee_smc.h), as described in
+ drivers/tee/optee/optee_rpmi.h.
+
+ The RPMI TEE framework (the M-mode firmware) assigns an identifier to each
+ endpoint. The identifiers of the REE and of OP-TEE are required to
+ address TEE_CALL requests and are described here.
+
+ The compatible string uses the same "linaro" vendor prefix as
+ "linaro,optee-tz", which identifies the OP-TEE reference implementation.
+
+ [1] RISC-V Platform Management Interface (RPMI) v2.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:
+ $nodename:
+ const: optee
+
+ compatible:
+ const: linaro,optee-rpmi
+
+ mboxes:
+ maxItems: 1
+ description:
+ SBI MPXY channel implementing the RPMI TEE service group.
+
+ riscv,rpmi-tee-sender-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Endpoint identifier of the REE, used as SENDER_ID of the TEE_CALL
+ requests.
+
+ riscv,rpmi-tee-target-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Endpoint identifier of OP-TEE, used as TARGET_ID of the TEE_CALL
+ requests.
+
+required:
+ - compatible
+ - mboxes
+ - riscv,rpmi-tee-sender-id
+ - riscv,rpmi-tee-target-id
+
+additionalProperties: false
+
+examples:
+ - |
+ firmware {
+ optee {
+ compatible = "linaro,optee-rpmi";
+ mboxes = <&mpxy_mbox 0x10 0x0>;
+ riscv,rpmi-tee-sender-id = <0>;
+ riscv,rpmi-tee-target-id = <1>;
+ };
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 44860f991..bf4884f34 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20415,6 +20415,7 @@ M: Jens Wiklander <jenswi@kernel.org>
L: op-tee@lists.trustedfirmware.org (moderated for non-subscribers)
S: Maintained
F: Documentation/ABI/testing/sysfs-bus-optee-devices
+F: Documentation/devicetree/bindings/firmware/linaro,optee-rpmi.yaml
F: drivers/tee/optee/
OP-TEE RANDOM NUMBER GENERATOR (RNG) DRIVER
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-09-10 1:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 1:20 [RFC PATCH v1 0/6] tee: optee: RISC-V support over the RPMI TEE service group marouene.boubakri
2026-09-10 1:20 ` [RFC PATCH v1 1/6] mailbox: riscv-sbi-mpxy: add riscv_sbi_mpxy_mbox_call() for hart-local requests marouene.boubakri
2026-09-10 1:20 ` [RFC PATCH v1 2/6] tee: optee: select the SMC ABI conduit from the firmware node match data marouene.boubakri
2026-09-10 1:20 ` [RFC PATCH v1 3/6] tee: optee: teach the memory type check about RISC-V page attributes marouene.boubakri
2026-09-10 1:20 ` [RFC PATCH v1 4/6] mailbox: riscv-rpmi-message: add TEE service group definitions marouene.boubakri
2026-09-10 1:20 ` marouene.boubakri [this message]
2026-09-10 1:20 ` [RFC PATCH v1 6/6] tee: optee: add a RISC-V conduit over the RPMI TEE service group marouene.boubakri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260910012057.106966-6-marouene.boubakri@oss.nxp.com \
--to=marouene.boubakri@oss.nxp.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jassisinghbrar@gmail.com \
--cc=jens.wiklander@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=op-tee@lists.trustedfirmware.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=sumit.garg@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox