1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/iommu/arm,smmu.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: ARM System MMU Architecture Implementation 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Will Deacon <will@kernel.org> 11c66ec88fSEmmanuel Vadot - Robin Murphy <Robin.Murphy@arm.com> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotdescription: |+ 14c66ec88fSEmmanuel Vadot ARM SoCs may contain an implementation of the ARM System Memory 15c66ec88fSEmmanuel Vadot Management Unit Architecture, which can be used to provide 1 or 2 stages 16c66ec88fSEmmanuel Vadot of address translation to bus masters external to the CPU. 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadot The SMMU may also raise interrupts in response to various fault 19c66ec88fSEmmanuel Vadot conditions. 20c66ec88fSEmmanuel Vadot 21c66ec88fSEmmanuel Vadotproperties: 22c66ec88fSEmmanuel Vadot $nodename: 23c66ec88fSEmmanuel Vadot pattern: "^iommu@[0-9a-f]*" 24c66ec88fSEmmanuel Vadot compatible: 25c66ec88fSEmmanuel Vadot oneOf: 26c66ec88fSEmmanuel Vadot - description: Qcom SoCs implementing "arm,smmu-v2" 27c66ec88fSEmmanuel Vadot items: 28c66ec88fSEmmanuel Vadot - enum: 29c66ec88fSEmmanuel Vadot - qcom,msm8996-smmu-v2 30c66ec88fSEmmanuel Vadot - qcom,msm8998-smmu-v2 318bab661aSEmmanuel Vadot - qcom,sdm630-smmu-v2 32f126890aSEmmanuel Vadot - qcom,sm6375-smmu-v2 33c66ec88fSEmmanuel Vadot - const: qcom,smmu-v2 34c66ec88fSEmmanuel Vadot 358bab661aSEmmanuel Vadot - description: Qcom SoCs implementing "qcom,smmu-500" and "arm,mmu-500" 36c66ec88fSEmmanuel Vadot items: 37c66ec88fSEmmanuel Vadot - enum: 388cc087a1SEmmanuel Vadot - qcom,qcm2290-smmu-500 39*b2d2a78aSEmmanuel Vadot - qcom,qcs8300-smmu-500 408bab661aSEmmanuel Vadot - qcom,qdu1000-smmu-500 41*b2d2a78aSEmmanuel Vadot - qcom,sa8255p-smmu-500 42cb7aa33aSEmmanuel Vadot - qcom,sa8775p-smmu-500 438bab661aSEmmanuel Vadot - qcom,sc7180-smmu-500 448bab661aSEmmanuel Vadot - qcom,sc7280-smmu-500 458bab661aSEmmanuel Vadot - qcom,sc8180x-smmu-500 468bab661aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 478bab661aSEmmanuel Vadot - qcom,sdm670-smmu-500 488bab661aSEmmanuel Vadot - qcom,sdm845-smmu-500 49cb7aa33aSEmmanuel Vadot - qcom,sdx55-smmu-500 50cb7aa33aSEmmanuel Vadot - qcom,sdx65-smmu-500 51f126890aSEmmanuel Vadot - qcom,sdx75-smmu-500 528bab661aSEmmanuel Vadot - qcom,sm6115-smmu-500 53cb7aa33aSEmmanuel Vadot - qcom,sm6125-smmu-500 548bab661aSEmmanuel Vadot - qcom,sm6350-smmu-500 558bab661aSEmmanuel Vadot - qcom,sm6375-smmu-500 568bab661aSEmmanuel Vadot - qcom,sm8150-smmu-500 578bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 588bab661aSEmmanuel Vadot - qcom,sm8350-smmu-500 598bab661aSEmmanuel Vadot - qcom,sm8450-smmu-500 60fac71e4eSEmmanuel Vadot - qcom,sm8550-smmu-500 618d13bc63SEmmanuel Vadot - qcom,sm8650-smmu-500 628d13bc63SEmmanuel Vadot - qcom,x1e80100-smmu-500 638bab661aSEmmanuel Vadot - const: qcom,smmu-500 648bab661aSEmmanuel Vadot - const: arm,mmu-500 658bab661aSEmmanuel Vadot 668bab661aSEmmanuel Vadot - description: Qcom SoCs implementing "arm,mmu-500" (legacy binding) 678bab661aSEmmanuel Vadot deprecated: true 688bab661aSEmmanuel Vadot items: 698bab661aSEmmanuel Vadot # Do not add additional SoC to this list. Instead use two previous lists. 708bab661aSEmmanuel Vadot - enum: 718bab661aSEmmanuel Vadot - qcom,qcm2290-smmu-500 72c66ec88fSEmmanuel Vadot - qcom,sc7180-smmu-500 732eb4d8dcSEmmanuel Vadot - qcom,sc7280-smmu-500 745def4c47SEmmanuel Vadot - qcom,sc8180x-smmu-500 75d5b0e70fSEmmanuel Vadot - qcom,sc8280xp-smmu-500 76c66ec88fSEmmanuel Vadot - qcom,sdm845-smmu-500 778bab661aSEmmanuel Vadot - qcom,sm6115-smmu-500 788cc087a1SEmmanuel Vadot - qcom,sm6350-smmu-500 79b97ee269SEmmanuel Vadot - qcom,sm6375-smmu-500 80c66ec88fSEmmanuel Vadot - qcom,sm8150-smmu-500 81c66ec88fSEmmanuel Vadot - qcom,sm8250-smmu-500 825def4c47SEmmanuel Vadot - qcom,sm8350-smmu-500 83e67e8565SEmmanuel Vadot - qcom,sm8450-smmu-500 84c66ec88fSEmmanuel Vadot - const: arm,mmu-500 85fac71e4eSEmmanuel Vadot - description: Qcom Adreno GPUs implementing "qcom,smmu-500" and "arm,mmu-500" 868bab661aSEmmanuel Vadot items: 878bab661aSEmmanuel Vadot - enum: 8801950c46SEmmanuel Vadot - qcom,qcm2290-smmu-500 89*b2d2a78aSEmmanuel Vadot - qcom,sa8255p-smmu-500 90f126890aSEmmanuel Vadot - qcom,sa8775p-smmu-500 918bab661aSEmmanuel Vadot - qcom,sc7280-smmu-500 920e8011faSEmmanuel Vadot - qcom,sc8180x-smmu-500 93f126890aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 94fac71e4eSEmmanuel Vadot - qcom,sm6115-smmu-500 95fac71e4eSEmmanuel Vadot - qcom,sm6125-smmu-500 96fac71e4eSEmmanuel Vadot - qcom,sm8150-smmu-500 97fac71e4eSEmmanuel Vadot - qcom,sm8250-smmu-500 98fac71e4eSEmmanuel Vadot - qcom,sm8350-smmu-500 998d13bc63SEmmanuel Vadot - qcom,sm8450-smmu-500 1008d13bc63SEmmanuel Vadot - qcom,sm8550-smmu-500 10101950c46SEmmanuel Vadot - qcom,sm8650-smmu-500 1020e8011faSEmmanuel Vadot - qcom,x1e80100-smmu-500 103fac71e4eSEmmanuel Vadot - const: qcom,adreno-smmu 104fac71e4eSEmmanuel Vadot - const: qcom,smmu-500 105fac71e4eSEmmanuel Vadot - const: arm,mmu-500 106fac71e4eSEmmanuel Vadot - description: Qcom Adreno GPUs implementing "arm,mmu-500" (legacy binding) 107fac71e4eSEmmanuel Vadot deprecated: true 108fac71e4eSEmmanuel Vadot items: 109fac71e4eSEmmanuel Vadot # Do not add additional SoC to this list. Instead use previous list. 110fac71e4eSEmmanuel Vadot - enum: 111fac71e4eSEmmanuel Vadot - qcom,sc7280-smmu-500 112cb7aa33aSEmmanuel Vadot - qcom,sm8150-smmu-500 1138bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 1148bab661aSEmmanuel Vadot - const: qcom,adreno-smmu 1158bab661aSEmmanuel Vadot - const: arm,mmu-500 1165def4c47SEmmanuel Vadot - description: Qcom Adreno GPUs implementing "arm,smmu-v2" 1175def4c47SEmmanuel Vadot items: 1185def4c47SEmmanuel Vadot - enum: 1198bab661aSEmmanuel Vadot - qcom,msm8996-smmu-v2 1205def4c47SEmmanuel Vadot - qcom,sc7180-smmu-v2 1218bab661aSEmmanuel Vadot - qcom,sdm630-smmu-v2 1225def4c47SEmmanuel Vadot - qcom,sdm845-smmu-v2 1238bab661aSEmmanuel Vadot - qcom,sm6350-smmu-v2 12484943d6fSEmmanuel Vadot - qcom,sm7150-smmu-v2 1255def4c47SEmmanuel Vadot - const: qcom,adreno-smmu 1265def4c47SEmmanuel Vadot - const: qcom,smmu-v2 1278bab661aSEmmanuel Vadot - description: Qcom Adreno GPUs on Google Cheza platform 1288bab661aSEmmanuel Vadot items: 1298bab661aSEmmanuel Vadot - const: qcom,sdm845-smmu-v2 1308bab661aSEmmanuel Vadot - const: qcom,smmu-v2 131c66ec88fSEmmanuel Vadot - description: Marvell SoCs implementing "arm,mmu-500" 132c66ec88fSEmmanuel Vadot items: 133c66ec88fSEmmanuel Vadot - const: marvell,ap806-smmu-500 134c66ec88fSEmmanuel Vadot - const: arm,mmu-500 1355956d97fSEmmanuel Vadot - description: NVIDIA SoCs that require memory controller interaction 1365956d97fSEmmanuel Vadot and may program multiple ARM MMU-500s identically with the memory 1375956d97fSEmmanuel Vadot controller interleaving translations between multiple instances 1385956d97fSEmmanuel Vadot for improved performance. 139c66ec88fSEmmanuel Vadot items: 140c66ec88fSEmmanuel Vadot - enum: 1415956d97fSEmmanuel Vadot - nvidia,tegra186-smmu 142d5b0e70fSEmmanuel Vadot - nvidia,tegra194-smmu 143d5b0e70fSEmmanuel Vadot - nvidia,tegra234-smmu 144c66ec88fSEmmanuel Vadot - const: nvidia,smmu-500 145c66ec88fSEmmanuel Vadot - items: 146c66ec88fSEmmanuel Vadot - const: arm,mmu-500 147c66ec88fSEmmanuel Vadot - const: arm,smmu-v2 148c66ec88fSEmmanuel Vadot - items: 149c66ec88fSEmmanuel Vadot - enum: 150c66ec88fSEmmanuel Vadot - arm,mmu-400 151c66ec88fSEmmanuel Vadot - arm,mmu-401 152c66ec88fSEmmanuel Vadot - const: arm,smmu-v1 153c66ec88fSEmmanuel Vadot - enum: 154c66ec88fSEmmanuel Vadot - arm,smmu-v1 155c66ec88fSEmmanuel Vadot - arm,smmu-v2 156c66ec88fSEmmanuel Vadot - arm,mmu-400 157c66ec88fSEmmanuel Vadot - arm,mmu-401 158c66ec88fSEmmanuel Vadot - arm,mmu-500 159c66ec88fSEmmanuel Vadot - cavium,smmu-v2 160c66ec88fSEmmanuel Vadot 161c66ec88fSEmmanuel Vadot reg: 162c66ec88fSEmmanuel Vadot minItems: 1 163c66ec88fSEmmanuel Vadot maxItems: 2 164c66ec88fSEmmanuel Vadot 165c66ec88fSEmmanuel Vadot '#global-interrupts': 166c66ec88fSEmmanuel Vadot description: The number of global interrupts exposed by the device. 167c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 168c66ec88fSEmmanuel Vadot minimum: 0 169c66ec88fSEmmanuel Vadot maximum: 260 # 2 secure, 2 non-secure, and up to 256 perf counters 170c66ec88fSEmmanuel Vadot 171c66ec88fSEmmanuel Vadot '#iommu-cells': 172c66ec88fSEmmanuel Vadot enum: [ 1, 2 ] 173c66ec88fSEmmanuel Vadot description: | 174c66ec88fSEmmanuel Vadot See Documentation/devicetree/bindings/iommu/iommu.txt for details. With a 175c66ec88fSEmmanuel Vadot value of 1, each IOMMU specifier represents a distinct stream ID emitted 176c66ec88fSEmmanuel Vadot by that device into the relevant SMMU. 177c66ec88fSEmmanuel Vadot 178c66ec88fSEmmanuel Vadot SMMUs with stream matching support and complex masters may use a value of 179c66ec88fSEmmanuel Vadot 2, where the second cell of the IOMMU specifier represents an SMR mask to 180c66ec88fSEmmanuel Vadot combine with the ID in the first cell. Care must be taken to ensure the 181c66ec88fSEmmanuel Vadot set of matched IDs does not result in conflicts. 182c66ec88fSEmmanuel Vadot 183c66ec88fSEmmanuel Vadot interrupts: 184c66ec88fSEmmanuel Vadot minItems: 1 185c66ec88fSEmmanuel Vadot maxItems: 388 # 260 plus 128 contexts 186c66ec88fSEmmanuel Vadot description: | 187c66ec88fSEmmanuel Vadot Interrupt list, with the first #global-interrupts entries corresponding to 188c66ec88fSEmmanuel Vadot the global interrupts and any following entries corresponding to context 189c66ec88fSEmmanuel Vadot interrupts, specified in order of their indexing by the SMMU. 190c66ec88fSEmmanuel Vadot 191c66ec88fSEmmanuel Vadot For SMMUv2 implementations, there must be exactly one interrupt per 192c66ec88fSEmmanuel Vadot context bank. In the case of a single, combined interrupt, it must be 193c66ec88fSEmmanuel Vadot listed multiple times. 194c66ec88fSEmmanuel Vadot 195c66ec88fSEmmanuel Vadot dma-coherent: 196c66ec88fSEmmanuel Vadot description: | 197c66ec88fSEmmanuel Vadot Present if page table walks made by the SMMU are cache coherent with the 198c66ec88fSEmmanuel Vadot CPU. 199c66ec88fSEmmanuel Vadot 200c66ec88fSEmmanuel Vadot NOTE: this only applies to the SMMU itself, not masters connected 201c66ec88fSEmmanuel Vadot upstream of the SMMU. 202c66ec88fSEmmanuel Vadot 203c66ec88fSEmmanuel Vadot calxeda,smmu-secure-config-access: 204c66ec88fSEmmanuel Vadot type: boolean 205c66ec88fSEmmanuel Vadot description: 206c66ec88fSEmmanuel Vadot Enable proper handling of buggy implementations that always use secure 207c66ec88fSEmmanuel Vadot access to SMMU configuration registers. In this case non-secure aliases of 208c66ec88fSEmmanuel Vadot secure registers have to be used during SMMU configuration. 209c66ec88fSEmmanuel Vadot 210c66ec88fSEmmanuel Vadot stream-match-mask: 211c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 212c66ec88fSEmmanuel Vadot description: | 213c66ec88fSEmmanuel Vadot For SMMUs supporting stream matching and using #iommu-cells = <1>, 214c66ec88fSEmmanuel Vadot specifies a mask of bits to ignore when matching stream IDs (e.g. this may 215c66ec88fSEmmanuel Vadot be programmed into the SMRn.MASK field of every stream match register 216c66ec88fSEmmanuel Vadot used). For cases where it is desirable to ignore some portion of every 217c66ec88fSEmmanuel Vadot Stream ID (e.g. for certain MMU-500 configurations given globally unique 218c66ec88fSEmmanuel Vadot input IDs). This property is not valid for SMMUs using stream indexing, or 219c66ec88fSEmmanuel Vadot using stream matching with #iommu-cells = <2>, and may be ignored if 220c66ec88fSEmmanuel Vadot present in such cases. 221c66ec88fSEmmanuel Vadot 222c66ec88fSEmmanuel Vadot clock-names: 2238bab661aSEmmanuel Vadot minItems: 1 2248bab661aSEmmanuel Vadot maxItems: 7 225c66ec88fSEmmanuel Vadot 226c66ec88fSEmmanuel Vadot clocks: 2278bab661aSEmmanuel Vadot minItems: 1 2288bab661aSEmmanuel Vadot maxItems: 7 229c66ec88fSEmmanuel Vadot 230c66ec88fSEmmanuel Vadot power-domains: 231cb7aa33aSEmmanuel Vadot minItems: 1 232cb7aa33aSEmmanuel Vadot maxItems: 3 233c66ec88fSEmmanuel Vadot 234d5b0e70fSEmmanuel Vadot nvidia,memory-controller: 235d5b0e70fSEmmanuel Vadot description: | 236d5b0e70fSEmmanuel Vadot A phandle to the memory controller on NVIDIA Tegra186 and later SoCs. 237d5b0e70fSEmmanuel Vadot The memory controller needs to be programmed with a mapping of memory 238d5b0e70fSEmmanuel Vadot client IDs to ARM SMMU stream IDs. 239d5b0e70fSEmmanuel Vadot 240d5b0e70fSEmmanuel Vadot If this property is absent, the mapping programmed by early firmware 241d5b0e70fSEmmanuel Vadot will be used and it is not guaranteed that IOMMU translations will be 242d5b0e70fSEmmanuel Vadot enabled for any given device. 243d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 244d5b0e70fSEmmanuel Vadot 245c66ec88fSEmmanuel Vadotrequired: 246c66ec88fSEmmanuel Vadot - compatible 247c66ec88fSEmmanuel Vadot - reg 248c66ec88fSEmmanuel Vadot - '#global-interrupts' 249c66ec88fSEmmanuel Vadot - '#iommu-cells' 250c66ec88fSEmmanuel Vadot - interrupts 251c66ec88fSEmmanuel Vadot 252c66ec88fSEmmanuel VadotadditionalProperties: false 253c66ec88fSEmmanuel Vadot 254c66ec88fSEmmanuel VadotallOf: 255c66ec88fSEmmanuel Vadot - if: 256c66ec88fSEmmanuel Vadot properties: 257c66ec88fSEmmanuel Vadot compatible: 258c66ec88fSEmmanuel Vadot contains: 259c66ec88fSEmmanuel Vadot enum: 2605956d97fSEmmanuel Vadot - nvidia,tegra186-smmu 261d5b0e70fSEmmanuel Vadot - nvidia,tegra194-smmu 262d5b0e70fSEmmanuel Vadot - nvidia,tegra234-smmu 263c66ec88fSEmmanuel Vadot then: 264c66ec88fSEmmanuel Vadot properties: 265c66ec88fSEmmanuel Vadot reg: 2665956d97fSEmmanuel Vadot minItems: 1 267c66ec88fSEmmanuel Vadot maxItems: 2 268d5b0e70fSEmmanuel Vadot 269d5b0e70fSEmmanuel Vadot # The reference to the memory controller is required to ensure that the 270d5b0e70fSEmmanuel Vadot # memory client to stream ID mapping can be done synchronously with the 271d5b0e70fSEmmanuel Vadot # IOMMU attachment. 272d5b0e70fSEmmanuel Vadot required: 273d5b0e70fSEmmanuel Vadot - nvidia,memory-controller 274c66ec88fSEmmanuel Vadot else: 275c66ec88fSEmmanuel Vadot properties: 276c66ec88fSEmmanuel Vadot reg: 277c66ec88fSEmmanuel Vadot maxItems: 1 278c66ec88fSEmmanuel Vadot 2798bab661aSEmmanuel Vadot - if: 2808bab661aSEmmanuel Vadot properties: 2818bab661aSEmmanuel Vadot compatible: 2828bab661aSEmmanuel Vadot contains: 2838bab661aSEmmanuel Vadot enum: 2848bab661aSEmmanuel Vadot - qcom,msm8998-smmu-v2 2858bab661aSEmmanuel Vadot - qcom,sdm630-smmu-v2 286aa1a8ff2SEmmanuel Vadot then: 287aa1a8ff2SEmmanuel Vadot anyOf: 288aa1a8ff2SEmmanuel Vadot - properties: 289aa1a8ff2SEmmanuel Vadot clock-names: 290aa1a8ff2SEmmanuel Vadot items: 291aa1a8ff2SEmmanuel Vadot - const: bus 292aa1a8ff2SEmmanuel Vadot clocks: 293aa1a8ff2SEmmanuel Vadot items: 294aa1a8ff2SEmmanuel Vadot - description: bus clock required for downstream bus access and for 295aa1a8ff2SEmmanuel Vadot the smmu ptw 296aa1a8ff2SEmmanuel Vadot - properties: 297aa1a8ff2SEmmanuel Vadot clock-names: 298aa1a8ff2SEmmanuel Vadot items: 299aa1a8ff2SEmmanuel Vadot - const: iface 300aa1a8ff2SEmmanuel Vadot - const: mem 301aa1a8ff2SEmmanuel Vadot - const: mem_iface 302aa1a8ff2SEmmanuel Vadot clocks: 303aa1a8ff2SEmmanuel Vadot items: 304aa1a8ff2SEmmanuel Vadot - description: interface clock required to access smmu's registers 305aa1a8ff2SEmmanuel Vadot through the TCU's programming interface. 306aa1a8ff2SEmmanuel Vadot - description: bus clock required for memory access 307aa1a8ff2SEmmanuel Vadot - description: bus clock required for GPU memory access 308aa1a8ff2SEmmanuel Vadot - properties: 309aa1a8ff2SEmmanuel Vadot clock-names: 310aa1a8ff2SEmmanuel Vadot items: 311aa1a8ff2SEmmanuel Vadot - const: iface-mm 312aa1a8ff2SEmmanuel Vadot - const: iface-smmu 313aa1a8ff2SEmmanuel Vadot - const: bus-smmu 314aa1a8ff2SEmmanuel Vadot clocks: 315aa1a8ff2SEmmanuel Vadot items: 316aa1a8ff2SEmmanuel Vadot - description: interface clock required to access mnoc's registers 317aa1a8ff2SEmmanuel Vadot through the TCU's programming interface. 318aa1a8ff2SEmmanuel Vadot - description: interface clock required to access smmu's registers 319aa1a8ff2SEmmanuel Vadot through the TCU's programming interface. 320aa1a8ff2SEmmanuel Vadot - description: bus clock required for the smmu ptw 321aa1a8ff2SEmmanuel Vadot 322aa1a8ff2SEmmanuel Vadot - if: 323aa1a8ff2SEmmanuel Vadot properties: 324aa1a8ff2SEmmanuel Vadot compatible: 325aa1a8ff2SEmmanuel Vadot contains: 326aa1a8ff2SEmmanuel Vadot enum: 327f126890aSEmmanuel Vadot - qcom,sm6375-smmu-v2 3288bab661aSEmmanuel Vadot then: 3298bab661aSEmmanuel Vadot anyOf: 3308bab661aSEmmanuel Vadot - properties: 3318bab661aSEmmanuel Vadot clock-names: 3328bab661aSEmmanuel Vadot items: 3338bab661aSEmmanuel Vadot - const: bus 3348bab661aSEmmanuel Vadot clocks: 3358bab661aSEmmanuel Vadot items: 3368bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 3378bab661aSEmmanuel Vadot the smmu ptw 3388bab661aSEmmanuel Vadot - properties: 3398bab661aSEmmanuel Vadot clock-names: 3408bab661aSEmmanuel Vadot items: 3418bab661aSEmmanuel Vadot - const: iface 3428bab661aSEmmanuel Vadot - const: mem 3438bab661aSEmmanuel Vadot - const: mem_iface 3448bab661aSEmmanuel Vadot clocks: 3458bab661aSEmmanuel Vadot items: 3468bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3478bab661aSEmmanuel Vadot through the TCU's programming interface. 3488bab661aSEmmanuel Vadot - description: bus clock required for memory access 3498bab661aSEmmanuel Vadot - description: bus clock required for GPU memory access 3508bab661aSEmmanuel Vadot - properties: 3518bab661aSEmmanuel Vadot clock-names: 3528bab661aSEmmanuel Vadot items: 3538bab661aSEmmanuel Vadot - const: iface-mm 3548bab661aSEmmanuel Vadot - const: iface-smmu 3558bab661aSEmmanuel Vadot - const: bus-mm 3568bab661aSEmmanuel Vadot - const: bus-smmu 3578bab661aSEmmanuel Vadot clocks: 3588bab661aSEmmanuel Vadot items: 3598bab661aSEmmanuel Vadot - description: interface clock required to access mnoc's registers 3608bab661aSEmmanuel Vadot through the TCU's programming interface. 3618bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3628bab661aSEmmanuel Vadot through the TCU's programming interface. 3638bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access 3648bab661aSEmmanuel Vadot - description: bus clock required for the smmu ptw 3658bab661aSEmmanuel Vadot 3668bab661aSEmmanuel Vadot - if: 3678bab661aSEmmanuel Vadot properties: 3688bab661aSEmmanuel Vadot compatible: 3698bab661aSEmmanuel Vadot contains: 3708bab661aSEmmanuel Vadot enum: 3718bab661aSEmmanuel Vadot - qcom,msm8996-smmu-v2 3728bab661aSEmmanuel Vadot - qcom,sc7180-smmu-v2 3738bab661aSEmmanuel Vadot - qcom,sdm845-smmu-v2 3748bab661aSEmmanuel Vadot then: 3758bab661aSEmmanuel Vadot properties: 3768bab661aSEmmanuel Vadot clock-names: 3778bab661aSEmmanuel Vadot items: 3788bab661aSEmmanuel Vadot - const: bus 3798bab661aSEmmanuel Vadot - const: iface 3808bab661aSEmmanuel Vadot 3818bab661aSEmmanuel Vadot clocks: 3828bab661aSEmmanuel Vadot items: 3838bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 3848bab661aSEmmanuel Vadot the smmu ptw 3858bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3868bab661aSEmmanuel Vadot through the TCU's programming interface. 3878bab661aSEmmanuel Vadot 3888bab661aSEmmanuel Vadot - if: 3898bab661aSEmmanuel Vadot properties: 3908bab661aSEmmanuel Vadot compatible: 3918bab661aSEmmanuel Vadot contains: 392f126890aSEmmanuel Vadot enum: 393f126890aSEmmanuel Vadot - qcom,sa8775p-smmu-500 394f126890aSEmmanuel Vadot - qcom,sc7280-smmu-500 395f126890aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 3968bab661aSEmmanuel Vadot then: 3978bab661aSEmmanuel Vadot properties: 3988bab661aSEmmanuel Vadot clock-names: 3998bab661aSEmmanuel Vadot items: 4008bab661aSEmmanuel Vadot - const: gcc_gpu_memnoc_gfx_clk 4018bab661aSEmmanuel Vadot - const: gcc_gpu_snoc_dvm_gfx_clk 4028bab661aSEmmanuel Vadot - const: gpu_cc_ahb_clk 4038bab661aSEmmanuel Vadot - const: gpu_cc_hlos1_vote_gpu_smmu_clk 4048bab661aSEmmanuel Vadot - const: gpu_cc_cx_gmu_clk 4058bab661aSEmmanuel Vadot - const: gpu_cc_hub_cx_int_clk 4068bab661aSEmmanuel Vadot - const: gpu_cc_hub_aon_clk 4078bab661aSEmmanuel Vadot 4088bab661aSEmmanuel Vadot clocks: 4098bab661aSEmmanuel Vadot items: 4108bab661aSEmmanuel Vadot - description: GPU memnoc_gfx clock 4118bab661aSEmmanuel Vadot - description: GPU snoc_dvm_gfx clock 4128bab661aSEmmanuel Vadot - description: GPU ahb clock 4138bab661aSEmmanuel Vadot - description: GPU hlos1_vote_GPU smmu clock 4148bab661aSEmmanuel Vadot - description: GPU cx_gmu clock 4158bab661aSEmmanuel Vadot - description: GPU hub_cx_int clock 4168bab661aSEmmanuel Vadot - description: GPU hub_aon clock 4178bab661aSEmmanuel Vadot 4188bab661aSEmmanuel Vadot - if: 4198bab661aSEmmanuel Vadot properties: 4208bab661aSEmmanuel Vadot compatible: 4218bab661aSEmmanuel Vadot contains: 4228bab661aSEmmanuel Vadot enum: 4230e8011faSEmmanuel Vadot - qcom,sc8180x-smmu-500 4248bab661aSEmmanuel Vadot - qcom,sm6350-smmu-v2 42584943d6fSEmmanuel Vadot - qcom,sm7150-smmu-v2 4268bab661aSEmmanuel Vadot - qcom,sm8150-smmu-500 4278bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 4288bab661aSEmmanuel Vadot then: 4298bab661aSEmmanuel Vadot properties: 4308bab661aSEmmanuel Vadot clock-names: 4318bab661aSEmmanuel Vadot items: 4328bab661aSEmmanuel Vadot - const: ahb 4338bab661aSEmmanuel Vadot - const: bus 4348bab661aSEmmanuel Vadot - const: iface 4358bab661aSEmmanuel Vadot 4368bab661aSEmmanuel Vadot clocks: 4378bab661aSEmmanuel Vadot items: 4388bab661aSEmmanuel Vadot - description: bus clock required for AHB bus access 4398bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 4408bab661aSEmmanuel Vadot the smmu ptw 4418bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 4428bab661aSEmmanuel Vadot through the TCU's programming interface. 4438bab661aSEmmanuel Vadot 444fac71e4eSEmmanuel Vadot - if: 445fac71e4eSEmmanuel Vadot properties: 446fac71e4eSEmmanuel Vadot compatible: 447fac71e4eSEmmanuel Vadot items: 448fac71e4eSEmmanuel Vadot - enum: 4498d13bc63SEmmanuel Vadot - qcom,sm8350-smmu-500 4508d13bc63SEmmanuel Vadot - const: qcom,adreno-smmu 4518d13bc63SEmmanuel Vadot - const: qcom,smmu-500 4528d13bc63SEmmanuel Vadot - const: arm,mmu-500 4538d13bc63SEmmanuel Vadot then: 4548d13bc63SEmmanuel Vadot properties: 4558d13bc63SEmmanuel Vadot clock-names: 4568d13bc63SEmmanuel Vadot items: 4578d13bc63SEmmanuel Vadot - const: bus 4588d13bc63SEmmanuel Vadot - const: iface 4598d13bc63SEmmanuel Vadot - const: ahb 4608d13bc63SEmmanuel Vadot - const: hlos1_vote_gpu_smmu 4618d13bc63SEmmanuel Vadot - const: cx_gmu 4628d13bc63SEmmanuel Vadot - const: hub_cx_int 4638d13bc63SEmmanuel Vadot - const: hub_aon 4648d13bc63SEmmanuel Vadot clocks: 4658d13bc63SEmmanuel Vadot minItems: 7 4668d13bc63SEmmanuel Vadot maxItems: 7 4678d13bc63SEmmanuel Vadot 4688d13bc63SEmmanuel Vadot - if: 4698d13bc63SEmmanuel Vadot properties: 4708d13bc63SEmmanuel Vadot compatible: 4718d13bc63SEmmanuel Vadot items: 4728d13bc63SEmmanuel Vadot - enum: 47301950c46SEmmanuel Vadot - qcom,qcm2290-smmu-500 474fac71e4eSEmmanuel Vadot - qcom,sm6115-smmu-500 475fac71e4eSEmmanuel Vadot - qcom,sm6125-smmu-500 476fac71e4eSEmmanuel Vadot - const: qcom,adreno-smmu 477fac71e4eSEmmanuel Vadot - const: qcom,smmu-500 478fac71e4eSEmmanuel Vadot - const: arm,mmu-500 479fac71e4eSEmmanuel Vadot then: 480fac71e4eSEmmanuel Vadot properties: 481fac71e4eSEmmanuel Vadot clock-names: 482fac71e4eSEmmanuel Vadot items: 483fac71e4eSEmmanuel Vadot - const: mem 484fac71e4eSEmmanuel Vadot - const: hlos 485fac71e4eSEmmanuel Vadot - const: iface 486fac71e4eSEmmanuel Vadot 487fac71e4eSEmmanuel Vadot clocks: 488fac71e4eSEmmanuel Vadot items: 489fac71e4eSEmmanuel Vadot - description: GPU memory bus clock 490fac71e4eSEmmanuel Vadot - description: Voter clock required for HLOS SMMU access 491fac71e4eSEmmanuel Vadot - description: Interface clock required for register access 492fac71e4eSEmmanuel Vadot 4938d13bc63SEmmanuel Vadot - if: 4948d13bc63SEmmanuel Vadot properties: 4958d13bc63SEmmanuel Vadot compatible: 49601950c46SEmmanuel Vadot items: 49701950c46SEmmanuel Vadot - const: qcom,sm8450-smmu-500 49801950c46SEmmanuel Vadot - const: qcom,adreno-smmu 49901950c46SEmmanuel Vadot - const: qcom,smmu-500 50001950c46SEmmanuel Vadot - const: arm,mmu-500 50101950c46SEmmanuel Vadot 5028d13bc63SEmmanuel Vadot then: 5038d13bc63SEmmanuel Vadot properties: 5048d13bc63SEmmanuel Vadot clock-names: 5058d13bc63SEmmanuel Vadot items: 5068d13bc63SEmmanuel Vadot - const: gmu 5078d13bc63SEmmanuel Vadot - const: hub 5088d13bc63SEmmanuel Vadot - const: hlos 5098d13bc63SEmmanuel Vadot - const: bus 5108d13bc63SEmmanuel Vadot - const: iface 5118d13bc63SEmmanuel Vadot - const: ahb 5128d13bc63SEmmanuel Vadot 5138d13bc63SEmmanuel Vadot clocks: 5148d13bc63SEmmanuel Vadot items: 5158d13bc63SEmmanuel Vadot - description: GMU clock 5168d13bc63SEmmanuel Vadot - description: GPU HUB clock 5178d13bc63SEmmanuel Vadot - description: HLOS vote clock 5188d13bc63SEmmanuel Vadot - description: GPU memory bus clock 5198d13bc63SEmmanuel Vadot - description: GPU SNoC bus clock 5208d13bc63SEmmanuel Vadot - description: GPU AHB clock 5218d13bc63SEmmanuel Vadot 5228d13bc63SEmmanuel Vadot - if: 5238d13bc63SEmmanuel Vadot properties: 5248d13bc63SEmmanuel Vadot compatible: 52501950c46SEmmanuel Vadot items: 52601950c46SEmmanuel Vadot - enum: 52701950c46SEmmanuel Vadot - qcom,sm8550-smmu-500 52801950c46SEmmanuel Vadot - qcom,sm8650-smmu-500 5290e8011faSEmmanuel Vadot - qcom,x1e80100-smmu-500 53001950c46SEmmanuel Vadot - const: qcom,adreno-smmu 53101950c46SEmmanuel Vadot - const: qcom,smmu-500 53201950c46SEmmanuel Vadot - const: arm,mmu-500 5338d13bc63SEmmanuel Vadot then: 5348d13bc63SEmmanuel Vadot properties: 5358d13bc63SEmmanuel Vadot clock-names: 5368d13bc63SEmmanuel Vadot items: 5378d13bc63SEmmanuel Vadot - const: hlos 5388d13bc63SEmmanuel Vadot - const: bus 5398d13bc63SEmmanuel Vadot - const: iface 5408d13bc63SEmmanuel Vadot - const: ahb 5418d13bc63SEmmanuel Vadot 5428d13bc63SEmmanuel Vadot clocks: 5438d13bc63SEmmanuel Vadot items: 5448d13bc63SEmmanuel Vadot - description: HLOS vote clock 5458d13bc63SEmmanuel Vadot - description: GPU memory bus clock 5468d13bc63SEmmanuel Vadot - description: GPU SNoC bus clock 5478d13bc63SEmmanuel Vadot - description: GPU AHB clock 5488d13bc63SEmmanuel Vadot 549cb7aa33aSEmmanuel Vadot # Disallow clocks for all other platforms with specific compatibles 550cb7aa33aSEmmanuel Vadot - if: 551cb7aa33aSEmmanuel Vadot properties: 552cb7aa33aSEmmanuel Vadot compatible: 553cb7aa33aSEmmanuel Vadot contains: 554cb7aa33aSEmmanuel Vadot enum: 555cb7aa33aSEmmanuel Vadot - cavium,smmu-v2 556cb7aa33aSEmmanuel Vadot - marvell,ap806-smmu-500 557cb7aa33aSEmmanuel Vadot - nvidia,smmu-500 558*b2d2a78aSEmmanuel Vadot - qcom,qcs8300-smmu-500 559cb7aa33aSEmmanuel Vadot - qcom,qdu1000-smmu-500 560*b2d2a78aSEmmanuel Vadot - qcom,sa8255p-smmu-500 561cb7aa33aSEmmanuel Vadot - qcom,sc7180-smmu-500 562cb7aa33aSEmmanuel Vadot - qcom,sdm670-smmu-500 563cb7aa33aSEmmanuel Vadot - qcom,sdm845-smmu-500 564cb7aa33aSEmmanuel Vadot - qcom,sdx55-smmu-500 565cb7aa33aSEmmanuel Vadot - qcom,sdx65-smmu-500 566cb7aa33aSEmmanuel Vadot - qcom,sm6350-smmu-500 567cb7aa33aSEmmanuel Vadot - qcom,sm6375-smmu-500 568cb7aa33aSEmmanuel Vadot then: 569cb7aa33aSEmmanuel Vadot properties: 570cb7aa33aSEmmanuel Vadot clock-names: false 571cb7aa33aSEmmanuel Vadot clocks: false 572cb7aa33aSEmmanuel Vadot 573cb7aa33aSEmmanuel Vadot - if: 574cb7aa33aSEmmanuel Vadot properties: 575cb7aa33aSEmmanuel Vadot compatible: 576cb7aa33aSEmmanuel Vadot contains: 577cb7aa33aSEmmanuel Vadot const: qcom,sm6375-smmu-500 578cb7aa33aSEmmanuel Vadot then: 579cb7aa33aSEmmanuel Vadot properties: 580cb7aa33aSEmmanuel Vadot power-domains: 581cb7aa33aSEmmanuel Vadot items: 582cb7aa33aSEmmanuel Vadot - description: SNoC MMU TBU RT GDSC 583cb7aa33aSEmmanuel Vadot - description: SNoC MMU TBU NRT GDSC 584cb7aa33aSEmmanuel Vadot - description: SNoC TURING MMU TBU0 GDSC 585cb7aa33aSEmmanuel Vadot 586cb7aa33aSEmmanuel Vadot required: 587cb7aa33aSEmmanuel Vadot - power-domains 588cb7aa33aSEmmanuel Vadot else: 589cb7aa33aSEmmanuel Vadot properties: 590cb7aa33aSEmmanuel Vadot power-domains: 591cb7aa33aSEmmanuel Vadot maxItems: 1 592cb7aa33aSEmmanuel Vadot 593c66ec88fSEmmanuel Vadotexamples: 594c66ec88fSEmmanuel Vadot - |+ 595c66ec88fSEmmanuel Vadot /* SMMU with stream matching or stream indexing */ 596c66ec88fSEmmanuel Vadot smmu1: iommu@ba5e0000 { 597c66ec88fSEmmanuel Vadot compatible = "arm,smmu-v1"; 598c66ec88fSEmmanuel Vadot reg = <0xba5e0000 0x10000>; 599c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 600c66ec88fSEmmanuel Vadot interrupts = <0 32 4>, 601c66ec88fSEmmanuel Vadot <0 33 4>, 602c66ec88fSEmmanuel Vadot <0 34 4>, /* This is the first context interrupt */ 603c66ec88fSEmmanuel Vadot <0 35 4>, 604c66ec88fSEmmanuel Vadot <0 36 4>, 605c66ec88fSEmmanuel Vadot <0 37 4>; 606c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 607c66ec88fSEmmanuel Vadot }; 608c66ec88fSEmmanuel Vadot 609c66ec88fSEmmanuel Vadot /* device with two stream IDs, 0 and 7 */ 610c66ec88fSEmmanuel Vadot master1 { 611c66ec88fSEmmanuel Vadot iommus = <&smmu1 0>, 612c66ec88fSEmmanuel Vadot <&smmu1 7>; 613c66ec88fSEmmanuel Vadot }; 614c66ec88fSEmmanuel Vadot 615c66ec88fSEmmanuel Vadot 616c66ec88fSEmmanuel Vadot /* SMMU with stream matching */ 617c66ec88fSEmmanuel Vadot smmu2: iommu@ba5f0000 { 618c66ec88fSEmmanuel Vadot compatible = "arm,smmu-v1"; 619c66ec88fSEmmanuel Vadot reg = <0xba5f0000 0x10000>; 620c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 621c66ec88fSEmmanuel Vadot interrupts = <0 38 4>, 622c66ec88fSEmmanuel Vadot <0 39 4>, 623c66ec88fSEmmanuel Vadot <0 40 4>, /* This is the first context interrupt */ 624c66ec88fSEmmanuel Vadot <0 41 4>, 625c66ec88fSEmmanuel Vadot <0 42 4>, 626c66ec88fSEmmanuel Vadot <0 43 4>; 627c66ec88fSEmmanuel Vadot #iommu-cells = <2>; 628c66ec88fSEmmanuel Vadot }; 629c66ec88fSEmmanuel Vadot 630c66ec88fSEmmanuel Vadot /* device with stream IDs 0 and 7 */ 631c66ec88fSEmmanuel Vadot master2 { 632c66ec88fSEmmanuel Vadot iommus = <&smmu2 0 0>, 633c66ec88fSEmmanuel Vadot <&smmu2 7 0>; 634c66ec88fSEmmanuel Vadot }; 635c66ec88fSEmmanuel Vadot 636c66ec88fSEmmanuel Vadot /* device with stream IDs 1, 17, 33 and 49 */ 637c66ec88fSEmmanuel Vadot master3 { 638c66ec88fSEmmanuel Vadot iommus = <&smmu2 1 0x30>; 639c66ec88fSEmmanuel Vadot }; 640c66ec88fSEmmanuel Vadot 641c66ec88fSEmmanuel Vadot 642c66ec88fSEmmanuel Vadot /* ARM MMU-500 with 10-bit stream ID input configuration */ 643c66ec88fSEmmanuel Vadot smmu3: iommu@ba600000 { 644c66ec88fSEmmanuel Vadot compatible = "arm,mmu-500", "arm,smmu-v2"; 645c66ec88fSEmmanuel Vadot reg = <0xba600000 0x10000>; 646c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 647c66ec88fSEmmanuel Vadot interrupts = <0 44 4>, 648c66ec88fSEmmanuel Vadot <0 45 4>, 649c66ec88fSEmmanuel Vadot <0 46 4>, /* This is the first context interrupt */ 650c66ec88fSEmmanuel Vadot <0 47 4>, 651c66ec88fSEmmanuel Vadot <0 48 4>, 652c66ec88fSEmmanuel Vadot <0 49 4>; 653c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 654c66ec88fSEmmanuel Vadot /* always ignore appended 5-bit TBU number */ 655c66ec88fSEmmanuel Vadot stream-match-mask = <0x7c00>; 656c66ec88fSEmmanuel Vadot }; 657c66ec88fSEmmanuel Vadot 658c66ec88fSEmmanuel Vadot bus { 659c66ec88fSEmmanuel Vadot /* bus whose child devices emit one unique 10-bit stream 660c66ec88fSEmmanuel Vadot ID each, but may master through multiple SMMU TBUs */ 661c66ec88fSEmmanuel Vadot iommu-map = <0 &smmu3 0 0x400>; 662c66ec88fSEmmanuel Vadot 663c66ec88fSEmmanuel Vadot 664c66ec88fSEmmanuel Vadot }; 665c66ec88fSEmmanuel Vadot 666c66ec88fSEmmanuel Vadot - |+ 667c66ec88fSEmmanuel Vadot /* Qcom's arm,smmu-v2 implementation */ 668c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 669c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 670c66ec88fSEmmanuel Vadot smmu4: iommu@d00000 { 671c66ec88fSEmmanuel Vadot compatible = "qcom,msm8996-smmu-v2", "qcom,smmu-v2"; 672c66ec88fSEmmanuel Vadot reg = <0xd00000 0x10000>; 673c66ec88fSEmmanuel Vadot 674c66ec88fSEmmanuel Vadot #global-interrupts = <1>; 675c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>, 676c66ec88fSEmmanuel Vadot <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>, 677c66ec88fSEmmanuel Vadot <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>; 678c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 679c66ec88fSEmmanuel Vadot power-domains = <&mmcc 0>; 680c66ec88fSEmmanuel Vadot 681c66ec88fSEmmanuel Vadot clocks = <&mmcc 123>, 682c66ec88fSEmmanuel Vadot <&mmcc 124>; 683c66ec88fSEmmanuel Vadot clock-names = "bus", "iface"; 684c66ec88fSEmmanuel Vadot }; 685