1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/remoteproc/ti,pru-rproc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TI Programmable Realtime Unit (PRU) cores
8
9maintainers:
10  - Suman Anna <s-anna@ti.com>
11
12description: |
13  Each Programmable Real-Time Unit and Industrial Communication Subsystem
14  (PRU-ICSS or PRUSS) has two 32-bit load/store RISC CPU cores called
15  Programmable Real-Time Units (PRUs), each represented by a node. Each PRU
16  core has a dedicated Instruction RAM, Control and Debug register sets, and
17  use the Data RAMs present within the PRU-ICSS for code execution.
18
19  The K3 SoCs containing ICSSG v1.0 (eg: AM65x SR1.0) also have two Auxiliary
20  PRU cores called RTUs with slightly different IP integration. The K3 SoCs
21  containing the revised ICSSG v1.1 (eg: J721E, AM65x SR2.0) have an extra two
22  auxiliary Transmit PRU cores called Tx_PRUs that augment the PRUs. Each RTU
23  or Tx_PRU core can also be used independently like a PRU, or alongside a
24  corresponding PRU core to provide/implement auxiliary functionality/support.
25
26  Each PRU, RTU or Tx_PRU core node should be defined as a child node of the
27  corresponding PRU-ICSS node. Each node can optionally be rendered inactive by
28  using the standard DT string property, "status".
29
30  Please see the overall PRU-ICSS bindings document for additional details
31  including a complete example,
32    Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml
33
34properties:
35  compatible:
36    enum:
37      - ti,am3356-pru   # for AM335x SoC family (AM3356+ SoCs only)
38      - ti,am4376-pru   # for AM437x SoC family (AM4376+ SoCs only)
39      - ti,am5728-pru   # for AM57xx SoC family
40      - ti,am625-pru    # for PRUs in K3 AM62x SoC family
41      - ti,am642-pru    # for PRUs in K3 AM64x SoC family
42      - ti,am642-rtu    # for RTUs in K3 AM64x SoC family
43      - ti,am642-tx-pru # for Tx_PRUs in K3 AM64x SoC family
44      - ti,am654-pru    # for PRUs in K3 AM65x SoC family
45      - ti,am654-rtu    # for RTUs in K3 AM65x SoC family
46      - ti,am654-tx-pru # for Tx_PRUs in K3 AM65x SR2.0 SoCs
47      - ti,j721e-pru    # for PRUs in K3 J721E SoC family
48      - ti,j721e-rtu    # for RTUs in K3 J721E SoC family
49      - ti,j721e-tx-pru # for Tx_PRUs in K3 J721E SoC family
50      - ti,k2g-pru      # for 66AK2G SoC family
51
52  reg:
53    items:
54      - description: Address and Size of the PRU Instruction RAM
55      - description: Address and Size of the PRU CTRL sub-module registers
56      - description: Address and Size of the PRU Debug sub-module registers
57
58  reg-names:
59    items:
60      - const: iram
61      - const: control
62      - const: debug
63
64  firmware-name:
65    description: |
66      Should contain the name of the default firmware image
67      file located on the firmware search path.
68
69if:
70  properties:
71    compatible:
72      enum:
73        - ti,am654-rtu
74        - ti,j721e-rtu
75        - ti,am642-rtu
76then:
77  properties:
78    $nodename:
79      pattern: "^rtu@[0-9a-f]+$"
80else:
81  if:
82    properties:
83      compatible:
84        enum:
85          - ti,am654-tx-pru
86          - ti,j721e-tx-pru
87          - ti,am642-tx-pru
88  then:
89    properties:
90      $nodename:
91        pattern: "^txpru@[0-9a-f]+"
92  else:
93    properties:
94      $nodename:
95        pattern: "^pru@[0-9a-f]+$"
96
97required:
98  - compatible
99  - reg
100  - reg-names
101  - firmware-name
102
103additionalProperties: false
104
105examples:
106  - |
107    /* AM33xx PRU-ICSS */
108    pruss_tm: target-module@300000 {  /* 0x4a300000, ap 9 04.0 */
109      compatible = "ti,sysc-pruss", "ti,sysc";
110      #address-cells = <1>;
111      #size-cells = <1>;
112      ranges = <0x0 0x300000 0x80000>;
113
114      pruss: pruss@0 {
115        compatible = "ti,am3356-pruss";
116        reg = <0x0 0x80000>;
117        #address-cells = <1>;
118        #size-cells = <1>;
119        ranges;
120
121        pruss_mem: memories@0 {
122          reg = <0x0 0x2000>,
123                <0x2000 0x2000>,
124                <0x10000 0x3000>;
125          reg-names = "dram0", "dram1", "shrdram2";
126        };
127
128        pru0: pru@34000 {
129          compatible = "ti,am3356-pru";
130          reg = <0x34000 0x2000>,
131                <0x22000 0x400>,
132                <0x22400 0x100>;
133          reg-names = "iram", "control", "debug";
134          firmware-name = "am335x-pru0-fw";
135        };
136
137        pru1: pru@38000 {
138          compatible = "ti,am3356-pru";
139          reg = <0x38000 0x2000>,
140                <0x24000 0x400>,
141                <0x24400 0x100>;
142          reg-names = "iram", "control", "debug";
143          firmware-name = "am335x-pru1-fw";
144        };
145      };
146    };
147
148  - |
149    /* AM65x SR2.0 ICSSG */
150    #include <dt-bindings/soc/ti,sci_pm_domain.h>
151
152    icssg0: icssg@b000000 {
153      compatible = "ti,am654-icssg";
154      reg = <0xb000000 0x80000>;
155      power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
156      #address-cells = <1>;
157      #size-cells = <1>;
158      ranges = <0x0 0xb000000 0x80000>;
159
160      icssg0_mem: memories@0 {
161        reg = <0x0 0x2000>,
162              <0x2000 0x2000>,
163              <0x10000 0x10000>;
164        reg-names = "dram0", "dram1", "shrdram2";
165      };
166
167      pru0_0: pru@34000 {
168        compatible = "ti,am654-pru";
169        reg = <0x34000 0x4000>,
170              <0x22000 0x100>,
171              <0x22400 0x100>;
172        reg-names = "iram", "control", "debug";
173        firmware-name = "am65x-pru0_0-fw";
174      };
175
176      rtu0_0: rtu@4000 {
177        compatible = "ti,am654-rtu";
178        reg = <0x4000 0x2000>,
179              <0x23000 0x100>,
180              <0x23400 0x100>;
181        reg-names = "iram", "control", "debug";
182        firmware-name = "am65x-rtu0_0-fw";
183      };
184
185      tx_pru0_0: txpru@a000 {
186        compatible = "ti,am654-tx-pru";
187        reg = <0xa000 0x1800>,
188              <0x25000 0x100>,
189              <0x25400 0x100>;
190        reg-names = "iram", "control", "debug";
191        firmware-name = "am65x-txpru0_0-fw";
192      };
193
194      pru0_1: pru@38000 {
195        compatible = "ti,am654-pru";
196        reg = <0x38000 0x4000>,
197              <0x24000 0x100>,
198              <0x24400 0x100>;
199        reg-names = "iram", "control", "debug";
200        firmware-name = "am65x-pru0_1-fw";
201      };
202
203      rtu0_1: rtu@6000 {
204        compatible = "ti,am654-rtu";
205        reg = <0x6000 0x2000>,
206              <0x23800 0x100>,
207              <0x23c00 0x100>;
208        reg-names = "iram", "control", "debug";
209        firmware-name = "am65x-rtu0_1-fw";
210      };
211
212      tx_pru0_1: txpru@c000 {
213        compatible = "ti,am654-tx-pru";
214        reg = <0xc000 0x1800>,
215              <0x25800 0x100>,
216              <0x25c00 0x100>;
217        reg-names = "iram", "control", "debug";
218        firmware-name = "am65x-txpru0_1-fw";
219      };
220    };
221