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 398bab661aSEmmanuel Vadot - qcom,qdu1000-smmu-500 40cb7aa33aSEmmanuel Vadot - qcom,sa8775p-smmu-500 418bab661aSEmmanuel Vadot - qcom,sc7180-smmu-500 428bab661aSEmmanuel Vadot - qcom,sc7280-smmu-500 438bab661aSEmmanuel Vadot - qcom,sc8180x-smmu-500 448bab661aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 458bab661aSEmmanuel Vadot - qcom,sdm670-smmu-500 468bab661aSEmmanuel Vadot - qcom,sdm845-smmu-500 47cb7aa33aSEmmanuel Vadot - qcom,sdx55-smmu-500 48cb7aa33aSEmmanuel Vadot - qcom,sdx65-smmu-500 49f126890aSEmmanuel Vadot - qcom,sdx75-smmu-500 508bab661aSEmmanuel Vadot - qcom,sm6115-smmu-500 51cb7aa33aSEmmanuel Vadot - qcom,sm6125-smmu-500 528bab661aSEmmanuel Vadot - qcom,sm6350-smmu-500 538bab661aSEmmanuel Vadot - qcom,sm6375-smmu-500 548bab661aSEmmanuel Vadot - qcom,sm8150-smmu-500 558bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 568bab661aSEmmanuel Vadot - qcom,sm8350-smmu-500 578bab661aSEmmanuel Vadot - qcom,sm8450-smmu-500 58fac71e4eSEmmanuel Vadot - qcom,sm8550-smmu-500 59*8d13bc63SEmmanuel Vadot - qcom,sm8650-smmu-500 60*8d13bc63SEmmanuel Vadot - qcom,x1e80100-smmu-500 618bab661aSEmmanuel Vadot - const: qcom,smmu-500 628bab661aSEmmanuel Vadot - const: arm,mmu-500 638bab661aSEmmanuel Vadot 648bab661aSEmmanuel Vadot - description: Qcom SoCs implementing "arm,mmu-500" (legacy binding) 658bab661aSEmmanuel Vadot deprecated: true 668bab661aSEmmanuel Vadot items: 678bab661aSEmmanuel Vadot # Do not add additional SoC to this list. Instead use two previous lists. 688bab661aSEmmanuel Vadot - enum: 698bab661aSEmmanuel Vadot - qcom,qcm2290-smmu-500 70c66ec88fSEmmanuel Vadot - qcom,sc7180-smmu-500 712eb4d8dcSEmmanuel Vadot - qcom,sc7280-smmu-500 725def4c47SEmmanuel Vadot - qcom,sc8180x-smmu-500 73d5b0e70fSEmmanuel Vadot - qcom,sc8280xp-smmu-500 74c66ec88fSEmmanuel Vadot - qcom,sdm845-smmu-500 758bab661aSEmmanuel Vadot - qcom,sm6115-smmu-500 768cc087a1SEmmanuel Vadot - qcom,sm6350-smmu-500 77b97ee269SEmmanuel Vadot - qcom,sm6375-smmu-500 78c66ec88fSEmmanuel Vadot - qcom,sm8150-smmu-500 79c66ec88fSEmmanuel Vadot - qcom,sm8250-smmu-500 805def4c47SEmmanuel Vadot - qcom,sm8350-smmu-500 81e67e8565SEmmanuel Vadot - qcom,sm8450-smmu-500 82c66ec88fSEmmanuel Vadot - const: arm,mmu-500 83fac71e4eSEmmanuel Vadot - description: Qcom Adreno GPUs implementing "qcom,smmu-500" and "arm,mmu-500" 848bab661aSEmmanuel Vadot items: 858bab661aSEmmanuel Vadot - enum: 86f126890aSEmmanuel Vadot - qcom,sa8775p-smmu-500 878bab661aSEmmanuel Vadot - qcom,sc7280-smmu-500 88f126890aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 89fac71e4eSEmmanuel Vadot - qcom,sm6115-smmu-500 90fac71e4eSEmmanuel Vadot - qcom,sm6125-smmu-500 91fac71e4eSEmmanuel Vadot - qcom,sm8150-smmu-500 92fac71e4eSEmmanuel Vadot - qcom,sm8250-smmu-500 93fac71e4eSEmmanuel Vadot - qcom,sm8350-smmu-500 94*8d13bc63SEmmanuel Vadot - qcom,sm8450-smmu-500 95*8d13bc63SEmmanuel Vadot - qcom,sm8550-smmu-500 96fac71e4eSEmmanuel Vadot - const: qcom,adreno-smmu 97fac71e4eSEmmanuel Vadot - const: qcom,smmu-500 98fac71e4eSEmmanuel Vadot - const: arm,mmu-500 99fac71e4eSEmmanuel Vadot - description: Qcom Adreno GPUs implementing "arm,mmu-500" (legacy binding) 100fac71e4eSEmmanuel Vadot deprecated: true 101fac71e4eSEmmanuel Vadot items: 102fac71e4eSEmmanuel Vadot # Do not add additional SoC to this list. Instead use previous list. 103fac71e4eSEmmanuel Vadot - enum: 104fac71e4eSEmmanuel Vadot - qcom,sc7280-smmu-500 105cb7aa33aSEmmanuel Vadot - qcom,sm8150-smmu-500 1068bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 1078bab661aSEmmanuel Vadot - const: qcom,adreno-smmu 1088bab661aSEmmanuel Vadot - const: arm,mmu-500 1095def4c47SEmmanuel Vadot - description: Qcom Adreno GPUs implementing "arm,smmu-v2" 1105def4c47SEmmanuel Vadot items: 1115def4c47SEmmanuel Vadot - enum: 1128bab661aSEmmanuel Vadot - qcom,msm8996-smmu-v2 1135def4c47SEmmanuel Vadot - qcom,sc7180-smmu-v2 1148bab661aSEmmanuel Vadot - qcom,sdm630-smmu-v2 1155def4c47SEmmanuel Vadot - qcom,sdm845-smmu-v2 1168bab661aSEmmanuel Vadot - qcom,sm6350-smmu-v2 11784943d6fSEmmanuel Vadot - qcom,sm7150-smmu-v2 1185def4c47SEmmanuel Vadot - const: qcom,adreno-smmu 1195def4c47SEmmanuel Vadot - const: qcom,smmu-v2 1208bab661aSEmmanuel Vadot - description: Qcom Adreno GPUs on Google Cheza platform 1218bab661aSEmmanuel Vadot items: 1228bab661aSEmmanuel Vadot - const: qcom,sdm845-smmu-v2 1238bab661aSEmmanuel Vadot - const: qcom,smmu-v2 124c66ec88fSEmmanuel Vadot - description: Marvell SoCs implementing "arm,mmu-500" 125c66ec88fSEmmanuel Vadot items: 126c66ec88fSEmmanuel Vadot - const: marvell,ap806-smmu-500 127c66ec88fSEmmanuel Vadot - const: arm,mmu-500 1285956d97fSEmmanuel Vadot - description: NVIDIA SoCs that require memory controller interaction 1295956d97fSEmmanuel Vadot and may program multiple ARM MMU-500s identically with the memory 1305956d97fSEmmanuel Vadot controller interleaving translations between multiple instances 1315956d97fSEmmanuel Vadot for improved performance. 132c66ec88fSEmmanuel Vadot items: 133c66ec88fSEmmanuel Vadot - enum: 1345956d97fSEmmanuel Vadot - nvidia,tegra186-smmu 135d5b0e70fSEmmanuel Vadot - nvidia,tegra194-smmu 136d5b0e70fSEmmanuel Vadot - nvidia,tegra234-smmu 137c66ec88fSEmmanuel Vadot - const: nvidia,smmu-500 138c66ec88fSEmmanuel Vadot - items: 139c66ec88fSEmmanuel Vadot - const: arm,mmu-500 140c66ec88fSEmmanuel Vadot - const: arm,smmu-v2 141c66ec88fSEmmanuel Vadot - items: 142c66ec88fSEmmanuel Vadot - enum: 143c66ec88fSEmmanuel Vadot - arm,mmu-400 144c66ec88fSEmmanuel Vadot - arm,mmu-401 145c66ec88fSEmmanuel Vadot - const: arm,smmu-v1 146c66ec88fSEmmanuel Vadot - enum: 147c66ec88fSEmmanuel Vadot - arm,smmu-v1 148c66ec88fSEmmanuel Vadot - arm,smmu-v2 149c66ec88fSEmmanuel Vadot - arm,mmu-400 150c66ec88fSEmmanuel Vadot - arm,mmu-401 151c66ec88fSEmmanuel Vadot - arm,mmu-500 152c66ec88fSEmmanuel Vadot - cavium,smmu-v2 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel Vadot reg: 155c66ec88fSEmmanuel Vadot minItems: 1 156c66ec88fSEmmanuel Vadot maxItems: 2 157c66ec88fSEmmanuel Vadot 158c66ec88fSEmmanuel Vadot '#global-interrupts': 159c66ec88fSEmmanuel Vadot description: The number of global interrupts exposed by the device. 160c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 161c66ec88fSEmmanuel Vadot minimum: 0 162c66ec88fSEmmanuel Vadot maximum: 260 # 2 secure, 2 non-secure, and up to 256 perf counters 163c66ec88fSEmmanuel Vadot 164c66ec88fSEmmanuel Vadot '#iommu-cells': 165c66ec88fSEmmanuel Vadot enum: [ 1, 2 ] 166c66ec88fSEmmanuel Vadot description: | 167c66ec88fSEmmanuel Vadot See Documentation/devicetree/bindings/iommu/iommu.txt for details. With a 168c66ec88fSEmmanuel Vadot value of 1, each IOMMU specifier represents a distinct stream ID emitted 169c66ec88fSEmmanuel Vadot by that device into the relevant SMMU. 170c66ec88fSEmmanuel Vadot 171c66ec88fSEmmanuel Vadot SMMUs with stream matching support and complex masters may use a value of 172c66ec88fSEmmanuel Vadot 2, where the second cell of the IOMMU specifier represents an SMR mask to 173c66ec88fSEmmanuel Vadot combine with the ID in the first cell. Care must be taken to ensure the 174c66ec88fSEmmanuel Vadot set of matched IDs does not result in conflicts. 175c66ec88fSEmmanuel Vadot 176c66ec88fSEmmanuel Vadot interrupts: 177c66ec88fSEmmanuel Vadot minItems: 1 178c66ec88fSEmmanuel Vadot maxItems: 388 # 260 plus 128 contexts 179c66ec88fSEmmanuel Vadot description: | 180c66ec88fSEmmanuel Vadot Interrupt list, with the first #global-interrupts entries corresponding to 181c66ec88fSEmmanuel Vadot the global interrupts and any following entries corresponding to context 182c66ec88fSEmmanuel Vadot interrupts, specified in order of their indexing by the SMMU. 183c66ec88fSEmmanuel Vadot 184c66ec88fSEmmanuel Vadot For SMMUv2 implementations, there must be exactly one interrupt per 185c66ec88fSEmmanuel Vadot context bank. In the case of a single, combined interrupt, it must be 186c66ec88fSEmmanuel Vadot listed multiple times. 187c66ec88fSEmmanuel Vadot 188c66ec88fSEmmanuel Vadot dma-coherent: 189c66ec88fSEmmanuel Vadot description: | 190c66ec88fSEmmanuel Vadot Present if page table walks made by the SMMU are cache coherent with the 191c66ec88fSEmmanuel Vadot CPU. 192c66ec88fSEmmanuel Vadot 193c66ec88fSEmmanuel Vadot NOTE: this only applies to the SMMU itself, not masters connected 194c66ec88fSEmmanuel Vadot upstream of the SMMU. 195c66ec88fSEmmanuel Vadot 196c66ec88fSEmmanuel Vadot calxeda,smmu-secure-config-access: 197c66ec88fSEmmanuel Vadot type: boolean 198c66ec88fSEmmanuel Vadot description: 199c66ec88fSEmmanuel Vadot Enable proper handling of buggy implementations that always use secure 200c66ec88fSEmmanuel Vadot access to SMMU configuration registers. In this case non-secure aliases of 201c66ec88fSEmmanuel Vadot secure registers have to be used during SMMU configuration. 202c66ec88fSEmmanuel Vadot 203c66ec88fSEmmanuel Vadot stream-match-mask: 204c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 205c66ec88fSEmmanuel Vadot description: | 206c66ec88fSEmmanuel Vadot For SMMUs supporting stream matching and using #iommu-cells = <1>, 207c66ec88fSEmmanuel Vadot specifies a mask of bits to ignore when matching stream IDs (e.g. this may 208c66ec88fSEmmanuel Vadot be programmed into the SMRn.MASK field of every stream match register 209c66ec88fSEmmanuel Vadot used). For cases where it is desirable to ignore some portion of every 210c66ec88fSEmmanuel Vadot Stream ID (e.g. for certain MMU-500 configurations given globally unique 211c66ec88fSEmmanuel Vadot input IDs). This property is not valid for SMMUs using stream indexing, or 212c66ec88fSEmmanuel Vadot using stream matching with #iommu-cells = <2>, and may be ignored if 213c66ec88fSEmmanuel Vadot present in such cases. 214c66ec88fSEmmanuel Vadot 215c66ec88fSEmmanuel Vadot clock-names: 2168bab661aSEmmanuel Vadot minItems: 1 2178bab661aSEmmanuel Vadot maxItems: 7 218c66ec88fSEmmanuel Vadot 219c66ec88fSEmmanuel Vadot clocks: 2208bab661aSEmmanuel Vadot minItems: 1 2218bab661aSEmmanuel Vadot maxItems: 7 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadot power-domains: 224cb7aa33aSEmmanuel Vadot minItems: 1 225cb7aa33aSEmmanuel Vadot maxItems: 3 226c66ec88fSEmmanuel Vadot 227d5b0e70fSEmmanuel Vadot nvidia,memory-controller: 228d5b0e70fSEmmanuel Vadot description: | 229d5b0e70fSEmmanuel Vadot A phandle to the memory controller on NVIDIA Tegra186 and later SoCs. 230d5b0e70fSEmmanuel Vadot The memory controller needs to be programmed with a mapping of memory 231d5b0e70fSEmmanuel Vadot client IDs to ARM SMMU stream IDs. 232d5b0e70fSEmmanuel Vadot 233d5b0e70fSEmmanuel Vadot If this property is absent, the mapping programmed by early firmware 234d5b0e70fSEmmanuel Vadot will be used and it is not guaranteed that IOMMU translations will be 235d5b0e70fSEmmanuel Vadot enabled for any given device. 236d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 237d5b0e70fSEmmanuel Vadot 238c66ec88fSEmmanuel Vadotrequired: 239c66ec88fSEmmanuel Vadot - compatible 240c66ec88fSEmmanuel Vadot - reg 241c66ec88fSEmmanuel Vadot - '#global-interrupts' 242c66ec88fSEmmanuel Vadot - '#iommu-cells' 243c66ec88fSEmmanuel Vadot - interrupts 244c66ec88fSEmmanuel Vadot 245c66ec88fSEmmanuel VadotadditionalProperties: false 246c66ec88fSEmmanuel Vadot 247c66ec88fSEmmanuel VadotallOf: 248c66ec88fSEmmanuel Vadot - if: 249c66ec88fSEmmanuel Vadot properties: 250c66ec88fSEmmanuel Vadot compatible: 251c66ec88fSEmmanuel Vadot contains: 252c66ec88fSEmmanuel Vadot enum: 2535956d97fSEmmanuel Vadot - nvidia,tegra186-smmu 254d5b0e70fSEmmanuel Vadot - nvidia,tegra194-smmu 255d5b0e70fSEmmanuel Vadot - nvidia,tegra234-smmu 256c66ec88fSEmmanuel Vadot then: 257c66ec88fSEmmanuel Vadot properties: 258c66ec88fSEmmanuel Vadot reg: 2595956d97fSEmmanuel Vadot minItems: 1 260c66ec88fSEmmanuel Vadot maxItems: 2 261d5b0e70fSEmmanuel Vadot 262d5b0e70fSEmmanuel Vadot # The reference to the memory controller is required to ensure that the 263d5b0e70fSEmmanuel Vadot # memory client to stream ID mapping can be done synchronously with the 264d5b0e70fSEmmanuel Vadot # IOMMU attachment. 265d5b0e70fSEmmanuel Vadot required: 266d5b0e70fSEmmanuel Vadot - nvidia,memory-controller 267c66ec88fSEmmanuel Vadot else: 268c66ec88fSEmmanuel Vadot properties: 269c66ec88fSEmmanuel Vadot reg: 270c66ec88fSEmmanuel Vadot maxItems: 1 271c66ec88fSEmmanuel Vadot 2728bab661aSEmmanuel Vadot - if: 2738bab661aSEmmanuel Vadot properties: 2748bab661aSEmmanuel Vadot compatible: 2758bab661aSEmmanuel Vadot contains: 2768bab661aSEmmanuel Vadot enum: 2778bab661aSEmmanuel Vadot - qcom,msm8998-smmu-v2 2788bab661aSEmmanuel Vadot - qcom,sdm630-smmu-v2 279aa1a8ff2SEmmanuel Vadot then: 280aa1a8ff2SEmmanuel Vadot anyOf: 281aa1a8ff2SEmmanuel Vadot - properties: 282aa1a8ff2SEmmanuel Vadot clock-names: 283aa1a8ff2SEmmanuel Vadot items: 284aa1a8ff2SEmmanuel Vadot - const: bus 285aa1a8ff2SEmmanuel Vadot clocks: 286aa1a8ff2SEmmanuel Vadot items: 287aa1a8ff2SEmmanuel Vadot - description: bus clock required for downstream bus access and for 288aa1a8ff2SEmmanuel Vadot the smmu ptw 289aa1a8ff2SEmmanuel Vadot - properties: 290aa1a8ff2SEmmanuel Vadot clock-names: 291aa1a8ff2SEmmanuel Vadot items: 292aa1a8ff2SEmmanuel Vadot - const: iface 293aa1a8ff2SEmmanuel Vadot - const: mem 294aa1a8ff2SEmmanuel Vadot - const: mem_iface 295aa1a8ff2SEmmanuel Vadot clocks: 296aa1a8ff2SEmmanuel Vadot items: 297aa1a8ff2SEmmanuel Vadot - description: interface clock required to access smmu's registers 298aa1a8ff2SEmmanuel Vadot through the TCU's programming interface. 299aa1a8ff2SEmmanuel Vadot - description: bus clock required for memory access 300aa1a8ff2SEmmanuel Vadot - description: bus clock required for GPU memory access 301aa1a8ff2SEmmanuel Vadot - properties: 302aa1a8ff2SEmmanuel Vadot clock-names: 303aa1a8ff2SEmmanuel Vadot items: 304aa1a8ff2SEmmanuel Vadot - const: iface-mm 305aa1a8ff2SEmmanuel Vadot - const: iface-smmu 306aa1a8ff2SEmmanuel Vadot - const: bus-smmu 307aa1a8ff2SEmmanuel Vadot clocks: 308aa1a8ff2SEmmanuel Vadot items: 309aa1a8ff2SEmmanuel Vadot - description: interface clock required to access mnoc's registers 310aa1a8ff2SEmmanuel Vadot through the TCU's programming interface. 311aa1a8ff2SEmmanuel Vadot - description: interface clock required to access smmu's registers 312aa1a8ff2SEmmanuel Vadot through the TCU's programming interface. 313aa1a8ff2SEmmanuel Vadot - description: bus clock required for the smmu ptw 314aa1a8ff2SEmmanuel Vadot 315aa1a8ff2SEmmanuel Vadot - if: 316aa1a8ff2SEmmanuel Vadot properties: 317aa1a8ff2SEmmanuel Vadot compatible: 318aa1a8ff2SEmmanuel Vadot contains: 319aa1a8ff2SEmmanuel Vadot enum: 320f126890aSEmmanuel Vadot - qcom,sm6375-smmu-v2 3218bab661aSEmmanuel Vadot then: 3228bab661aSEmmanuel Vadot anyOf: 3238bab661aSEmmanuel Vadot - properties: 3248bab661aSEmmanuel Vadot clock-names: 3258bab661aSEmmanuel Vadot items: 3268bab661aSEmmanuel Vadot - const: bus 3278bab661aSEmmanuel Vadot clocks: 3288bab661aSEmmanuel Vadot items: 3298bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 3308bab661aSEmmanuel Vadot the smmu ptw 3318bab661aSEmmanuel Vadot - properties: 3328bab661aSEmmanuel Vadot clock-names: 3338bab661aSEmmanuel Vadot items: 3348bab661aSEmmanuel Vadot - const: iface 3358bab661aSEmmanuel Vadot - const: mem 3368bab661aSEmmanuel Vadot - const: mem_iface 3378bab661aSEmmanuel Vadot clocks: 3388bab661aSEmmanuel Vadot items: 3398bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3408bab661aSEmmanuel Vadot through the TCU's programming interface. 3418bab661aSEmmanuel Vadot - description: bus clock required for memory access 3428bab661aSEmmanuel Vadot - description: bus clock required for GPU memory access 3438bab661aSEmmanuel Vadot - properties: 3448bab661aSEmmanuel Vadot clock-names: 3458bab661aSEmmanuel Vadot items: 3468bab661aSEmmanuel Vadot - const: iface-mm 3478bab661aSEmmanuel Vadot - const: iface-smmu 3488bab661aSEmmanuel Vadot - const: bus-mm 3498bab661aSEmmanuel Vadot - const: bus-smmu 3508bab661aSEmmanuel Vadot clocks: 3518bab661aSEmmanuel Vadot items: 3528bab661aSEmmanuel Vadot - description: interface clock required to access mnoc's registers 3538bab661aSEmmanuel Vadot through the TCU's programming interface. 3548bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3558bab661aSEmmanuel Vadot through the TCU's programming interface. 3568bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access 3578bab661aSEmmanuel Vadot - description: bus clock required for the smmu ptw 3588bab661aSEmmanuel Vadot 3598bab661aSEmmanuel Vadot - if: 3608bab661aSEmmanuel Vadot properties: 3618bab661aSEmmanuel Vadot compatible: 3628bab661aSEmmanuel Vadot contains: 3638bab661aSEmmanuel Vadot enum: 3648bab661aSEmmanuel Vadot - qcom,msm8996-smmu-v2 3658bab661aSEmmanuel Vadot - qcom,sc7180-smmu-v2 3668bab661aSEmmanuel Vadot - qcom,sdm845-smmu-v2 3678bab661aSEmmanuel Vadot then: 3688bab661aSEmmanuel Vadot properties: 3698bab661aSEmmanuel Vadot clock-names: 3708bab661aSEmmanuel Vadot items: 3718bab661aSEmmanuel Vadot - const: bus 3728bab661aSEmmanuel Vadot - const: iface 3738bab661aSEmmanuel Vadot 3748bab661aSEmmanuel Vadot clocks: 3758bab661aSEmmanuel Vadot items: 3768bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 3778bab661aSEmmanuel Vadot the smmu ptw 3788bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3798bab661aSEmmanuel Vadot through the TCU's programming interface. 3808bab661aSEmmanuel Vadot 3818bab661aSEmmanuel Vadot - if: 3828bab661aSEmmanuel Vadot properties: 3838bab661aSEmmanuel Vadot compatible: 3848bab661aSEmmanuel Vadot contains: 385f126890aSEmmanuel Vadot enum: 386f126890aSEmmanuel Vadot - qcom,sa8775p-smmu-500 387f126890aSEmmanuel Vadot - qcom,sc7280-smmu-500 388f126890aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 3898bab661aSEmmanuel Vadot then: 3908bab661aSEmmanuel Vadot properties: 3918bab661aSEmmanuel Vadot clock-names: 3928bab661aSEmmanuel Vadot items: 3938bab661aSEmmanuel Vadot - const: gcc_gpu_memnoc_gfx_clk 3948bab661aSEmmanuel Vadot - const: gcc_gpu_snoc_dvm_gfx_clk 3958bab661aSEmmanuel Vadot - const: gpu_cc_ahb_clk 3968bab661aSEmmanuel Vadot - const: gpu_cc_hlos1_vote_gpu_smmu_clk 3978bab661aSEmmanuel Vadot - const: gpu_cc_cx_gmu_clk 3988bab661aSEmmanuel Vadot - const: gpu_cc_hub_cx_int_clk 3998bab661aSEmmanuel Vadot - const: gpu_cc_hub_aon_clk 4008bab661aSEmmanuel Vadot 4018bab661aSEmmanuel Vadot clocks: 4028bab661aSEmmanuel Vadot items: 4038bab661aSEmmanuel Vadot - description: GPU memnoc_gfx clock 4048bab661aSEmmanuel Vadot - description: GPU snoc_dvm_gfx clock 4058bab661aSEmmanuel Vadot - description: GPU ahb clock 4068bab661aSEmmanuel Vadot - description: GPU hlos1_vote_GPU smmu clock 4078bab661aSEmmanuel Vadot - description: GPU cx_gmu clock 4088bab661aSEmmanuel Vadot - description: GPU hub_cx_int clock 4098bab661aSEmmanuel Vadot - description: GPU hub_aon clock 4108bab661aSEmmanuel Vadot 4118bab661aSEmmanuel Vadot - if: 4128bab661aSEmmanuel Vadot properties: 4138bab661aSEmmanuel Vadot compatible: 4148bab661aSEmmanuel Vadot contains: 4158bab661aSEmmanuel Vadot enum: 4168bab661aSEmmanuel Vadot - qcom,sm6350-smmu-v2 41784943d6fSEmmanuel Vadot - qcom,sm7150-smmu-v2 4188bab661aSEmmanuel Vadot - qcom,sm8150-smmu-500 4198bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 4208bab661aSEmmanuel Vadot then: 4218bab661aSEmmanuel Vadot properties: 4228bab661aSEmmanuel Vadot clock-names: 4238bab661aSEmmanuel Vadot items: 4248bab661aSEmmanuel Vadot - const: ahb 4258bab661aSEmmanuel Vadot - const: bus 4268bab661aSEmmanuel Vadot - const: iface 4278bab661aSEmmanuel Vadot 4288bab661aSEmmanuel Vadot clocks: 4298bab661aSEmmanuel Vadot items: 4308bab661aSEmmanuel Vadot - description: bus clock required for AHB bus access 4318bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 4328bab661aSEmmanuel Vadot the smmu ptw 4338bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 4348bab661aSEmmanuel Vadot through the TCU's programming interface. 4358bab661aSEmmanuel Vadot 436fac71e4eSEmmanuel Vadot - if: 437fac71e4eSEmmanuel Vadot properties: 438fac71e4eSEmmanuel Vadot compatible: 439fac71e4eSEmmanuel Vadot items: 440fac71e4eSEmmanuel Vadot - enum: 441*8d13bc63SEmmanuel Vadot - qcom,sm8350-smmu-500 442*8d13bc63SEmmanuel Vadot - const: qcom,adreno-smmu 443*8d13bc63SEmmanuel Vadot - const: qcom,smmu-500 444*8d13bc63SEmmanuel Vadot - const: arm,mmu-500 445*8d13bc63SEmmanuel Vadot then: 446*8d13bc63SEmmanuel Vadot properties: 447*8d13bc63SEmmanuel Vadot clock-names: 448*8d13bc63SEmmanuel Vadot items: 449*8d13bc63SEmmanuel Vadot - const: bus 450*8d13bc63SEmmanuel Vadot - const: iface 451*8d13bc63SEmmanuel Vadot - const: ahb 452*8d13bc63SEmmanuel Vadot - const: hlos1_vote_gpu_smmu 453*8d13bc63SEmmanuel Vadot - const: cx_gmu 454*8d13bc63SEmmanuel Vadot - const: hub_cx_int 455*8d13bc63SEmmanuel Vadot - const: hub_aon 456*8d13bc63SEmmanuel Vadot clocks: 457*8d13bc63SEmmanuel Vadot minItems: 7 458*8d13bc63SEmmanuel Vadot maxItems: 7 459*8d13bc63SEmmanuel Vadot 460*8d13bc63SEmmanuel Vadot - if: 461*8d13bc63SEmmanuel Vadot properties: 462*8d13bc63SEmmanuel Vadot compatible: 463*8d13bc63SEmmanuel Vadot items: 464*8d13bc63SEmmanuel Vadot - enum: 465fac71e4eSEmmanuel Vadot - qcom,sm6115-smmu-500 466fac71e4eSEmmanuel Vadot - qcom,sm6125-smmu-500 467fac71e4eSEmmanuel Vadot - const: qcom,adreno-smmu 468fac71e4eSEmmanuel Vadot - const: qcom,smmu-500 469fac71e4eSEmmanuel Vadot - const: arm,mmu-500 470fac71e4eSEmmanuel Vadot then: 471fac71e4eSEmmanuel Vadot properties: 472fac71e4eSEmmanuel Vadot clock-names: 473fac71e4eSEmmanuel Vadot items: 474fac71e4eSEmmanuel Vadot - const: mem 475fac71e4eSEmmanuel Vadot - const: hlos 476fac71e4eSEmmanuel Vadot - const: iface 477fac71e4eSEmmanuel Vadot 478fac71e4eSEmmanuel Vadot clocks: 479fac71e4eSEmmanuel Vadot items: 480fac71e4eSEmmanuel Vadot - description: GPU memory bus clock 481fac71e4eSEmmanuel Vadot - description: Voter clock required for HLOS SMMU access 482fac71e4eSEmmanuel Vadot - description: Interface clock required for register access 483fac71e4eSEmmanuel Vadot 484*8d13bc63SEmmanuel Vadot - if: 485*8d13bc63SEmmanuel Vadot properties: 486*8d13bc63SEmmanuel Vadot compatible: 487*8d13bc63SEmmanuel Vadot const: qcom,sm8450-smmu-500 488*8d13bc63SEmmanuel Vadot then: 489*8d13bc63SEmmanuel Vadot properties: 490*8d13bc63SEmmanuel Vadot clock-names: 491*8d13bc63SEmmanuel Vadot items: 492*8d13bc63SEmmanuel Vadot - const: gmu 493*8d13bc63SEmmanuel Vadot - const: hub 494*8d13bc63SEmmanuel Vadot - const: hlos 495*8d13bc63SEmmanuel Vadot - const: bus 496*8d13bc63SEmmanuel Vadot - const: iface 497*8d13bc63SEmmanuel Vadot - const: ahb 498*8d13bc63SEmmanuel Vadot 499*8d13bc63SEmmanuel Vadot clocks: 500*8d13bc63SEmmanuel Vadot items: 501*8d13bc63SEmmanuel Vadot - description: GMU clock 502*8d13bc63SEmmanuel Vadot - description: GPU HUB clock 503*8d13bc63SEmmanuel Vadot - description: HLOS vote clock 504*8d13bc63SEmmanuel Vadot - description: GPU memory bus clock 505*8d13bc63SEmmanuel Vadot - description: GPU SNoC bus clock 506*8d13bc63SEmmanuel Vadot - description: GPU AHB clock 507*8d13bc63SEmmanuel Vadot 508*8d13bc63SEmmanuel Vadot - if: 509*8d13bc63SEmmanuel Vadot properties: 510*8d13bc63SEmmanuel Vadot compatible: 511*8d13bc63SEmmanuel Vadot const: qcom,sm8550-smmu-500 512*8d13bc63SEmmanuel Vadot then: 513*8d13bc63SEmmanuel Vadot properties: 514*8d13bc63SEmmanuel Vadot clock-names: 515*8d13bc63SEmmanuel Vadot items: 516*8d13bc63SEmmanuel Vadot - const: hlos 517*8d13bc63SEmmanuel Vadot - const: bus 518*8d13bc63SEmmanuel Vadot - const: iface 519*8d13bc63SEmmanuel Vadot - const: ahb 520*8d13bc63SEmmanuel Vadot 521*8d13bc63SEmmanuel Vadot clocks: 522*8d13bc63SEmmanuel Vadot items: 523*8d13bc63SEmmanuel Vadot - description: HLOS vote clock 524*8d13bc63SEmmanuel Vadot - description: GPU memory bus clock 525*8d13bc63SEmmanuel Vadot - description: GPU SNoC bus clock 526*8d13bc63SEmmanuel Vadot - description: GPU AHB clock 527*8d13bc63SEmmanuel Vadot 528cb7aa33aSEmmanuel Vadot # Disallow clocks for all other platforms with specific compatibles 529cb7aa33aSEmmanuel Vadot - if: 530cb7aa33aSEmmanuel Vadot properties: 531cb7aa33aSEmmanuel Vadot compatible: 532cb7aa33aSEmmanuel Vadot contains: 533cb7aa33aSEmmanuel Vadot enum: 534cb7aa33aSEmmanuel Vadot - cavium,smmu-v2 535cb7aa33aSEmmanuel Vadot - marvell,ap806-smmu-500 536cb7aa33aSEmmanuel Vadot - nvidia,smmu-500 537cb7aa33aSEmmanuel Vadot - qcom,qcm2290-smmu-500 538cb7aa33aSEmmanuel Vadot - qcom,qdu1000-smmu-500 539cb7aa33aSEmmanuel Vadot - qcom,sc7180-smmu-500 540cb7aa33aSEmmanuel Vadot - qcom,sc8180x-smmu-500 541cb7aa33aSEmmanuel Vadot - qcom,sdm670-smmu-500 542cb7aa33aSEmmanuel Vadot - qcom,sdm845-smmu-500 543cb7aa33aSEmmanuel Vadot - qcom,sdx55-smmu-500 544cb7aa33aSEmmanuel Vadot - qcom,sdx65-smmu-500 545cb7aa33aSEmmanuel Vadot - qcom,sm6350-smmu-500 546cb7aa33aSEmmanuel Vadot - qcom,sm6375-smmu-500 547*8d13bc63SEmmanuel Vadot - qcom,sm8650-smmu-500 548*8d13bc63SEmmanuel Vadot - qcom,x1e80100-smmu-500 549cb7aa33aSEmmanuel Vadot then: 550cb7aa33aSEmmanuel Vadot properties: 551cb7aa33aSEmmanuel Vadot clock-names: false 552cb7aa33aSEmmanuel Vadot clocks: false 553cb7aa33aSEmmanuel Vadot 554cb7aa33aSEmmanuel Vadot - if: 555cb7aa33aSEmmanuel Vadot properties: 556cb7aa33aSEmmanuel Vadot compatible: 557cb7aa33aSEmmanuel Vadot contains: 558cb7aa33aSEmmanuel Vadot const: qcom,sm6375-smmu-500 559cb7aa33aSEmmanuel Vadot then: 560cb7aa33aSEmmanuel Vadot properties: 561cb7aa33aSEmmanuel Vadot power-domains: 562cb7aa33aSEmmanuel Vadot items: 563cb7aa33aSEmmanuel Vadot - description: SNoC MMU TBU RT GDSC 564cb7aa33aSEmmanuel Vadot - description: SNoC MMU TBU NRT GDSC 565cb7aa33aSEmmanuel Vadot - description: SNoC TURING MMU TBU0 GDSC 566cb7aa33aSEmmanuel Vadot 567cb7aa33aSEmmanuel Vadot required: 568cb7aa33aSEmmanuel Vadot - power-domains 569cb7aa33aSEmmanuel Vadot else: 570cb7aa33aSEmmanuel Vadot properties: 571cb7aa33aSEmmanuel Vadot power-domains: 572cb7aa33aSEmmanuel Vadot maxItems: 1 573cb7aa33aSEmmanuel Vadot 574c66ec88fSEmmanuel Vadotexamples: 575c66ec88fSEmmanuel Vadot - |+ 576c66ec88fSEmmanuel Vadot /* SMMU with stream matching or stream indexing */ 577c66ec88fSEmmanuel Vadot smmu1: iommu@ba5e0000 { 578c66ec88fSEmmanuel Vadot compatible = "arm,smmu-v1"; 579c66ec88fSEmmanuel Vadot reg = <0xba5e0000 0x10000>; 580c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 581c66ec88fSEmmanuel Vadot interrupts = <0 32 4>, 582c66ec88fSEmmanuel Vadot <0 33 4>, 583c66ec88fSEmmanuel Vadot <0 34 4>, /* This is the first context interrupt */ 584c66ec88fSEmmanuel Vadot <0 35 4>, 585c66ec88fSEmmanuel Vadot <0 36 4>, 586c66ec88fSEmmanuel Vadot <0 37 4>; 587c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 588c66ec88fSEmmanuel Vadot }; 589c66ec88fSEmmanuel Vadot 590c66ec88fSEmmanuel Vadot /* device with two stream IDs, 0 and 7 */ 591c66ec88fSEmmanuel Vadot master1 { 592c66ec88fSEmmanuel Vadot iommus = <&smmu1 0>, 593c66ec88fSEmmanuel Vadot <&smmu1 7>; 594c66ec88fSEmmanuel Vadot }; 595c66ec88fSEmmanuel Vadot 596c66ec88fSEmmanuel Vadot 597c66ec88fSEmmanuel Vadot /* SMMU with stream matching */ 598c66ec88fSEmmanuel Vadot smmu2: iommu@ba5f0000 { 599c66ec88fSEmmanuel Vadot compatible = "arm,smmu-v1"; 600c66ec88fSEmmanuel Vadot reg = <0xba5f0000 0x10000>; 601c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 602c66ec88fSEmmanuel Vadot interrupts = <0 38 4>, 603c66ec88fSEmmanuel Vadot <0 39 4>, 604c66ec88fSEmmanuel Vadot <0 40 4>, /* This is the first context interrupt */ 605c66ec88fSEmmanuel Vadot <0 41 4>, 606c66ec88fSEmmanuel Vadot <0 42 4>, 607c66ec88fSEmmanuel Vadot <0 43 4>; 608c66ec88fSEmmanuel Vadot #iommu-cells = <2>; 609c66ec88fSEmmanuel Vadot }; 610c66ec88fSEmmanuel Vadot 611c66ec88fSEmmanuel Vadot /* device with stream IDs 0 and 7 */ 612c66ec88fSEmmanuel Vadot master2 { 613c66ec88fSEmmanuel Vadot iommus = <&smmu2 0 0>, 614c66ec88fSEmmanuel Vadot <&smmu2 7 0>; 615c66ec88fSEmmanuel Vadot }; 616c66ec88fSEmmanuel Vadot 617c66ec88fSEmmanuel Vadot /* device with stream IDs 1, 17, 33 and 49 */ 618c66ec88fSEmmanuel Vadot master3 { 619c66ec88fSEmmanuel Vadot iommus = <&smmu2 1 0x30>; 620c66ec88fSEmmanuel Vadot }; 621c66ec88fSEmmanuel Vadot 622c66ec88fSEmmanuel Vadot 623c66ec88fSEmmanuel Vadot /* ARM MMU-500 with 10-bit stream ID input configuration */ 624c66ec88fSEmmanuel Vadot smmu3: iommu@ba600000 { 625c66ec88fSEmmanuel Vadot compatible = "arm,mmu-500", "arm,smmu-v2"; 626c66ec88fSEmmanuel Vadot reg = <0xba600000 0x10000>; 627c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 628c66ec88fSEmmanuel Vadot interrupts = <0 44 4>, 629c66ec88fSEmmanuel Vadot <0 45 4>, 630c66ec88fSEmmanuel Vadot <0 46 4>, /* This is the first context interrupt */ 631c66ec88fSEmmanuel Vadot <0 47 4>, 632c66ec88fSEmmanuel Vadot <0 48 4>, 633c66ec88fSEmmanuel Vadot <0 49 4>; 634c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 635c66ec88fSEmmanuel Vadot /* always ignore appended 5-bit TBU number */ 636c66ec88fSEmmanuel Vadot stream-match-mask = <0x7c00>; 637c66ec88fSEmmanuel Vadot }; 638c66ec88fSEmmanuel Vadot 639c66ec88fSEmmanuel Vadot bus { 640c66ec88fSEmmanuel Vadot /* bus whose child devices emit one unique 10-bit stream 641c66ec88fSEmmanuel Vadot ID each, but may master through multiple SMMU TBUs */ 642c66ec88fSEmmanuel Vadot iommu-map = <0 &smmu3 0 0x400>; 643c66ec88fSEmmanuel Vadot 644c66ec88fSEmmanuel Vadot 645c66ec88fSEmmanuel Vadot }; 646c66ec88fSEmmanuel Vadot 647c66ec88fSEmmanuel Vadot - |+ 648c66ec88fSEmmanuel Vadot /* Qcom's arm,smmu-v2 implementation */ 649c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 650c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 651c66ec88fSEmmanuel Vadot smmu4: iommu@d00000 { 652c66ec88fSEmmanuel Vadot compatible = "qcom,msm8996-smmu-v2", "qcom,smmu-v2"; 653c66ec88fSEmmanuel Vadot reg = <0xd00000 0x10000>; 654c66ec88fSEmmanuel Vadot 655c66ec88fSEmmanuel Vadot #global-interrupts = <1>; 656c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>, 657c66ec88fSEmmanuel Vadot <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>, 658c66ec88fSEmmanuel Vadot <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>; 659c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 660c66ec88fSEmmanuel Vadot power-domains = <&mmcc 0>; 661c66ec88fSEmmanuel Vadot 662c66ec88fSEmmanuel Vadot clocks = <&mmcc 123>, 663c66ec88fSEmmanuel Vadot <&mmcc 124>; 664c66ec88fSEmmanuel Vadot clock-names = "bus", "iface"; 665c66ec88fSEmmanuel Vadot }; 666