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 32c66ec88fSEmmanuel Vadot - const: qcom,smmu-v2 33c66ec88fSEmmanuel Vadot 348bab661aSEmmanuel Vadot - description: Qcom SoCs implementing "qcom,smmu-500" and "arm,mmu-500" 35c66ec88fSEmmanuel Vadot items: 36c66ec88fSEmmanuel Vadot - enum: 378cc087a1SEmmanuel Vadot - qcom,qcm2290-smmu-500 388bab661aSEmmanuel Vadot - qcom,qdu1000-smmu-500 39cb7aa33aSEmmanuel Vadot - qcom,sa8775p-smmu-500 408bab661aSEmmanuel Vadot - qcom,sc7180-smmu-500 418bab661aSEmmanuel Vadot - qcom,sc7280-smmu-500 428bab661aSEmmanuel Vadot - qcom,sc8180x-smmu-500 438bab661aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 448bab661aSEmmanuel Vadot - qcom,sdm670-smmu-500 458bab661aSEmmanuel Vadot - qcom,sdm845-smmu-500 46cb7aa33aSEmmanuel Vadot - qcom,sdx55-smmu-500 47cb7aa33aSEmmanuel Vadot - qcom,sdx65-smmu-500 488bab661aSEmmanuel Vadot - qcom,sm6115-smmu-500 49cb7aa33aSEmmanuel Vadot - qcom,sm6125-smmu-500 508bab661aSEmmanuel Vadot - qcom,sm6350-smmu-500 518bab661aSEmmanuel Vadot - qcom,sm6375-smmu-500 528bab661aSEmmanuel Vadot - qcom,sm8150-smmu-500 538bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 548bab661aSEmmanuel Vadot - qcom,sm8350-smmu-500 558bab661aSEmmanuel Vadot - qcom,sm8450-smmu-500 56*fac71e4eSEmmanuel Vadot - qcom,sm8550-smmu-500 578bab661aSEmmanuel Vadot - const: qcom,smmu-500 588bab661aSEmmanuel Vadot - const: arm,mmu-500 598bab661aSEmmanuel Vadot 608bab661aSEmmanuel Vadot - description: Qcom SoCs implementing "arm,mmu-500" (legacy binding) 618bab661aSEmmanuel Vadot deprecated: true 628bab661aSEmmanuel Vadot items: 638bab661aSEmmanuel Vadot # Do not add additional SoC to this list. Instead use two previous lists. 648bab661aSEmmanuel Vadot - enum: 658bab661aSEmmanuel Vadot - qcom,qcm2290-smmu-500 66c66ec88fSEmmanuel Vadot - qcom,sc7180-smmu-500 672eb4d8dcSEmmanuel Vadot - qcom,sc7280-smmu-500 685def4c47SEmmanuel Vadot - qcom,sc8180x-smmu-500 69d5b0e70fSEmmanuel Vadot - qcom,sc8280xp-smmu-500 70c66ec88fSEmmanuel Vadot - qcom,sdm845-smmu-500 718bab661aSEmmanuel Vadot - qcom,sm6115-smmu-500 728cc087a1SEmmanuel Vadot - qcom,sm6350-smmu-500 73b97ee269SEmmanuel Vadot - qcom,sm6375-smmu-500 74c66ec88fSEmmanuel Vadot - qcom,sm8150-smmu-500 75c66ec88fSEmmanuel Vadot - qcom,sm8250-smmu-500 765def4c47SEmmanuel Vadot - qcom,sm8350-smmu-500 77e67e8565SEmmanuel Vadot - qcom,sm8450-smmu-500 78c66ec88fSEmmanuel Vadot - const: arm,mmu-500 79*fac71e4eSEmmanuel Vadot - description: Qcom Adreno GPUs implementing "qcom,smmu-500" and "arm,mmu-500" 808bab661aSEmmanuel Vadot items: 818bab661aSEmmanuel Vadot - enum: 828bab661aSEmmanuel Vadot - qcom,sc7280-smmu-500 83*fac71e4eSEmmanuel Vadot - qcom,sm6115-smmu-500 84*fac71e4eSEmmanuel Vadot - qcom,sm6125-smmu-500 85*fac71e4eSEmmanuel Vadot - qcom,sm8150-smmu-500 86*fac71e4eSEmmanuel Vadot - qcom,sm8250-smmu-500 87*fac71e4eSEmmanuel Vadot - qcom,sm8350-smmu-500 88*fac71e4eSEmmanuel Vadot - const: qcom,adreno-smmu 89*fac71e4eSEmmanuel Vadot - const: qcom,smmu-500 90*fac71e4eSEmmanuel Vadot - const: arm,mmu-500 91*fac71e4eSEmmanuel Vadot - description: Qcom Adreno GPUs implementing "arm,mmu-500" (legacy binding) 92*fac71e4eSEmmanuel Vadot deprecated: true 93*fac71e4eSEmmanuel Vadot items: 94*fac71e4eSEmmanuel Vadot # Do not add additional SoC to this list. Instead use previous list. 95*fac71e4eSEmmanuel Vadot - enum: 96*fac71e4eSEmmanuel Vadot - qcom,sc7280-smmu-500 97cb7aa33aSEmmanuel Vadot - qcom,sm8150-smmu-500 988bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 998bab661aSEmmanuel Vadot - const: qcom,adreno-smmu 1008bab661aSEmmanuel Vadot - const: arm,mmu-500 1015def4c47SEmmanuel Vadot - description: Qcom Adreno GPUs implementing "arm,smmu-v2" 1025def4c47SEmmanuel Vadot items: 1035def4c47SEmmanuel Vadot - enum: 1048bab661aSEmmanuel Vadot - qcom,msm8996-smmu-v2 1055def4c47SEmmanuel Vadot - qcom,sc7180-smmu-v2 1068bab661aSEmmanuel Vadot - qcom,sdm630-smmu-v2 1075def4c47SEmmanuel Vadot - qcom,sdm845-smmu-v2 1088bab661aSEmmanuel Vadot - qcom,sm6350-smmu-v2 1095def4c47SEmmanuel Vadot - const: qcom,adreno-smmu 1105def4c47SEmmanuel Vadot - const: qcom,smmu-v2 1118bab661aSEmmanuel Vadot - description: Qcom Adreno GPUs on Google Cheza platform 1128bab661aSEmmanuel Vadot items: 1138bab661aSEmmanuel Vadot - const: qcom,sdm845-smmu-v2 1148bab661aSEmmanuel Vadot - const: qcom,smmu-v2 115c66ec88fSEmmanuel Vadot - description: Marvell SoCs implementing "arm,mmu-500" 116c66ec88fSEmmanuel Vadot items: 117c66ec88fSEmmanuel Vadot - const: marvell,ap806-smmu-500 118c66ec88fSEmmanuel Vadot - const: arm,mmu-500 1195956d97fSEmmanuel Vadot - description: NVIDIA SoCs that require memory controller interaction 1205956d97fSEmmanuel Vadot and may program multiple ARM MMU-500s identically with the memory 1215956d97fSEmmanuel Vadot controller interleaving translations between multiple instances 1225956d97fSEmmanuel Vadot for improved performance. 123c66ec88fSEmmanuel Vadot items: 124c66ec88fSEmmanuel Vadot - enum: 1255956d97fSEmmanuel Vadot - nvidia,tegra186-smmu 126d5b0e70fSEmmanuel Vadot - nvidia,tegra194-smmu 127d5b0e70fSEmmanuel Vadot - nvidia,tegra234-smmu 128c66ec88fSEmmanuel Vadot - const: nvidia,smmu-500 129c66ec88fSEmmanuel Vadot - items: 130c66ec88fSEmmanuel Vadot - const: arm,mmu-500 131c66ec88fSEmmanuel Vadot - const: arm,smmu-v2 132c66ec88fSEmmanuel Vadot - items: 133c66ec88fSEmmanuel Vadot - enum: 134c66ec88fSEmmanuel Vadot - arm,mmu-400 135c66ec88fSEmmanuel Vadot - arm,mmu-401 136c66ec88fSEmmanuel Vadot - const: arm,smmu-v1 137c66ec88fSEmmanuel Vadot - enum: 138c66ec88fSEmmanuel Vadot - arm,smmu-v1 139c66ec88fSEmmanuel Vadot - arm,smmu-v2 140c66ec88fSEmmanuel Vadot - arm,mmu-400 141c66ec88fSEmmanuel Vadot - arm,mmu-401 142c66ec88fSEmmanuel Vadot - arm,mmu-500 143c66ec88fSEmmanuel Vadot - cavium,smmu-v2 144c66ec88fSEmmanuel Vadot 145c66ec88fSEmmanuel Vadot reg: 146c66ec88fSEmmanuel Vadot minItems: 1 147c66ec88fSEmmanuel Vadot maxItems: 2 148c66ec88fSEmmanuel Vadot 149c66ec88fSEmmanuel Vadot '#global-interrupts': 150c66ec88fSEmmanuel Vadot description: The number of global interrupts exposed by the device. 151c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 152c66ec88fSEmmanuel Vadot minimum: 0 153c66ec88fSEmmanuel Vadot maximum: 260 # 2 secure, 2 non-secure, and up to 256 perf counters 154c66ec88fSEmmanuel Vadot 155c66ec88fSEmmanuel Vadot '#iommu-cells': 156c66ec88fSEmmanuel Vadot enum: [ 1, 2 ] 157c66ec88fSEmmanuel Vadot description: | 158c66ec88fSEmmanuel Vadot See Documentation/devicetree/bindings/iommu/iommu.txt for details. With a 159c66ec88fSEmmanuel Vadot value of 1, each IOMMU specifier represents a distinct stream ID emitted 160c66ec88fSEmmanuel Vadot by that device into the relevant SMMU. 161c66ec88fSEmmanuel Vadot 162c66ec88fSEmmanuel Vadot SMMUs with stream matching support and complex masters may use a value of 163c66ec88fSEmmanuel Vadot 2, where the second cell of the IOMMU specifier represents an SMR mask to 164c66ec88fSEmmanuel Vadot combine with the ID in the first cell. Care must be taken to ensure the 165c66ec88fSEmmanuel Vadot set of matched IDs does not result in conflicts. 166c66ec88fSEmmanuel Vadot 167c66ec88fSEmmanuel Vadot interrupts: 168c66ec88fSEmmanuel Vadot minItems: 1 169c66ec88fSEmmanuel Vadot maxItems: 388 # 260 plus 128 contexts 170c66ec88fSEmmanuel Vadot description: | 171c66ec88fSEmmanuel Vadot Interrupt list, with the first #global-interrupts entries corresponding to 172c66ec88fSEmmanuel Vadot the global interrupts and any following entries corresponding to context 173c66ec88fSEmmanuel Vadot interrupts, specified in order of their indexing by the SMMU. 174c66ec88fSEmmanuel Vadot 175c66ec88fSEmmanuel Vadot For SMMUv2 implementations, there must be exactly one interrupt per 176c66ec88fSEmmanuel Vadot context bank. In the case of a single, combined interrupt, it must be 177c66ec88fSEmmanuel Vadot listed multiple times. 178c66ec88fSEmmanuel Vadot 179c66ec88fSEmmanuel Vadot dma-coherent: 180c66ec88fSEmmanuel Vadot description: | 181c66ec88fSEmmanuel Vadot Present if page table walks made by the SMMU are cache coherent with the 182c66ec88fSEmmanuel Vadot CPU. 183c66ec88fSEmmanuel Vadot 184c66ec88fSEmmanuel Vadot NOTE: this only applies to the SMMU itself, not masters connected 185c66ec88fSEmmanuel Vadot upstream of the SMMU. 186c66ec88fSEmmanuel Vadot 187c66ec88fSEmmanuel Vadot calxeda,smmu-secure-config-access: 188c66ec88fSEmmanuel Vadot type: boolean 189c66ec88fSEmmanuel Vadot description: 190c66ec88fSEmmanuel Vadot Enable proper handling of buggy implementations that always use secure 191c66ec88fSEmmanuel Vadot access to SMMU configuration registers. In this case non-secure aliases of 192c66ec88fSEmmanuel Vadot secure registers have to be used during SMMU configuration. 193c66ec88fSEmmanuel Vadot 194c66ec88fSEmmanuel Vadot stream-match-mask: 195c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 196c66ec88fSEmmanuel Vadot description: | 197c66ec88fSEmmanuel Vadot For SMMUs supporting stream matching and using #iommu-cells = <1>, 198c66ec88fSEmmanuel Vadot specifies a mask of bits to ignore when matching stream IDs (e.g. this may 199c66ec88fSEmmanuel Vadot be programmed into the SMRn.MASK field of every stream match register 200c66ec88fSEmmanuel Vadot used). For cases where it is desirable to ignore some portion of every 201c66ec88fSEmmanuel Vadot Stream ID (e.g. for certain MMU-500 configurations given globally unique 202c66ec88fSEmmanuel Vadot input IDs). This property is not valid for SMMUs using stream indexing, or 203c66ec88fSEmmanuel Vadot using stream matching with #iommu-cells = <2>, and may be ignored if 204c66ec88fSEmmanuel Vadot present in such cases. 205c66ec88fSEmmanuel Vadot 206c66ec88fSEmmanuel Vadot clock-names: 2078bab661aSEmmanuel Vadot minItems: 1 2088bab661aSEmmanuel Vadot maxItems: 7 209c66ec88fSEmmanuel Vadot 210c66ec88fSEmmanuel Vadot clocks: 2118bab661aSEmmanuel Vadot minItems: 1 2128bab661aSEmmanuel Vadot maxItems: 7 213c66ec88fSEmmanuel Vadot 214c66ec88fSEmmanuel Vadot power-domains: 215cb7aa33aSEmmanuel Vadot minItems: 1 216cb7aa33aSEmmanuel Vadot maxItems: 3 217c66ec88fSEmmanuel Vadot 218d5b0e70fSEmmanuel Vadot nvidia,memory-controller: 219d5b0e70fSEmmanuel Vadot description: | 220d5b0e70fSEmmanuel Vadot A phandle to the memory controller on NVIDIA Tegra186 and later SoCs. 221d5b0e70fSEmmanuel Vadot The memory controller needs to be programmed with a mapping of memory 222d5b0e70fSEmmanuel Vadot client IDs to ARM SMMU stream IDs. 223d5b0e70fSEmmanuel Vadot 224d5b0e70fSEmmanuel Vadot If this property is absent, the mapping programmed by early firmware 225d5b0e70fSEmmanuel Vadot will be used and it is not guaranteed that IOMMU translations will be 226d5b0e70fSEmmanuel Vadot enabled for any given device. 227d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 228d5b0e70fSEmmanuel Vadot 229c66ec88fSEmmanuel Vadotrequired: 230c66ec88fSEmmanuel Vadot - compatible 231c66ec88fSEmmanuel Vadot - reg 232c66ec88fSEmmanuel Vadot - '#global-interrupts' 233c66ec88fSEmmanuel Vadot - '#iommu-cells' 234c66ec88fSEmmanuel Vadot - interrupts 235c66ec88fSEmmanuel Vadot 236c66ec88fSEmmanuel VadotadditionalProperties: false 237c66ec88fSEmmanuel Vadot 238c66ec88fSEmmanuel VadotallOf: 239c66ec88fSEmmanuel Vadot - if: 240c66ec88fSEmmanuel Vadot properties: 241c66ec88fSEmmanuel Vadot compatible: 242c66ec88fSEmmanuel Vadot contains: 243c66ec88fSEmmanuel Vadot enum: 2445956d97fSEmmanuel Vadot - nvidia,tegra186-smmu 245d5b0e70fSEmmanuel Vadot - nvidia,tegra194-smmu 246d5b0e70fSEmmanuel Vadot - nvidia,tegra234-smmu 247c66ec88fSEmmanuel Vadot then: 248c66ec88fSEmmanuel Vadot properties: 249c66ec88fSEmmanuel Vadot reg: 2505956d97fSEmmanuel Vadot minItems: 1 251c66ec88fSEmmanuel Vadot maxItems: 2 252d5b0e70fSEmmanuel Vadot 253d5b0e70fSEmmanuel Vadot # The reference to the memory controller is required to ensure that the 254d5b0e70fSEmmanuel Vadot # memory client to stream ID mapping can be done synchronously with the 255d5b0e70fSEmmanuel Vadot # IOMMU attachment. 256d5b0e70fSEmmanuel Vadot required: 257d5b0e70fSEmmanuel Vadot - nvidia,memory-controller 258c66ec88fSEmmanuel Vadot else: 259c66ec88fSEmmanuel Vadot properties: 260c66ec88fSEmmanuel Vadot reg: 261c66ec88fSEmmanuel Vadot maxItems: 1 262c66ec88fSEmmanuel Vadot 2638bab661aSEmmanuel Vadot - if: 2648bab661aSEmmanuel Vadot properties: 2658bab661aSEmmanuel Vadot compatible: 2668bab661aSEmmanuel Vadot contains: 2678bab661aSEmmanuel Vadot enum: 2688bab661aSEmmanuel Vadot - qcom,msm8998-smmu-v2 2698bab661aSEmmanuel Vadot - qcom,sdm630-smmu-v2 2708bab661aSEmmanuel Vadot then: 2718bab661aSEmmanuel Vadot anyOf: 2728bab661aSEmmanuel Vadot - properties: 2738bab661aSEmmanuel Vadot clock-names: 2748bab661aSEmmanuel Vadot items: 2758bab661aSEmmanuel Vadot - const: bus 2768bab661aSEmmanuel Vadot clocks: 2778bab661aSEmmanuel Vadot items: 2788bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 2798bab661aSEmmanuel Vadot the smmu ptw 2808bab661aSEmmanuel Vadot - properties: 2818bab661aSEmmanuel Vadot clock-names: 2828bab661aSEmmanuel Vadot items: 2838bab661aSEmmanuel Vadot - const: iface 2848bab661aSEmmanuel Vadot - const: mem 2858bab661aSEmmanuel Vadot - const: mem_iface 2868bab661aSEmmanuel Vadot clocks: 2878bab661aSEmmanuel Vadot items: 2888bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 2898bab661aSEmmanuel Vadot through the TCU's programming interface. 2908bab661aSEmmanuel Vadot - description: bus clock required for memory access 2918bab661aSEmmanuel Vadot - description: bus clock required for GPU memory access 2928bab661aSEmmanuel Vadot - properties: 2938bab661aSEmmanuel Vadot clock-names: 2948bab661aSEmmanuel Vadot items: 2958bab661aSEmmanuel Vadot - const: iface-mm 2968bab661aSEmmanuel Vadot - const: iface-smmu 2978bab661aSEmmanuel Vadot - const: bus-mm 2988bab661aSEmmanuel Vadot - const: bus-smmu 2998bab661aSEmmanuel Vadot clocks: 3008bab661aSEmmanuel Vadot items: 3018bab661aSEmmanuel Vadot - description: interface clock required to access mnoc's registers 3028bab661aSEmmanuel Vadot through the TCU's programming interface. 3038bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3048bab661aSEmmanuel Vadot through the TCU's programming interface. 3058bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access 3068bab661aSEmmanuel Vadot - description: bus clock required for the smmu ptw 3078bab661aSEmmanuel Vadot 3088bab661aSEmmanuel Vadot - if: 3098bab661aSEmmanuel Vadot properties: 3108bab661aSEmmanuel Vadot compatible: 3118bab661aSEmmanuel Vadot contains: 3128bab661aSEmmanuel Vadot enum: 3138bab661aSEmmanuel Vadot - qcom,msm8996-smmu-v2 3148bab661aSEmmanuel Vadot - qcom,sc7180-smmu-v2 3158bab661aSEmmanuel Vadot - qcom,sdm845-smmu-v2 3168bab661aSEmmanuel Vadot then: 3178bab661aSEmmanuel Vadot properties: 3188bab661aSEmmanuel Vadot clock-names: 3198bab661aSEmmanuel Vadot items: 3208bab661aSEmmanuel Vadot - const: bus 3218bab661aSEmmanuel Vadot - const: iface 3228bab661aSEmmanuel Vadot 3238bab661aSEmmanuel Vadot clocks: 3248bab661aSEmmanuel Vadot items: 3258bab661aSEmmanuel Vadot - description: bus clock required for downstream bus access and for 3268bab661aSEmmanuel Vadot the smmu ptw 3278bab661aSEmmanuel Vadot - description: interface clock required to access smmu's registers 3288bab661aSEmmanuel Vadot through the TCU's programming interface. 3298bab661aSEmmanuel Vadot 3308bab661aSEmmanuel Vadot - if: 3318bab661aSEmmanuel Vadot properties: 3328bab661aSEmmanuel Vadot compatible: 3338bab661aSEmmanuel Vadot contains: 3348bab661aSEmmanuel Vadot const: qcom,sc7280-smmu-500 3358bab661aSEmmanuel Vadot then: 3368bab661aSEmmanuel Vadot properties: 3378bab661aSEmmanuel Vadot clock-names: 3388bab661aSEmmanuel Vadot items: 3398bab661aSEmmanuel Vadot - const: gcc_gpu_memnoc_gfx_clk 3408bab661aSEmmanuel Vadot - const: gcc_gpu_snoc_dvm_gfx_clk 3418bab661aSEmmanuel Vadot - const: gpu_cc_ahb_clk 3428bab661aSEmmanuel Vadot - const: gpu_cc_hlos1_vote_gpu_smmu_clk 3438bab661aSEmmanuel Vadot - const: gpu_cc_cx_gmu_clk 3448bab661aSEmmanuel Vadot - const: gpu_cc_hub_cx_int_clk 3458bab661aSEmmanuel Vadot - const: gpu_cc_hub_aon_clk 3468bab661aSEmmanuel Vadot 3478bab661aSEmmanuel Vadot clocks: 3488bab661aSEmmanuel Vadot items: 3498bab661aSEmmanuel Vadot - description: GPU memnoc_gfx clock 3508bab661aSEmmanuel Vadot - description: GPU snoc_dvm_gfx clock 3518bab661aSEmmanuel Vadot - description: GPU ahb clock 3528bab661aSEmmanuel Vadot - description: GPU hlos1_vote_GPU smmu clock 3538bab661aSEmmanuel Vadot - description: GPU cx_gmu clock 3548bab661aSEmmanuel Vadot - description: GPU hub_cx_int clock 3558bab661aSEmmanuel Vadot - description: GPU hub_aon clock 3568bab661aSEmmanuel Vadot 3578bab661aSEmmanuel Vadot - if: 3588bab661aSEmmanuel Vadot properties: 3598bab661aSEmmanuel Vadot compatible: 3608bab661aSEmmanuel Vadot contains: 3618bab661aSEmmanuel Vadot enum: 3628bab661aSEmmanuel Vadot - qcom,sm6350-smmu-v2 3638bab661aSEmmanuel Vadot - qcom,sm8150-smmu-500 3648bab661aSEmmanuel Vadot - qcom,sm8250-smmu-500 3658bab661aSEmmanuel Vadot then: 3668bab661aSEmmanuel Vadot properties: 3678bab661aSEmmanuel Vadot clock-names: 3688bab661aSEmmanuel Vadot items: 3698bab661aSEmmanuel Vadot - const: ahb 3708bab661aSEmmanuel Vadot - const: bus 3718bab661aSEmmanuel Vadot - const: iface 3728bab661aSEmmanuel Vadot 3738bab661aSEmmanuel Vadot clocks: 3748bab661aSEmmanuel Vadot items: 3758bab661aSEmmanuel Vadot - description: bus clock required for AHB bus access 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 381*fac71e4eSEmmanuel Vadot - if: 382*fac71e4eSEmmanuel Vadot properties: 383*fac71e4eSEmmanuel Vadot compatible: 384*fac71e4eSEmmanuel Vadot items: 385*fac71e4eSEmmanuel Vadot - enum: 386*fac71e4eSEmmanuel Vadot - qcom,sm6115-smmu-500 387*fac71e4eSEmmanuel Vadot - qcom,sm6125-smmu-500 388*fac71e4eSEmmanuel Vadot - const: qcom,adreno-smmu 389*fac71e4eSEmmanuel Vadot - const: qcom,smmu-500 390*fac71e4eSEmmanuel Vadot - const: arm,mmu-500 391*fac71e4eSEmmanuel Vadot then: 392*fac71e4eSEmmanuel Vadot properties: 393*fac71e4eSEmmanuel Vadot clock-names: 394*fac71e4eSEmmanuel Vadot items: 395*fac71e4eSEmmanuel Vadot - const: mem 396*fac71e4eSEmmanuel Vadot - const: hlos 397*fac71e4eSEmmanuel Vadot - const: iface 398*fac71e4eSEmmanuel Vadot 399*fac71e4eSEmmanuel Vadot clocks: 400*fac71e4eSEmmanuel Vadot items: 401*fac71e4eSEmmanuel Vadot - description: GPU memory bus clock 402*fac71e4eSEmmanuel Vadot - description: Voter clock required for HLOS SMMU access 403*fac71e4eSEmmanuel Vadot - description: Interface clock required for register access 404*fac71e4eSEmmanuel Vadot 405cb7aa33aSEmmanuel Vadot # Disallow clocks for all other platforms with specific compatibles 406cb7aa33aSEmmanuel Vadot - if: 407cb7aa33aSEmmanuel Vadot properties: 408cb7aa33aSEmmanuel Vadot compatible: 409cb7aa33aSEmmanuel Vadot contains: 410cb7aa33aSEmmanuel Vadot enum: 411cb7aa33aSEmmanuel Vadot - cavium,smmu-v2 412cb7aa33aSEmmanuel Vadot - marvell,ap806-smmu-500 413cb7aa33aSEmmanuel Vadot - nvidia,smmu-500 414cb7aa33aSEmmanuel Vadot - qcom,qcm2290-smmu-500 415cb7aa33aSEmmanuel Vadot - qcom,qdu1000-smmu-500 416cb7aa33aSEmmanuel Vadot - qcom,sa8775p-smmu-500 417cb7aa33aSEmmanuel Vadot - qcom,sc7180-smmu-500 418cb7aa33aSEmmanuel Vadot - qcom,sc8180x-smmu-500 419cb7aa33aSEmmanuel Vadot - qcom,sc8280xp-smmu-500 420cb7aa33aSEmmanuel Vadot - qcom,sdm670-smmu-500 421cb7aa33aSEmmanuel Vadot - qcom,sdm845-smmu-500 422cb7aa33aSEmmanuel Vadot - qcom,sdx55-smmu-500 423cb7aa33aSEmmanuel Vadot - qcom,sdx65-smmu-500 424cb7aa33aSEmmanuel Vadot - qcom,sm6350-smmu-500 425cb7aa33aSEmmanuel Vadot - qcom,sm6375-smmu-500 426cb7aa33aSEmmanuel Vadot - qcom,sm8350-smmu-500 427cb7aa33aSEmmanuel Vadot - qcom,sm8450-smmu-500 428*fac71e4eSEmmanuel Vadot - qcom,sm8550-smmu-500 429cb7aa33aSEmmanuel Vadot then: 430cb7aa33aSEmmanuel Vadot properties: 431cb7aa33aSEmmanuel Vadot clock-names: false 432cb7aa33aSEmmanuel Vadot clocks: false 433cb7aa33aSEmmanuel Vadot 434cb7aa33aSEmmanuel Vadot - if: 435cb7aa33aSEmmanuel Vadot properties: 436cb7aa33aSEmmanuel Vadot compatible: 437cb7aa33aSEmmanuel Vadot contains: 438cb7aa33aSEmmanuel Vadot const: qcom,sm6375-smmu-500 439cb7aa33aSEmmanuel Vadot then: 440cb7aa33aSEmmanuel Vadot properties: 441cb7aa33aSEmmanuel Vadot power-domains: 442cb7aa33aSEmmanuel Vadot items: 443cb7aa33aSEmmanuel Vadot - description: SNoC MMU TBU RT GDSC 444cb7aa33aSEmmanuel Vadot - description: SNoC MMU TBU NRT GDSC 445cb7aa33aSEmmanuel Vadot - description: SNoC TURING MMU TBU0 GDSC 446cb7aa33aSEmmanuel Vadot 447cb7aa33aSEmmanuel Vadot required: 448cb7aa33aSEmmanuel Vadot - power-domains 449cb7aa33aSEmmanuel Vadot else: 450cb7aa33aSEmmanuel Vadot properties: 451cb7aa33aSEmmanuel Vadot power-domains: 452cb7aa33aSEmmanuel Vadot maxItems: 1 453cb7aa33aSEmmanuel Vadot 454c66ec88fSEmmanuel Vadotexamples: 455c66ec88fSEmmanuel Vadot - |+ 456c66ec88fSEmmanuel Vadot /* SMMU with stream matching or stream indexing */ 457c66ec88fSEmmanuel Vadot smmu1: iommu@ba5e0000 { 458c66ec88fSEmmanuel Vadot compatible = "arm,smmu-v1"; 459c66ec88fSEmmanuel Vadot reg = <0xba5e0000 0x10000>; 460c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 461c66ec88fSEmmanuel Vadot interrupts = <0 32 4>, 462c66ec88fSEmmanuel Vadot <0 33 4>, 463c66ec88fSEmmanuel Vadot <0 34 4>, /* This is the first context interrupt */ 464c66ec88fSEmmanuel Vadot <0 35 4>, 465c66ec88fSEmmanuel Vadot <0 36 4>, 466c66ec88fSEmmanuel Vadot <0 37 4>; 467c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 468c66ec88fSEmmanuel Vadot }; 469c66ec88fSEmmanuel Vadot 470c66ec88fSEmmanuel Vadot /* device with two stream IDs, 0 and 7 */ 471c66ec88fSEmmanuel Vadot master1 { 472c66ec88fSEmmanuel Vadot iommus = <&smmu1 0>, 473c66ec88fSEmmanuel Vadot <&smmu1 7>; 474c66ec88fSEmmanuel Vadot }; 475c66ec88fSEmmanuel Vadot 476c66ec88fSEmmanuel Vadot 477c66ec88fSEmmanuel Vadot /* SMMU with stream matching */ 478c66ec88fSEmmanuel Vadot smmu2: iommu@ba5f0000 { 479c66ec88fSEmmanuel Vadot compatible = "arm,smmu-v1"; 480c66ec88fSEmmanuel Vadot reg = <0xba5f0000 0x10000>; 481c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 482c66ec88fSEmmanuel Vadot interrupts = <0 38 4>, 483c66ec88fSEmmanuel Vadot <0 39 4>, 484c66ec88fSEmmanuel Vadot <0 40 4>, /* This is the first context interrupt */ 485c66ec88fSEmmanuel Vadot <0 41 4>, 486c66ec88fSEmmanuel Vadot <0 42 4>, 487c66ec88fSEmmanuel Vadot <0 43 4>; 488c66ec88fSEmmanuel Vadot #iommu-cells = <2>; 489c66ec88fSEmmanuel Vadot }; 490c66ec88fSEmmanuel Vadot 491c66ec88fSEmmanuel Vadot /* device with stream IDs 0 and 7 */ 492c66ec88fSEmmanuel Vadot master2 { 493c66ec88fSEmmanuel Vadot iommus = <&smmu2 0 0>, 494c66ec88fSEmmanuel Vadot <&smmu2 7 0>; 495c66ec88fSEmmanuel Vadot }; 496c66ec88fSEmmanuel Vadot 497c66ec88fSEmmanuel Vadot /* device with stream IDs 1, 17, 33 and 49 */ 498c66ec88fSEmmanuel Vadot master3 { 499c66ec88fSEmmanuel Vadot iommus = <&smmu2 1 0x30>; 500c66ec88fSEmmanuel Vadot }; 501c66ec88fSEmmanuel Vadot 502c66ec88fSEmmanuel Vadot 503c66ec88fSEmmanuel Vadot /* ARM MMU-500 with 10-bit stream ID input configuration */ 504c66ec88fSEmmanuel Vadot smmu3: iommu@ba600000 { 505c66ec88fSEmmanuel Vadot compatible = "arm,mmu-500", "arm,smmu-v2"; 506c66ec88fSEmmanuel Vadot reg = <0xba600000 0x10000>; 507c66ec88fSEmmanuel Vadot #global-interrupts = <2>; 508c66ec88fSEmmanuel Vadot interrupts = <0 44 4>, 509c66ec88fSEmmanuel Vadot <0 45 4>, 510c66ec88fSEmmanuel Vadot <0 46 4>, /* This is the first context interrupt */ 511c66ec88fSEmmanuel Vadot <0 47 4>, 512c66ec88fSEmmanuel Vadot <0 48 4>, 513c66ec88fSEmmanuel Vadot <0 49 4>; 514c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 515c66ec88fSEmmanuel Vadot /* always ignore appended 5-bit TBU number */ 516c66ec88fSEmmanuel Vadot stream-match-mask = <0x7c00>; 517c66ec88fSEmmanuel Vadot }; 518c66ec88fSEmmanuel Vadot 519c66ec88fSEmmanuel Vadot bus { 520c66ec88fSEmmanuel Vadot /* bus whose child devices emit one unique 10-bit stream 521c66ec88fSEmmanuel Vadot ID each, but may master through multiple SMMU TBUs */ 522c66ec88fSEmmanuel Vadot iommu-map = <0 &smmu3 0 0x400>; 523c66ec88fSEmmanuel Vadot 524c66ec88fSEmmanuel Vadot 525c66ec88fSEmmanuel Vadot }; 526c66ec88fSEmmanuel Vadot 527c66ec88fSEmmanuel Vadot - |+ 528c66ec88fSEmmanuel Vadot /* Qcom's arm,smmu-v2 implementation */ 529c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 530c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 531c66ec88fSEmmanuel Vadot smmu4: iommu@d00000 { 532c66ec88fSEmmanuel Vadot compatible = "qcom,msm8996-smmu-v2", "qcom,smmu-v2"; 533c66ec88fSEmmanuel Vadot reg = <0xd00000 0x10000>; 534c66ec88fSEmmanuel Vadot 535c66ec88fSEmmanuel Vadot #global-interrupts = <1>; 536c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>, 537c66ec88fSEmmanuel Vadot <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>, 538c66ec88fSEmmanuel Vadot <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>; 539c66ec88fSEmmanuel Vadot #iommu-cells = <1>; 540c66ec88fSEmmanuel Vadot power-domains = <&mmcc 0>; 541c66ec88fSEmmanuel Vadot 542c66ec88fSEmmanuel Vadot clocks = <&mmcc 123>, 543c66ec88fSEmmanuel Vadot <&mmcc 124>; 544c66ec88fSEmmanuel Vadot clock-names = "bus", "iface"; 545c66ec88fSEmmanuel Vadot }; 546