1*440b075bSKrzysztof Kozlowski# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25ee79c2eSSuman Anna%YAML 1.2 35ee79c2eSSuman Anna--- 45ee79c2eSSuman Anna$id: http://devicetree.org/schemas/remoteproc/ti,k3-r5f-rproc.yaml# 55ee79c2eSSuman Anna$schema: http://devicetree.org/meta-schemas/core.yaml# 65ee79c2eSSuman Anna 75ee79c2eSSuman Annatitle: TI K3 R5F processor subsystems 85ee79c2eSSuman Anna 95ee79c2eSSuman Annamaintainers: 105ee79c2eSSuman Anna - Suman Anna <s-anna@ti.com> 115ee79c2eSSuman Anna 125ee79c2eSSuman Annadescription: | 135ee79c2eSSuman Anna The TI K3 family of SoCs usually have one or more dual-core Arm Cortex R5F 145ee79c2eSSuman Anna processor subsystems/clusters (R5FSS). The dual core cluster can be used 155ee79c2eSSuman Anna either in a LockStep mode providing safety/fault tolerance features or in a 165ee79c2eSSuman Anna Split mode providing two individual compute cores for doubling the compute 17c16ced60SSuman Anna capacity on most SoCs. These are used together with other processors present 18c16ced60SSuman Anna on the SoC to achieve various system level goals. 19c16ced60SSuman Anna 20c16ced60SSuman Anna AM64x SoCs do not support LockStep mode, but rather a new non-safety mode 21c16ced60SSuman Anna called "Single-CPU" mode, where only Core0 is used, but with ability to use 22c16ced60SSuman Anna Core1's TCMs as well. 235ee79c2eSSuman Anna 24f3d81b45SDevarsh Thakkar AM62 SoC family support a single R5F core only which runs Device Manager 25f3d81b45SDevarsh Thakkar firmware and can also be used as a remote processor with IPC communication. 26f3d81b45SDevarsh Thakkar 275ee79c2eSSuman Anna Each Dual-Core R5F sub-system is represented as a single DTS node 285ee79c2eSSuman Anna representing the cluster, with a pair of child DT nodes representing 295ee79c2eSSuman Anna the individual R5F cores. Each node has a number of required or optional 305ee79c2eSSuman Anna properties that enable the OS running on the host processor to perform 315ee79c2eSSuman Anna the device management of the remote processor and to communicate with the 325ee79c2eSSuman Anna remote processor. 335ee79c2eSSuman Anna 345ee79c2eSSuman Annaproperties: 355ee79c2eSSuman Anna $nodename: 365ee79c2eSSuman Anna pattern: "^r5fss(@.*)?" 375ee79c2eSSuman Anna 385ee79c2eSSuman Anna compatible: 395ee79c2eSSuman Anna enum: 40f3d81b45SDevarsh Thakkar - ti,am62-r5fss 41c16ced60SSuman Anna - ti,am64-r5fss 42f3d81b45SDevarsh Thakkar - ti,am654-r5fss 43f3d81b45SDevarsh Thakkar - ti,j7200-r5fss 44f3d81b45SDevarsh Thakkar - ti,j721e-r5fss 45a9328d6dSHari Nagalla - ti,j721s2-r5fss 465ee79c2eSSuman Anna 475ee79c2eSSuman Anna power-domains: 485ee79c2eSSuman Anna description: | 495ee79c2eSSuman Anna Should contain a phandle to a PM domain provider node and an args 505ee79c2eSSuman Anna specifier containing the R5FSS device id value. 515ee79c2eSSuman Anna maxItems: 1 525ee79c2eSSuman Anna 535ee79c2eSSuman Anna "#address-cells": 545ee79c2eSSuman Anna const: 1 555ee79c2eSSuman Anna 565ee79c2eSSuman Anna "#size-cells": 575ee79c2eSSuman Anna const: 1 585ee79c2eSSuman Anna 595ee79c2eSSuman Anna ranges: 605ee79c2eSSuman Anna description: | 615ee79c2eSSuman Anna Standard ranges definition providing address translations for 625ee79c2eSSuman Anna local R5F TCM address spaces to bus addresses. 635ee79c2eSSuman Anna 645ee79c2eSSuman Anna# Optional properties: 655ee79c2eSSuman Anna# -------------------- 665ee79c2eSSuman Anna 675ee79c2eSSuman Anna ti,cluster-mode: 685ee79c2eSSuman Anna $ref: /schemas/types.yaml#/definitions/uint32 695ee79c2eSSuman Anna description: | 705ee79c2eSSuman Anna Configuration Mode for the Dual R5F cores within the R5F cluster. 71f3d81b45SDevarsh Thakkar For most SoCs (AM65x, J721E, J7200, J721s2), 72f3d81b45SDevarsh Thakkar It should be either a value of 1 (LockStep mode) or 0 (Split mode) on 73a9328d6dSHari Nagalla most SoCs (AM65x, J721E, J7200, J721s2), default is LockStep mode if 74f3d81b45SDevarsh Thakkar omitted. 75f3d81b45SDevarsh Thakkar For AM64x SoCs, 76f3d81b45SDevarsh Thakkar It should be either a value of 0 (Split mode) or 2 (Single-CPU mode) and 77f3d81b45SDevarsh Thakkar default is Split mode if omitted. 78f3d81b45SDevarsh Thakkar For AM62x SoCs, 79f3d81b45SDevarsh Thakkar It should be set as 3 (Single-Core mode) which is also the default if 80f3d81b45SDevarsh Thakkar omitted. 81f3d81b45SDevarsh Thakkar 825ee79c2eSSuman Anna 835ee79c2eSSuman Anna# R5F Processor Child Nodes: 845ee79c2eSSuman Anna# ========================== 855ee79c2eSSuman Anna 865ee79c2eSSuman AnnapatternProperties: 875ee79c2eSSuman Anna "^r5f@[a-f0-9]+$": 885ee79c2eSSuman Anna type: object 895ee79c2eSSuman Anna description: | 905ee79c2eSSuman Anna The R5F Sub-System device node should define two R5F child nodes, each 915ee79c2eSSuman Anna node representing a TI instantiation of the Arm Cortex R5F core. There 925ee79c2eSSuman Anna are some specific integration differences for the IP like the usage of 935ee79c2eSSuman Anna a Region Address Translator (RAT) for translating the larger SoC bus 94f3d81b45SDevarsh Thakkar addresses into a 32-bit address space for the processor. For AM62x, 95f3d81b45SDevarsh Thakkar the R5F Sub-System device node should only define one R5F child node 96f3d81b45SDevarsh Thakkar as it has only one core available. 975ee79c2eSSuman Anna 985ee79c2eSSuman Anna Each R5F core has an associated 64 KB of Tightly-Coupled Memory (TCM) 995ee79c2eSSuman Anna internal memories split between two banks - TCMA and TCMB (further 1005ee79c2eSSuman Anna interleaved into two banks TCMB0 and TCMB1). These memories (also called 1015ee79c2eSSuman Anna ATCM and BTCM) provide read/write performance on par with the core's L1 1025ee79c2eSSuman Anna caches. Each of the TCMs can be enabled or disabled independently and 1035ee79c2eSSuman Anna either of them can be configured to appear at that R5F's address 0x0. 1045ee79c2eSSuman Anna 10547aab533SBjorn Helgaas The cores do not use an MMU, but has a Region Address Translator 1065ee79c2eSSuman Anna (RAT) module that is accessible only from the R5Fs for providing 1075ee79c2eSSuman Anna translations between 32-bit CPU addresses into larger system bus 1085ee79c2eSSuman Anna addresses. Cache and memory access settings are provided through a 1095ee79c2eSSuman Anna Memory Protection Unit (MPU), programmable only from the R5Fs. 1105ee79c2eSSuman Anna 111dca66935SRob Herring $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml# 1125ee79c2eSSuman Anna 1135ee79c2eSSuman Anna properties: 1145ee79c2eSSuman Anna compatible: 1155ee79c2eSSuman Anna enum: 116f3d81b45SDevarsh Thakkar - ti,am62-r5f 117c16ced60SSuman Anna - ti,am64-r5f 118f3d81b45SDevarsh Thakkar - ti,am654-r5f 119f3d81b45SDevarsh Thakkar - ti,j7200-r5f 120f3d81b45SDevarsh Thakkar - ti,j721e-r5f 121a9328d6dSHari Nagalla - ti,j721s2-r5f 1225ee79c2eSSuman Anna 1235ee79c2eSSuman Anna reg: 1245ee79c2eSSuman Anna items: 1255ee79c2eSSuman Anna - description: Address and Size of the ATCM internal memory region 1265ee79c2eSSuman Anna - description: Address and Size of the BTCM internal memory region 1275ee79c2eSSuman Anna 1285ee79c2eSSuman Anna reg-names: 1295ee79c2eSSuman Anna items: 1305ee79c2eSSuman Anna - const: atcm 1315ee79c2eSSuman Anna - const: btcm 1325ee79c2eSSuman Anna 1335ee79c2eSSuman Anna resets: 1345ee79c2eSSuman Anna description: | 1355ee79c2eSSuman Anna Should contain the phandle to the reset controller node managing the 1365ee79c2eSSuman Anna local resets for this device, and a reset specifier. 1375ee79c2eSSuman Anna maxItems: 1 1385ee79c2eSSuman Anna 1395ee79c2eSSuman Anna firmware-name: 1405ee79c2eSSuman Anna description: | 1415ee79c2eSSuman Anna Should contain the name of the default firmware image 1425ee79c2eSSuman Anna file located on the firmware search path 1435ee79c2eSSuman Anna 1445ee79c2eSSuman Anna# The following properties are mandatory for R5F Core0 in both LockStep and Split 1455ee79c2eSSuman Anna# modes, and are mandatory for R5F Core1 _only_ in Split mode. They are unused for 1465ee79c2eSSuman Anna# R5F Core1 in LockStep mode: 1475ee79c2eSSuman Anna 1485ee79c2eSSuman Anna mboxes: 1495ee79c2eSSuman Anna description: | 1505ee79c2eSSuman Anna OMAP Mailbox specifier denoting the sub-mailbox, to be used for 1515ee79c2eSSuman Anna communication with the remote processor. This property should match 1525ee79c2eSSuman Anna with the sub-mailbox node used in the firmware image. 1535ee79c2eSSuman Anna maxItems: 1 1545ee79c2eSSuman Anna 1555ee79c2eSSuman Anna memory-region: 1565ee79c2eSSuman Anna description: | 1575ee79c2eSSuman Anna phandle to the reserved memory nodes to be associated with the 1585ee79c2eSSuman Anna remoteproc device. There should be at least two reserved memory nodes 1595ee79c2eSSuman Anna defined. The reserved memory nodes should be carveout nodes, and 1605ee79c2eSSuman Anna should be defined with a "no-map" property as per the bindings in 1615ee79c2eSSuman Anna Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt 1625ee79c2eSSuman Anna minItems: 2 1635ee79c2eSSuman Anna maxItems: 8 1645ee79c2eSSuman Anna items: 1655ee79c2eSSuman Anna - description: region used for dynamic DMA allocations like vrings and 1665ee79c2eSSuman Anna vring buffers 1675ee79c2eSSuman Anna - description: region reserved for firmware image sections 1685ee79c2eSSuman Anna additionalItems: true 1695ee79c2eSSuman Anna 1705ee79c2eSSuman Anna 1715ee79c2eSSuman Anna# Optional properties: 1725ee79c2eSSuman Anna# -------------------- 1735ee79c2eSSuman Anna# The following properties are optional properties for each of the R5F cores: 1745ee79c2eSSuman Anna 1755ee79c2eSSuman Anna ti,atcm-enable: 1765ee79c2eSSuman Anna $ref: /schemas/types.yaml#/definitions/uint32 1775ee79c2eSSuman Anna enum: [0, 1] 1785ee79c2eSSuman Anna description: | 1795ee79c2eSSuman Anna R5F core configuration mode dictating if ATCM should be enabled. The 1805ee79c2eSSuman Anna R5F address of ATCM is dictated by ti,loczrama property. Should be 1815ee79c2eSSuman Anna either a value of 1 (enabled) or 0 (disabled), default is disabled 1825ee79c2eSSuman Anna if omitted. Recommended to enable it for maximizing TCMs. 1835ee79c2eSSuman Anna 1845ee79c2eSSuman Anna ti,btcm-enable: 1855ee79c2eSSuman Anna $ref: /schemas/types.yaml#/definitions/uint32 1865ee79c2eSSuman Anna enum: [0, 1] 1875ee79c2eSSuman Anna description: | 1885ee79c2eSSuman Anna R5F core configuration mode dictating if BTCM should be enabled. The 1895ee79c2eSSuman Anna R5F address of BTCM is dictated by ti,loczrama property. Should be 1905ee79c2eSSuman Anna either a value of 1 (enabled) or 0 (disabled), default is enabled if 1915ee79c2eSSuman Anna omitted. 1925ee79c2eSSuman Anna 1935ee79c2eSSuman Anna ti,loczrama: 1945ee79c2eSSuman Anna $ref: /schemas/types.yaml#/definitions/uint32 1955ee79c2eSSuman Anna enum: [0, 1] 1965ee79c2eSSuman Anna description: | 1975ee79c2eSSuman Anna R5F core configuration mode dictating which TCM should appear at 1985ee79c2eSSuman Anna address 0 (from core's view). Should be either a value of 1 (ATCM 1995ee79c2eSSuman Anna at 0x0) or 0 (BTCM at 0x0), default value is 1 if omitted. 2005ee79c2eSSuman Anna 2015ee79c2eSSuman Anna sram: 2025ee79c2eSSuman Anna $ref: /schemas/types.yaml#/definitions/phandle-array 2035ee79c2eSSuman Anna minItems: 1 2045ee79c2eSSuman Anna maxItems: 4 20539bd2b6aSRob Herring items: 20639bd2b6aSRob Herring maxItems: 1 2075ee79c2eSSuman Anna description: | 2085ee79c2eSSuman Anna phandles to one or more reserved on-chip SRAM regions. The regions 2095ee79c2eSSuman Anna should be defined as child nodes of the respective SRAM node, and 2105ee79c2eSSuman Anna should be defined as per the generic bindings in, 2115ee79c2eSSuman Anna Documentation/devicetree/bindings/sram/sram.yaml 2125ee79c2eSSuman Anna 2135ee79c2eSSuman Anna required: 2145ee79c2eSSuman Anna - compatible 2155ee79c2eSSuman Anna - reg 2165ee79c2eSSuman Anna - reg-names 2175ee79c2eSSuman Anna - ti,sci 2185ee79c2eSSuman Anna - ti,sci-dev-id 2195ee79c2eSSuman Anna - ti,sci-proc-ids 2205ee79c2eSSuman Anna - resets 2215ee79c2eSSuman Anna - firmware-name 2225ee79c2eSSuman Anna 2235ee79c2eSSuman Anna unevaluatedProperties: false 2245ee79c2eSSuman Anna 225f3d81b45SDevarsh ThakkarallOf: 226f3d81b45SDevarsh Thakkar - if: 227c16ced60SSuman Anna properties: 228c16ced60SSuman Anna compatible: 229c16ced60SSuman Anna enum: 230c16ced60SSuman Anna - ti,am64-r5fss 231c16ced60SSuman Anna then: 232c16ced60SSuman Anna properties: 233c16ced60SSuman Anna ti,cluster-mode: 234c16ced60SSuman Anna enum: [0, 2] 235f3d81b45SDevarsh Thakkar 236f3d81b45SDevarsh Thakkar - if: 237f3d81b45SDevarsh Thakkar properties: 238f3d81b45SDevarsh Thakkar compatible: 239f3d81b45SDevarsh Thakkar enum: 240f3d81b45SDevarsh Thakkar - ti,am654-r5fss 241f3d81b45SDevarsh Thakkar - ti,j7200-r5fss 242f3d81b45SDevarsh Thakkar - ti,j721e-r5fss 243f3d81b45SDevarsh Thakkar - ti,j721s2-r5fss 244f3d81b45SDevarsh Thakkar then: 245c16ced60SSuman Anna properties: 246c16ced60SSuman Anna ti,cluster-mode: 247c16ced60SSuman Anna enum: [0, 1] 248c16ced60SSuman Anna 249f3d81b45SDevarsh Thakkar - if: 250f3d81b45SDevarsh Thakkar properties: 251f3d81b45SDevarsh Thakkar compatible: 252f3d81b45SDevarsh Thakkar enum: 253f3d81b45SDevarsh Thakkar - ti,am62-r5fss 254f3d81b45SDevarsh Thakkar then: 255f3d81b45SDevarsh Thakkar properties: 256f3d81b45SDevarsh Thakkar ti,cluster-mode: 257f3d81b45SDevarsh Thakkar enum: [3] 258f3d81b45SDevarsh Thakkar 2595ee79c2eSSuman Annarequired: 2605ee79c2eSSuman Anna - compatible 2615ee79c2eSSuman Anna - power-domains 2625ee79c2eSSuman Anna - "#address-cells" 2635ee79c2eSSuman Anna - "#size-cells" 2645ee79c2eSSuman Anna - ranges 2655ee79c2eSSuman Anna 2665ee79c2eSSuman AnnaadditionalProperties: false 2675ee79c2eSSuman Anna 2685ee79c2eSSuman Annaexamples: 2695ee79c2eSSuman Anna - | 27081231af1SSinthu Raja soc { 2715ee79c2eSSuman Anna #address-cells = <2>; 2725ee79c2eSSuman Anna #size-cells = <2>; 2735ee79c2eSSuman Anna 27424a4b57aSRob Herring mailbox0: mailbox-0 { 27524a4b57aSRob Herring #mbox-cells = <1>; 27624a4b57aSRob Herring }; 27724a4b57aSRob Herring 27824a4b57aSRob Herring mailbox1: mailbox-1 { 27924a4b57aSRob Herring #mbox-cells = <1>; 28024a4b57aSRob Herring }; 28124a4b57aSRob Herring 2825ee79c2eSSuman Anna bus@100000 { 2835ee79c2eSSuman Anna compatible = "simple-bus"; 2845ee79c2eSSuman Anna #address-cells = <2>; 2855ee79c2eSSuman Anna #size-cells = <2>; 2865ee79c2eSSuman Anna ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */ 2875ee79c2eSSuman Anna <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>, 2885ee79c2eSSuman Anna <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>, 2895ee79c2eSSuman Anna <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00080000>; 2905ee79c2eSSuman Anna 2915ee79c2eSSuman Anna bus@28380000 { 2925ee79c2eSSuman Anna compatible = "simple-bus"; 2935ee79c2eSSuman Anna #address-cells = <2>; 2945ee79c2eSSuman Anna #size-cells = <2>; 2955ee79c2eSSuman Anna ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS */ 2965ee79c2eSSuman Anna <0x00 0x41000000 0x00 0x41000000 0x00 0x00020000>, /* MCU R5F Core0 */ 2975ee79c2eSSuman Anna <0x00 0x41400000 0x00 0x41400000 0x00 0x00020000>, /* MCU R5F Core1 */ 2985ee79c2eSSuman Anna <0x00 0x41c00000 0x00 0x41c00000 0x00 0x00080000>; /* MCU SRAM */ 2995ee79c2eSSuman Anna 3005ee79c2eSSuman Anna /* AM65x MCU R5FSS node */ 3015ee79c2eSSuman Anna mcu_r5fss0: r5fss@41000000 { 3025ee79c2eSSuman Anna compatible = "ti,am654-r5fss"; 3035ee79c2eSSuman Anna power-domains = <&k3_pds 129>; 3045ee79c2eSSuman Anna ti,cluster-mode = <1>; 3055ee79c2eSSuman Anna #address-cells = <1>; 3065ee79c2eSSuman Anna #size-cells = <1>; 3075ee79c2eSSuman Anna ranges = <0x41000000 0x00 0x41000000 0x20000>, 3085ee79c2eSSuman Anna <0x41400000 0x00 0x41400000 0x20000>; 3095ee79c2eSSuman Anna 3105ee79c2eSSuman Anna mcu_r5f0: r5f@41000000 { 3115ee79c2eSSuman Anna compatible = "ti,am654-r5f"; 3125ee79c2eSSuman Anna reg = <0x41000000 0x00008000>, 3135ee79c2eSSuman Anna <0x41010000 0x00008000>; 3145ee79c2eSSuman Anna reg-names = "atcm", "btcm"; 3155ee79c2eSSuman Anna ti,sci = <&dmsc>; 3165ee79c2eSSuman Anna ti,sci-dev-id = <159>; 3175ee79c2eSSuman Anna ti,sci-proc-ids = <0x01 0xFF>; 3185ee79c2eSSuman Anna resets = <&k3_reset 159 1>; 3195ee79c2eSSuman Anna firmware-name = "am65x-mcu-r5f0_0-fw"; 3205ee79c2eSSuman Anna ti,atcm-enable = <1>; 3215ee79c2eSSuman Anna ti,btcm-enable = <1>; 3225ee79c2eSSuman Anna ti,loczrama = <1>; 3235ee79c2eSSuman Anna mboxes = <&mailbox0 &mbox_mcu_r5fss0_core0>; 3245ee79c2eSSuman Anna memory-region = <&mcu_r5fss0_core0_dma_memory_region>, 3255ee79c2eSSuman Anna <&mcu_r5fss0_core0_memory_region>; 3265ee79c2eSSuman Anna sram = <&mcu_r5fss0_core0_sram>; 3275ee79c2eSSuman Anna }; 3285ee79c2eSSuman Anna 3295ee79c2eSSuman Anna mcu_r5f1: r5f@41400000 { 3305ee79c2eSSuman Anna compatible = "ti,am654-r5f"; 3315ee79c2eSSuman Anna reg = <0x41400000 0x00008000>, 3325ee79c2eSSuman Anna <0x41410000 0x00008000>; 3335ee79c2eSSuman Anna reg-names = "atcm", "btcm"; 3345ee79c2eSSuman Anna ti,sci = <&dmsc>; 3355ee79c2eSSuman Anna ti,sci-dev-id = <245>; 3365ee79c2eSSuman Anna ti,sci-proc-ids = <0x02 0xFF>; 3375ee79c2eSSuman Anna resets = <&k3_reset 245 1>; 3385ee79c2eSSuman Anna firmware-name = "am65x-mcu-r5f0_1-fw"; 3395ee79c2eSSuman Anna ti,atcm-enable = <1>; 3405ee79c2eSSuman Anna ti,btcm-enable = <1>; 3415ee79c2eSSuman Anna ti,loczrama = <1>; 3425ee79c2eSSuman Anna mboxes = <&mailbox1 &mbox_mcu_r5fss0_core1>; 3435ee79c2eSSuman Anna }; 3445ee79c2eSSuman Anna }; 3455ee79c2eSSuman Anna }; 3465ee79c2eSSuman Anna }; 3475ee79c2eSSuman Anna }; 348