ti,pruss.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/soc/ti/ti,pruss.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: |+
  7. TI Programmable Real-Time Unit and Industrial Communication Subsystem
  8. maintainers:
  9. - Suman Anna <s-anna@ti.com>
  10. description: |+
  11. The Programmable Real-Time Unit and Industrial Communication Subsystem
  12. (PRU-ICSS a.k.a. PRUSS) is present on various TI SoCs such as AM335x, AM437x,
  13. Keystone 66AK2G, OMAP-L138/DA850 etc. A PRUSS consists of dual 32-bit RISC
  14. cores (Programmable Real-Time Units, or PRUs), shared RAM, data and
  15. instruction RAMs, some internal peripheral modules to facilitate industrial
  16. communication, and an interrupt controller.
  17. The programmable nature of the PRUs provide flexibility to implement custom
  18. peripheral interfaces, fast real-time responses, or specialized data handling.
  19. The common peripheral modules include the following,
  20. - an Ethernet MII_RT module with two MII ports
  21. - an MDIO port to control external Ethernet PHYs
  22. - an Industrial Ethernet Peripheral (IEP) to manage/generate Industrial
  23. Ethernet functions
  24. - an Enhanced Capture Module (eCAP)
  25. - an Industrial Ethernet Timer with 7/9 capture and 16 compare events
  26. - a 16550-compatible UART to support PROFIBUS
  27. - Enhanced GPIO with async capture and serial support
  28. A PRU-ICSS subsystem can have up to three shared data memories. A PRU core
  29. acts on a primary Data RAM (there are usually 2 Data RAMs) at its address
  30. 0x0, but also has access to a secondary Data RAM (primary to the other PRU
  31. core) at its address 0x2000. A shared Data RAM, if present, can be accessed
  32. by both the PRU cores. The Interrupt Controller (INTC) and a CFG module are
  33. common to both the PRU cores. Each PRU core also has a private instruction
  34. RAM, and specific register spaces for Control and Debug functionalities.
  35. Various sub-modules within a PRU-ICSS subsystem are represented as individual
  36. nodes and are defined using a parent-child hierarchy depending on their
  37. integration within the IP and the SoC. These nodes are described in the
  38. following sections.
  39. PRU-ICSS Node
  40. ==============
  41. Each PRU-ICSS instance is represented as its own node with the individual PRU
  42. processor cores, the memories node, an INTC node and an MDIO node represented
  43. as child nodes within this PRUSS node. This node shall be a child of the
  44. corresponding interconnect bus nodes or target-module nodes.
  45. See ../../mfd/syscon.yaml for generic SysCon binding details.
  46. properties:
  47. $nodename:
  48. pattern: "^(pruss|icssg)@[0-9a-f]+$"
  49. compatible:
  50. enum:
  51. - ti,am3356-pruss # for AM335x SoC family
  52. - ti,am4376-pruss0 # for AM437x SoC family and PRUSS unit 0
  53. - ti,am4376-pruss1 # for AM437x SoC family and PRUSS unit 1
  54. - ti,am5728-pruss # for AM57xx SoC family
  55. - ti,am625-pruss # for K3 AM62x SoC family
  56. - ti,am642-icssg # for K3 AM64x SoC family
  57. - ti,am654-icssg # for K3 AM65x SoC family
  58. - ti,j721e-icssg # for K3 J721E SoC family
  59. - ti,k2g-pruss # for 66AK2G SoC family
  60. reg:
  61. maxItems: 1
  62. "#address-cells":
  63. const: 1
  64. "#size-cells":
  65. const: 1
  66. ranges:
  67. maxItems: 1
  68. dma-ranges:
  69. maxItems: 1
  70. dma-coherent: true
  71. power-domains:
  72. description: |
  73. This property is as per sci-pm-domain.txt.
  74. patternProperties:
  75. memories@[a-f0-9]+$:
  76. description: |
  77. The various Data RAMs within a single PRU-ICSS unit are represented as a
  78. single node with the name 'memories'.
  79. type: object
  80. properties:
  81. reg:
  82. minItems: 2 # On AM437x one of two PRUSS units don't contain Shared RAM.
  83. items:
  84. - description: Address and size of the Data RAM0.
  85. - description: Address and size of the Data RAM1.
  86. - description: |
  87. Address and size of the Shared Data RAM. Note that on AM437x one
  88. of two PRUSS units don't contain Shared RAM, while the second one
  89. has it.
  90. reg-names:
  91. minItems: 2
  92. items:
  93. - const: dram0
  94. - const: dram1
  95. - const: shrdram2
  96. required:
  97. - reg
  98. - reg-names
  99. additionalProperties: false
  100. cfg@[a-f0-9]+$:
  101. description: |
  102. PRU-ICSS configuration space. CFG sub-module represented as a SysCon.
  103. type: object
  104. additionalProperties: false
  105. properties:
  106. compatible:
  107. items:
  108. - const: ti,pruss-cfg
  109. - const: syscon
  110. "#address-cells":
  111. const: 1
  112. "#size-cells":
  113. const: 1
  114. reg:
  115. maxItems: 1
  116. ranges:
  117. maxItems: 1
  118. clocks:
  119. type: object
  120. properties:
  121. "#address-cells":
  122. const: 1
  123. "#size-cells":
  124. const: 0
  125. patternProperties:
  126. coreclk-mux@[a-f0-9]+$:
  127. description: |
  128. This is applicable only for ICSSG (K3 SoCs). The ICSSG modules
  129. core clock can be set to one of the 2 sources: ICSSG_CORE_CLK or
  130. ICSSG_ICLK. This node models this clock mux and should have the
  131. name "coreclk-mux".
  132. type: object
  133. properties:
  134. '#clock-cells':
  135. const: 0
  136. clocks:
  137. items:
  138. - description: ICSSG_CORE Clock
  139. - description: ICSSG_ICLK Clock
  140. assigned-clocks:
  141. maxItems: 1
  142. assigned-clock-parents:
  143. maxItems: 1
  144. description: |
  145. Standard assigned-clocks-parents definition used for selecting
  146. mux parent (one of the mux input).
  147. reg:
  148. maxItems: 1
  149. required:
  150. - clocks
  151. additionalProperties: false
  152. iepclk-mux@[a-f0-9]+$:
  153. description: |
  154. The IEP module can get its clock from 2 sources: ICSSG_IEP_CLK or
  155. CORE_CLK (OCP_CLK in older SoCs). This node models this clock
  156. mux and should have the name "iepclk-mux".
  157. type: object
  158. properties:
  159. '#clock-cells':
  160. const: 0
  161. clocks:
  162. items:
  163. - description: ICSSG_IEP Clock
  164. - description: Core Clock (OCP Clock in older SoCs)
  165. assigned-clocks:
  166. maxItems: 1
  167. assigned-clock-parents:
  168. maxItems: 1
  169. description: |
  170. Standard assigned-clocks-parents definition used for selecting
  171. mux parent (one of the mux input).
  172. reg:
  173. maxItems: 1
  174. required:
  175. - clocks
  176. additionalProperties: false
  177. additionalProperties: false
  178. iep@[a-f0-9]+$:
  179. description: |
  180. Industrial Ethernet Peripheral to manage/generate Industrial Ethernet
  181. functions such as time stamping. Each PRUSS has either 1 IEP (on AM335x,
  182. AM437x, AM57xx & 66AK2G SoCs) or 2 IEPs (on K3 AM65x, J721E & AM64x SoCs).
  183. IEP is used for creating PTP clocks and generating PPS signals.
  184. type: object
  185. mii-rt@[a-f0-9]+$:
  186. description: |
  187. Real-Time Ethernet to support multiple industrial communication protocols.
  188. MII-RT sub-module represented as a SysCon.
  189. type: object
  190. properties:
  191. compatible:
  192. items:
  193. - const: ti,pruss-mii
  194. - const: syscon
  195. reg:
  196. maxItems: 1
  197. additionalProperties: false
  198. mii-g-rt@[a-f0-9]+$:
  199. description: |
  200. The Real-time Media Independent Interface to support multiple industrial
  201. communication protocols (G stands for Gigabit). MII-G-RT sub-module
  202. represented as a SysCon.
  203. type: object
  204. properties:
  205. compatible:
  206. items:
  207. - const: ti,pruss-mii-g
  208. - const: syscon
  209. reg:
  210. maxItems: 1
  211. additionalProperties: false
  212. ^pa-stats@[a-f0-9]+$:
  213. description: |
  214. PA-STATS sub-module represented as a SysCon. PA_STATS is a set of
  215. registers where different statistics related to ICSSG, are dumped by
  216. ICSSG firmware. This syscon sub-module will help the device to
  217. access/read/write those statistics.
  218. type: object
  219. additionalProperties: false
  220. properties:
  221. compatible:
  222. items:
  223. - const: ti,pruss-pa-st
  224. - const: syscon
  225. reg:
  226. maxItems: 1
  227. interrupt-controller@[a-f0-9]+$:
  228. description: |
  229. PRUSS INTC Node. Each PRUSS has a single interrupt controller instance
  230. that is common to all the PRU cores. This should be represented as an
  231. interrupt-controller node.
  232. $ref: /schemas/interrupt-controller/ti,pruss-intc.yaml#
  233. type: object
  234. mdio@[a-f0-9]+$:
  235. description: |
  236. MDIO Node. Each PRUSS has an MDIO module that can be used to control
  237. external PHYs. The MDIO module used within the PRU-ICSS is an instance of
  238. the MDIO Controller used in TI Davinci SoCs.
  239. $ref: /schemas/net/ti,davinci-mdio.yaml#
  240. type: object
  241. "^(pru|rtu|txpru)@[0-9a-f]+$":
  242. description: |
  243. PRU Node. Each PRUSS has dual PRU cores, each represented as a RemoteProc
  244. device through a PRU child node each. Each node can optionally be rendered
  245. inactive by using the standard DT string property, "status". The ICSSG IP
  246. present on K3 SoCs have additional auxiliary PRU cores with slightly
  247. different IP integration.
  248. $ref: /schemas/remoteproc/ti,pru-rproc.yaml#
  249. type: object
  250. required:
  251. - compatible
  252. - reg
  253. - ranges
  254. additionalProperties: false
  255. # Due to inability of correctly verifying sub-nodes with an @address through
  256. # the "required" list, the required sub-nodes below are commented out for now.
  257. # required:
  258. # - memories
  259. # - interrupt-controller
  260. # - pru
  261. allOf:
  262. - if:
  263. properties:
  264. compatible:
  265. contains:
  266. enum:
  267. - ti,k2g-pruss
  268. - ti,am654-icssg
  269. - ti,j721e-icssg
  270. - ti,am642-icssg
  271. then:
  272. required:
  273. - power-domains
  274. - if:
  275. properties:
  276. compatible:
  277. contains:
  278. enum:
  279. - ti,k2g-pruss
  280. then:
  281. required:
  282. - dma-coherent
  283. examples:
  284. - |
  285. /* Example 1 AM33xx PRU-ICSS */
  286. pruss: pruss@0 {
  287. compatible = "ti,am3356-pruss";
  288. reg = <0x0 0x80000>;
  289. #address-cells = <1>;
  290. #size-cells = <1>;
  291. ranges;
  292. pruss_mem: memories@0 {
  293. reg = <0x0 0x2000>,
  294. <0x2000 0x2000>,
  295. <0x10000 0x3000>;
  296. reg-names = "dram0", "dram1", "shrdram2";
  297. };
  298. pruss_cfg: cfg@26000 {
  299. compatible = "ti,pruss-cfg", "syscon";
  300. #address-cells = <1>;
  301. #size-cells = <1>;
  302. reg = <0x26000 0x2000>;
  303. ranges = <0x00 0x26000 0x2000>;
  304. clocks {
  305. #address-cells = <1>;
  306. #size-cells = <0>;
  307. pruss_iepclk_mux: iepclk-mux@30 {
  308. reg = <0x30>;
  309. #clock-cells = <0>;
  310. clocks = <&l3_gclk>, /* icss_iep */
  311. <&pruss_ocp_gclk>; /* icss_ocp */
  312. };
  313. };
  314. };
  315. pruss_mii_rt: mii-rt@32000 {
  316. compatible = "ti,pruss-mii", "syscon";
  317. reg = <0x32000 0x58>;
  318. };
  319. pruss_intc: interrupt-controller@20000 {
  320. compatible = "ti,pruss-intc";
  321. reg = <0x20000 0x2000>;
  322. interrupt-controller;
  323. #interrupt-cells = <3>;
  324. interrupts = <20 21 22 23 24 25 26 27>;
  325. interrupt-names = "host_intr0", "host_intr1",
  326. "host_intr2", "host_intr3",
  327. "host_intr4", "host_intr5",
  328. "host_intr6", "host_intr7";
  329. };
  330. pru0: pru@34000 {
  331. compatible = "ti,am3356-pru";
  332. reg = <0x34000 0x2000>,
  333. <0x22000 0x400>,
  334. <0x22400 0x100>;
  335. reg-names = "iram", "control", "debug";
  336. firmware-name = "am335x-pru0-fw";
  337. };
  338. pru1: pru@38000 {
  339. compatible = "ti,am3356-pru";
  340. reg = <0x38000 0x2000>,
  341. <0x24000 0x400>,
  342. <0x24400 0x100>;
  343. reg-names = "iram", "control", "debug";
  344. firmware-name = "am335x-pru1-fw";
  345. };
  346. pruss_mdio: mdio@32400 {
  347. compatible = "ti,davinci_mdio";
  348. reg = <0x32400 0x90>;
  349. clocks = <&dpll_core_m4_ck>;
  350. clock-names = "fck";
  351. bus_freq = <1000000>;
  352. #address-cells = <1>;
  353. #size-cells = <0>;
  354. };
  355. };
  356. - |
  357. /* Example 2 AM43xx PRU-ICSS with PRUSS1 node */
  358. #include <dt-bindings/interrupt-controller/arm-gic.h>
  359. pruss1: pruss@0 {
  360. compatible = "ti,am4376-pruss1";
  361. reg = <0x0 0x40000>;
  362. #address-cells = <1>;
  363. #size-cells = <1>;
  364. ranges;
  365. pruss1_mem: memories@0 {
  366. reg = <0x0 0x2000>,
  367. <0x2000 0x2000>,
  368. <0x10000 0x8000>;
  369. reg-names = "dram0", "dram1", "shrdram2";
  370. };
  371. pruss1_cfg: cfg@26000 {
  372. compatible = "ti,pruss-cfg", "syscon";
  373. #address-cells = <1>;
  374. #size-cells = <1>;
  375. reg = <0x26000 0x2000>;
  376. ranges = <0x00 0x26000 0x2000>;
  377. clocks {
  378. #address-cells = <1>;
  379. #size-cells = <0>;
  380. pruss1_iepclk_mux: iepclk-mux@30 {
  381. reg = <0x30>;
  382. #clock-cells = <0>;
  383. clocks = <&sysclk_div>, /* icss_iep */
  384. <&pruss_ocp_gclk>; /* icss_ocp */
  385. };
  386. };
  387. };
  388. pruss1_mii_rt: mii-rt@32000 {
  389. compatible = "ti,pruss-mii", "syscon";
  390. reg = <0x32000 0x58>;
  391. };
  392. pruss1_intc: interrupt-controller@20000 {
  393. compatible = "ti,pruss-intc";
  394. reg = <0x20000 0x2000>;
  395. interrupt-controller;
  396. #interrupt-cells = <3>;
  397. interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
  398. <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
  399. <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
  400. <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
  401. <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
  402. <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
  403. <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
  404. interrupt-names = "host_intr0", "host_intr1",
  405. "host_intr2", "host_intr3",
  406. "host_intr4",
  407. "host_intr6", "host_intr7";
  408. ti,irqs-reserved = /bits/ 8 <0x20>; /* BIT(5) */
  409. };
  410. pru1_0: pru@34000 {
  411. compatible = "ti,am4376-pru";
  412. reg = <0x34000 0x3000>,
  413. <0x22000 0x400>,
  414. <0x22400 0x100>;
  415. reg-names = "iram", "control", "debug";
  416. firmware-name = "am437x-pru1_0-fw";
  417. };
  418. pru1_1: pru@38000 {
  419. compatible = "ti,am4376-pru";
  420. reg = <0x38000 0x3000>,
  421. <0x24000 0x400>,
  422. <0x24400 0x100>;
  423. reg-names = "iram", "control", "debug";
  424. firmware-name = "am437x-pru1_1-fw";
  425. };
  426. pruss1_mdio: mdio@32400 {
  427. compatible = "ti,davinci_mdio";
  428. reg = <0x32400 0x90>;
  429. clocks = <&dpll_core_m4_ck>;
  430. clock-names = "fck";
  431. bus_freq = <1000000>;
  432. #address-cells = <1>;
  433. #size-cells = <0>;
  434. };
  435. };
  436. ...