[PATCH v21 4/5] dt-bindings: remoteproc: Add documentation for ZynqMP R5 rproc bindings
From: Ben Levinsky
Date: Mon Nov 02 2020 - 14:39:23 EST
Add binding for ZynqMP R5 OpenAMP.
Represent the RPU domain resources in one device node. Each RPU
processor is a subnode of the top RPU domain node.
Signed-off-by: Jason Wu <j.wu@xxxxxxxxxx>
Signed-off-by: Wendy Liang <jliang@xxxxxxxxxx>
Signed-off-by: Michal Simek <michal.simek@xxxxxxxxxx>
Signed-off-by: Ben Levinsky <ben.levinsky@xxxxxxxxxx>
---
.../xilinx,zynqmp-r5-remoteproc.yaml | 143 ++++++++++++++++++
1 file changed, 143 insertions(+)
create mode 100644 Documentation/devicetree/bindings/remoteproc/xilinx,zynqmp-r5-remoteproc.yaml
diff --git a/Documentation/devicetree/bindings/remoteproc/xilinx,zynqmp-r5-remoteproc.yaml b/Documentation/devicetree/bindings/remoteproc/xilinx,zynqmp-r5-remoteproc.yaml
new file mode 100644
index 000000000000..9cb358389cd7
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/xilinx,zynqmp-r5-remoteproc.yaml
@@ -0,0 +1,143 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/remoteproc/xilinx,zynqmp-r5-remoteproc.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Xilinx R5 remote processor controller bindings
+
+description:
+ This document defines the binding for the remoteproc component that loads and
+ boots firmwares on the Xilinx Zynqmp and Versal family chipset.
+
+ Note that the Linux has global addressing view of the R5-related memory (TCM)
+ so the absolute address ranges are provided in TCM reg's.
+
+maintainers:
+ - Ed Mooring <ed.mooring@xxxxxxxxxx>
+ - Ben Levinsky <ben.levinsky@xxxxxxxxxx>
+
+properties:
+ compatible:
+ const: xlnx,zynqmp-r5-remoteproc
+
+ lockstep-mode:
+ description:
+ If this property is present, then the configuration is lock-step.
+ Otherwise RPU is split.
+ type: boolean
+ maxItems: 1
+
+ interrupts:
+ description:
+ Interrupt mapping for remoteproc IPI. It is required if the
+ user uses the remoteproc driver with the RPMsg kernel driver.
+ maxItems: 6
+
+ memory-regions:
+ description:
+ Collection of memory carveouts used for elf-loading and inter-processor
+ communication. each carveout in this case should be in DDR, not
+ chip-specific memory. In Xilinx case, this is TCM, OCM, BRAM, etc.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ meta-memory-regions:
+ description:
+ Collection of memories that are not present in the top level memory
+ nodes' mapping. For example, R5s' TCM banks. These banks are needed
+ for R5 firmware meta data such as the R5 firmware's heap and stack.
+ To be more precise, this is on-chip reserved SRAM regions, e.g. TCM,
+ BRAM, OCM, etc.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ pnode-id:
+ maxItems: 1
+ description:
+ Power node id that is used to uniquely identify the node for Xilinx
+ Power Management. The value is then passed to Xilinx platform
+ manager for power on/off and access.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ mboxes:
+ description:
+ Array of phandles that describe the rx and tx for xilinx zynqmp
+ mailbox driver. order of rx and tx is described by the mbox-names
+ property. This will be used for communication with remote
+ processor.
+ maxItems: 2
+
+ mbox-names:
+ description:
+ Array of strings that denote which item in the mboxes property array
+ are the rx and tx for xilinx zynqmp mailbox driver
+ maxItems: 2
+ $ref: /schemas/types.yaml#/definitions/string-array
+
+
+examples:
+ - |
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ elf_load: rproc@3ed000000 {
+ no-map;
+ reg = <0x3ed00000 0x40000>;
+ };
+
+ rpu0vdev0vring0: rpu0vdev0vring0@3ed40000 {
+ no-map;
+ reg = <0x3ed40000 0x4000>;
+ };
+ rpu0vdev0vring1: rpu0vdev0vring1@3ed44000 {
+ no-map;
+ reg = <0x3ed44000 0x4000>;
+ };
+ rpu0vdev0buffer: rpu0vdev0buffer@3ed48000 {
+ no-map;
+ reg = <0x3ed48000 0x100000>;
+ };
+
+ };
+
+ /*
+ * Below nodes are required if using TCM to load R5 firmware
+ * if not, then either do not provide nodes or label as disabled in
+ * status property
+ */
+ tcm0a: tcm_0a@ffe00000 {
+ reg = <0xffe00000 0x10000>;
+ pnode-id = <0xf>;
+ no-map;
+ status = "okay";
+ phandle = <0x40>;
+ };
+ tcm0b: tcm_1a@ffe20000 {
+ reg = <0xffe20000 0x10000>;
+ pnode-id = <0x10>;
+ no-map;
+ status = "okay";
+ phandle = <0x41>;
+ };
+
+ rpu {
+ compatible = "xlnx,zynqmp-r5-remoteproc";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ lockstep-mode;
+ r5_0 {
+ compatible = "xlnx,zynqmp-r5-single-remoteproc";
+ ranges;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ memory-regions = <&elf_load>,
+ <&rpu0vdev0vring0>,
+ <&rpu0vdev0vring1>,
+ <&rpu0vdev0buffer>;
+ meta-memory-regions = <&tcm_0a>, <&tcm_0b>;
+ pnode-id = <0x7>;
+ };
+ };
+
+...
--
2.17.1