Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: remoteproc: Add Tightly Coupled Memory (TCM) bindings

Introduce bindings for TCM memory address space on AMD-xilinx Zynq
UltraScale+ platform. It will help in defining TCM in device-tree
and make it's access platform agnostic and data-driven.

Tightly-coupled memories(TCMs) are low-latency memory that provides
predictable instruction execution and predictable data load/store
timing. Each Cortex-R5F processor contains two 64-bit wide 64 KB memory
banks on the ATCM and BTCM ports, for a total of 128 KB of memory.

The TCM resources(reg, reg-names and power-domain) are documented for
each TCM in the R5 node. The reg and reg-names are made as required
properties as we don't want to hardcode TCM addresses for future
platforms and for zu+ legacy implementation will ensure that the
old dts without reg/reg-names works and stable ABI is maintained.

It also extends the examples for TCM split and lockstep modes.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20240412183708.4036007-3-tanmay.shah@amd.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

authored by

Radhey Shyam Pandey and committed by
Mathieu Poirier
9e1b2a07 b31bcda5

+256 -21
+256 -21
Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5fss.yaml
··· 18 18 19 19 properties: 20 20 compatible: 21 - const: xlnx,zynqmp-r5fss 21 + enum: 22 + - xlnx,zynqmp-r5fss 23 + - xlnx,versal-r5fss 24 + - xlnx,versal-net-r52fss 25 + 26 + "#address-cells": 27 + const: 2 28 + 29 + "#size-cells": 30 + const: 2 31 + 32 + ranges: 33 + description: | 34 + Standard ranges definition providing address translations for 35 + local R5F TCM address spaces to bus addresses. 22 36 23 37 xlnx,cluster-mode: 24 38 $ref: /schemas/types.yaml#/definitions/uint32 25 39 enum: [0, 1, 2] 40 + default: 1 26 41 description: | 27 42 The RPU MPCore can operate in split mode (Dual-processor performance), Safety 28 43 lock-step mode(Both RPU cores execute the same code in lock-step, ··· 51 36 1: lockstep mode (default) 52 37 2: single cpu mode 53 38 39 + xlnx,tcm-mode: 40 + $ref: /schemas/types.yaml#/definitions/uint32 41 + enum: [0, 1] 42 + description: | 43 + Configure RPU TCM 44 + 0: split mode 45 + 1: lockstep mode 46 + 54 47 patternProperties: 55 - "^r5f-[a-f0-9]+$": 48 + "^r(.*)@[0-9a-f]+$": 56 49 type: object 57 50 description: | 58 51 The RPU is located in the Low Power Domain of the Processor Subsystem. ··· 75 52 76 53 properties: 77 54 compatible: 78 - const: xlnx,zynqmp-r5f 55 + enum: 56 + - xlnx,zynqmp-r5f 57 + - xlnx,versal-r5f 58 + - xlnx,versal-net-r52f 59 + 60 + reg: 61 + minItems: 1 62 + maxItems: 4 63 + 64 + reg-names: 65 + minItems: 1 66 + maxItems: 4 79 67 80 68 power-domains: 81 - maxItems: 1 69 + minItems: 2 70 + maxItems: 5 82 71 83 72 mboxes: 84 73 minItems: 1 ··· 136 101 137 102 required: 138 103 - compatible 104 + - reg 105 + - reg-names 139 106 - power-domains 140 - 141 - unevaluatedProperties: false 142 107 143 108 required: 144 109 - compatible 110 + - "#address-cells" 111 + - "#size-cells" 112 + - ranges 113 + 114 + allOf: 115 + - if: 116 + properties: 117 + compatible: 118 + contains: 119 + enum: 120 + - xlnx,versal-net-r52fss 121 + then: 122 + properties: 123 + xlnx,tcm-mode: false 124 + 125 + patternProperties: 126 + "^r52f@[0-9a-f]+$": 127 + type: object 128 + 129 + properties: 130 + reg: 131 + minItems: 1 132 + items: 133 + - description: ATCM internal memory 134 + - description: BTCM internal memory 135 + - description: CTCM internal memory 136 + 137 + reg-names: 138 + minItems: 1 139 + items: 140 + - const: atcm0 141 + - const: btcm0 142 + - const: ctcm0 143 + 144 + power-domains: 145 + minItems: 2 146 + items: 147 + - description: RPU core power domain 148 + - description: ATCM power domain 149 + - description: BTCM power domain 150 + - description: CTCM power domain 151 + 152 + - if: 153 + properties: 154 + compatible: 155 + contains: 156 + enum: 157 + - xlnx,zynqmp-r5fss 158 + - xlnx,versal-r5fss 159 + then: 160 + if: 161 + properties: 162 + xlnx,cluster-mode: 163 + enum: [1, 2] 164 + then: 165 + properties: 166 + xlnx,tcm-mode: 167 + enum: [1] 168 + 169 + patternProperties: 170 + "^r5f@[0-9a-f]+$": 171 + type: object 172 + 173 + properties: 174 + reg: 175 + minItems: 1 176 + items: 177 + - description: ATCM internal memory 178 + - description: BTCM internal memory 179 + - description: extra ATCM memory in lockstep mode 180 + - description: extra BTCM memory in lockstep mode 181 + 182 + reg-names: 183 + minItems: 1 184 + items: 185 + - const: atcm0 186 + - const: btcm0 187 + - const: atcm1 188 + - const: btcm1 189 + 190 + power-domains: 191 + minItems: 2 192 + items: 193 + - description: RPU core power domain 194 + - description: ATCM power domain 195 + - description: BTCM power domain 196 + - description: second ATCM power domain 197 + - description: second BTCM power domain 198 + 199 + required: 200 + - xlnx,tcm-mode 201 + 202 + else: 203 + properties: 204 + xlnx,tcm-mode: 205 + enum: [0] 206 + 207 + patternProperties: 208 + "^r5f@[0-9a-f]+$": 209 + type: object 210 + 211 + properties: 212 + reg: 213 + minItems: 1 214 + items: 215 + - description: ATCM internal memory 216 + - description: BTCM internal memory 217 + 218 + reg-names: 219 + minItems: 1 220 + items: 221 + - const: atcm0 222 + - const: btcm0 223 + 224 + power-domains: 225 + minItems: 2 226 + items: 227 + - description: RPU core power domain 228 + - description: ATCM power domain 229 + - description: BTCM power domain 230 + 231 + required: 232 + - xlnx,tcm-mode 145 233 146 234 additionalProperties: false 147 235 148 236 examples: 149 237 - | 150 - remoteproc { 151 - compatible = "xlnx,zynqmp-r5fss"; 152 - xlnx,cluster-mode = <1>; 238 + #include <dt-bindings/power/xlnx-zynqmp-power.h> 153 239 154 - r5f-0 { 155 - compatible = "xlnx,zynqmp-r5f"; 156 - power-domains = <&zynqmp_firmware 0x7>; 157 - memory-region = <&rproc_0_fw_image>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; 158 - mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; 159 - mbox-names = "tx", "rx"; 240 + // Split mode configuration 241 + soc { 242 + #address-cells = <2>; 243 + #size-cells = <2>; 244 + 245 + remoteproc@ffe00000 { 246 + compatible = "xlnx,zynqmp-r5fss"; 247 + xlnx,cluster-mode = <0>; 248 + xlnx,tcm-mode = <0>; 249 + 250 + #address-cells = <2>; 251 + #size-cells = <2>; 252 + ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x10000>, 253 + <0x0 0x20000 0x0 0xffe20000 0x0 0x10000>, 254 + <0x1 0x0 0x0 0xffe90000 0x0 0x10000>, 255 + <0x1 0x20000 0x0 0xffeb0000 0x0 0x10000>; 256 + 257 + r5f@0 { 258 + compatible = "xlnx,zynqmp-r5f"; 259 + reg = <0x0 0x0 0x0 0x10000>, <0x0 0x20000 0x0 0x10000>; 260 + reg-names = "atcm0", "btcm0"; 261 + power-domains = <&zynqmp_firmware PD_RPU_0>, 262 + <&zynqmp_firmware PD_R5_0_ATCM>, 263 + <&zynqmp_firmware PD_R5_0_BTCM>; 264 + memory-region = <&rproc_0_fw_image>, <&rpu0vdev0buffer>, 265 + <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; 266 + mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; 267 + mbox-names = "tx", "rx"; 268 + }; 269 + 270 + r5f@1 { 271 + compatible = "xlnx,zynqmp-r5f"; 272 + reg = <0x1 0x0 0x0 0x10000>, <0x1 0x20000 0x0 0x10000>; 273 + reg-names = "atcm0", "btcm0"; 274 + power-domains = <&zynqmp_firmware PD_RPU_1>, 275 + <&zynqmp_firmware PD_R5_1_ATCM>, 276 + <&zynqmp_firmware PD_R5_1_BTCM>; 277 + memory-region = <&rproc_1_fw_image>, <&rpu1vdev0buffer>, 278 + <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; 279 + mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; 280 + mbox-names = "tx", "rx"; 281 + }; 160 282 }; 283 + }; 161 284 162 - r5f-1 { 163 - compatible = "xlnx,zynqmp-r5f"; 164 - power-domains = <&zynqmp_firmware 0x8>; 165 - memory-region = <&rproc_1_fw_image>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; 166 - mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; 167 - mbox-names = "tx", "rx"; 285 + - | 286 + //Lockstep configuration 287 + soc { 288 + #address-cells = <2>; 289 + #size-cells = <2>; 290 + 291 + remoteproc@ffe00000 { 292 + compatible = "xlnx,zynqmp-r5fss"; 293 + xlnx,cluster-mode = <1>; 294 + xlnx,tcm-mode = <1>; 295 + 296 + #address-cells = <2>; 297 + #size-cells = <2>; 298 + ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x10000>, 299 + <0x0 0x20000 0x0 0xffe20000 0x0 0x10000>, 300 + <0x0 0x10000 0x0 0xffe10000 0x0 0x10000>, 301 + <0x0 0x30000 0x0 0xffe30000 0x0 0x10000>; 302 + 303 + r5f@0 { 304 + compatible = "xlnx,zynqmp-r5f"; 305 + reg = <0x0 0x0 0x0 0x10000>, 306 + <0x0 0x20000 0x0 0x10000>, 307 + <0x0 0x10000 0x0 0x10000>, 308 + <0x0 0x30000 0x0 0x10000>; 309 + reg-names = "atcm0", "btcm0", "atcm1", "btcm1"; 310 + power-domains = <&zynqmp_firmware PD_RPU_0>, 311 + <&zynqmp_firmware PD_R5_0_ATCM>, 312 + <&zynqmp_firmware PD_R5_0_BTCM>, 313 + <&zynqmp_firmware PD_R5_1_ATCM>, 314 + <&zynqmp_firmware PD_R5_1_BTCM>; 315 + memory-region = <&rproc_0_fw_image>, <&rpu0vdev0buffer>, 316 + <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; 317 + mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; 318 + mbox-names = "tx", "rx"; 319 + }; 320 + 321 + r5f@1 { 322 + compatible = "xlnx,zynqmp-r5f"; 323 + reg = <0x1 0x0 0x0 0x10000>, <0x1 0x20000 0x0 0x10000>; 324 + reg-names = "atcm0", "btcm0"; 325 + power-domains = <&zynqmp_firmware PD_RPU_1>, 326 + <&zynqmp_firmware PD_R5_1_ATCM>, 327 + <&zynqmp_firmware PD_R5_1_BTCM>; 328 + memory-region = <&rproc_1_fw_image>, <&rpu1vdev0buffer>, 329 + <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; 330 + mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; 331 + mbox-names = "tx", "rx"; 332 + }; 168 333 }; 169 334 }; 170 335 ...