18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 48cc087a1SEmmanuel Vadot 5fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/display/msm/gpu.yaml# 6fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 78cc087a1SEmmanuel Vadot 88bab661aSEmmanuel Vadottitle: Adreno or Snapdragon GPUs 98cc087a1SEmmanuel Vadot 108cc087a1SEmmanuel Vadotmaintainers: 118cc087a1SEmmanuel Vadot - Rob Clark <robdclark@gmail.com> 128cc087a1SEmmanuel Vadot 138cc087a1SEmmanuel Vadotproperties: 148cc087a1SEmmanuel Vadot compatible: 158cc087a1SEmmanuel Vadot oneOf: 168cc087a1SEmmanuel Vadot - description: | 178cc087a1SEmmanuel Vadot The driver is parsing the compat string for Adreno to 18aa1a8ff2SEmmanuel Vadot figure out the chip-id. 19aa1a8ff2SEmmanuel Vadot items: 20aa1a8ff2SEmmanuel Vadot - pattern: '^qcom,adreno-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$' 21aa1a8ff2SEmmanuel Vadot - const: qcom,adreno 22aa1a8ff2SEmmanuel Vadot - description: | 23aa1a8ff2SEmmanuel Vadot The driver is parsing the compat string for Adreno to 248cc087a1SEmmanuel Vadot figure out the gpu-id and patch level. 258cc087a1SEmmanuel Vadot items: 26*01950c46SEmmanuel Vadot - pattern: '^qcom,adreno-[3-7][0-9][0-9]\.[0-9]+$' 278cc087a1SEmmanuel Vadot - const: qcom,adreno 288cc087a1SEmmanuel Vadot - description: | 298cc087a1SEmmanuel Vadot The driver is parsing the compat string for Imageon to 308cc087a1SEmmanuel Vadot figure out the gpu-id and patch level. 318cc087a1SEmmanuel Vadot items: 328cc087a1SEmmanuel Vadot - pattern: '^amd,imageon-200\.[0-1]$' 338cc087a1SEmmanuel Vadot - const: amd,imageon 348cc087a1SEmmanuel Vadot 358cc087a1SEmmanuel Vadot clocks: true 368cc087a1SEmmanuel Vadot 378cc087a1SEmmanuel Vadot clock-names: true 388cc087a1SEmmanuel Vadot 398cc087a1SEmmanuel Vadot reg: 408cc087a1SEmmanuel Vadot minItems: 1 418cc087a1SEmmanuel Vadot maxItems: 3 428cc087a1SEmmanuel Vadot 438cc087a1SEmmanuel Vadot reg-names: 448cc087a1SEmmanuel Vadot minItems: 1 45f126890aSEmmanuel Vadot maxItems: 3 468cc087a1SEmmanuel Vadot 478cc087a1SEmmanuel Vadot interrupts: 488cc087a1SEmmanuel Vadot maxItems: 1 498cc087a1SEmmanuel Vadot 508cc087a1SEmmanuel Vadot interrupt-names: 518cc087a1SEmmanuel Vadot maxItems: 1 528cc087a1SEmmanuel Vadot 538cc087a1SEmmanuel Vadot interconnects: 548cc087a1SEmmanuel Vadot minItems: 1 558cc087a1SEmmanuel Vadot maxItems: 2 568cc087a1SEmmanuel Vadot 578cc087a1SEmmanuel Vadot interconnect-names: 588cc087a1SEmmanuel Vadot minItems: 1 598cc087a1SEmmanuel Vadot items: 608cc087a1SEmmanuel Vadot - const: gfx-mem 618cc087a1SEmmanuel Vadot - const: ocmem 628cc087a1SEmmanuel Vadot 638cc087a1SEmmanuel Vadot iommus: 647ef62cebSEmmanuel Vadot minItems: 1 657ef62cebSEmmanuel Vadot maxItems: 64 668cc087a1SEmmanuel Vadot 678cc087a1SEmmanuel Vadot sram: 688cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 698cc087a1SEmmanuel Vadot minItems: 1 708cc087a1SEmmanuel Vadot maxItems: 4 71c9ccf3a3SEmmanuel Vadot items: 72c9ccf3a3SEmmanuel Vadot maxItems: 1 738cc087a1SEmmanuel Vadot description: | 748cc087a1SEmmanuel Vadot phandles to one or more reserved on-chip SRAM regions. 758cc087a1SEmmanuel Vadot phandle to the On Chip Memory (OCMEM) that's present on some a3xx and 768cc087a1SEmmanuel Vadot a4xx Snapdragon SoCs. See 778cc087a1SEmmanuel Vadot Documentation/devicetree/bindings/sram/qcom,ocmem.yaml 788cc087a1SEmmanuel Vadot 798cc087a1SEmmanuel Vadot operating-points-v2: true 808cc087a1SEmmanuel Vadot opp-table: 818cc087a1SEmmanuel Vadot type: object 828cc087a1SEmmanuel Vadot 838cc087a1SEmmanuel Vadot power-domains: 848cc087a1SEmmanuel Vadot maxItems: 1 858cc087a1SEmmanuel Vadot 868cc087a1SEmmanuel Vadot zap-shader: 878cc087a1SEmmanuel Vadot type: object 887ef62cebSEmmanuel Vadot additionalProperties: false 898cc087a1SEmmanuel Vadot description: | 908cc087a1SEmmanuel Vadot For a5xx and a6xx devices this node contains a memory-region that 918cc087a1SEmmanuel Vadot points to reserved memory to store the zap shader that can be used to 928cc087a1SEmmanuel Vadot help bring the GPU out of secure mode. 938cc087a1SEmmanuel Vadot properties: 948cc087a1SEmmanuel Vadot memory-region: 95cb7aa33aSEmmanuel Vadot maxItems: 1 968cc087a1SEmmanuel Vadot 978cc087a1SEmmanuel Vadot firmware-name: 988cc087a1SEmmanuel Vadot description: | 998cc087a1SEmmanuel Vadot Default name of the firmware to load to the remote processor. 1008cc087a1SEmmanuel Vadot 1018cc087a1SEmmanuel Vadot "#cooling-cells": 1028cc087a1SEmmanuel Vadot const: 2 1038cc087a1SEmmanuel Vadot 1048cc087a1SEmmanuel Vadot nvmem-cell-names: 1058cc087a1SEmmanuel Vadot maxItems: 1 1068cc087a1SEmmanuel Vadot 1078cc087a1SEmmanuel Vadot nvmem-cells: 1088cc087a1SEmmanuel Vadot description: efuse registers 1098cc087a1SEmmanuel Vadot maxItems: 1 1108cc087a1SEmmanuel Vadot 1118cc087a1SEmmanuel Vadot qcom,gmu: 1128cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 1138cc087a1SEmmanuel Vadot description: | 1148cc087a1SEmmanuel Vadot For GMU attached devices a phandle to the GMU device that will 1158cc087a1SEmmanuel Vadot control the power for the GPU. 1168cc087a1SEmmanuel Vadot 1178cc087a1SEmmanuel Vadot 1188cc087a1SEmmanuel Vadotrequired: 1198cc087a1SEmmanuel Vadot - compatible 1208cc087a1SEmmanuel Vadot - reg 1218cc087a1SEmmanuel Vadot - interrupts 1228cc087a1SEmmanuel Vadot 1238cc087a1SEmmanuel VadotadditionalProperties: false 1248cc087a1SEmmanuel Vadot 1258cc087a1SEmmanuel VadotallOf: 1268cc087a1SEmmanuel Vadot - if: 1278cc087a1SEmmanuel Vadot properties: 1288cc087a1SEmmanuel Vadot compatible: 1298cc087a1SEmmanuel Vadot contains: 130*01950c46SEmmanuel Vadot pattern: '^qcom,adreno-[3-5][0-9][0-9]\.[0-9]+$' 1318cc087a1SEmmanuel Vadot 1328cc087a1SEmmanuel Vadot then: 1338cc087a1SEmmanuel Vadot properties: 1348cc087a1SEmmanuel Vadot clocks: 1358cc087a1SEmmanuel Vadot minItems: 2 1368cc087a1SEmmanuel Vadot maxItems: 7 1378cc087a1SEmmanuel Vadot 1388cc087a1SEmmanuel Vadot clock-names: 1398cc087a1SEmmanuel Vadot items: 1408cc087a1SEmmanuel Vadot anyOf: 1418cc087a1SEmmanuel Vadot - const: core 1428cc087a1SEmmanuel Vadot description: GPU Core clock 1438cc087a1SEmmanuel Vadot - const: iface 1448cc087a1SEmmanuel Vadot description: GPU Interface clock 1458cc087a1SEmmanuel Vadot - const: mem 1468cc087a1SEmmanuel Vadot description: GPU Memory clock 1478cc087a1SEmmanuel Vadot - const: mem_iface 1488cc087a1SEmmanuel Vadot description: GPU Memory Interface clock 1498cc087a1SEmmanuel Vadot - const: alt_mem_iface 1508cc087a1SEmmanuel Vadot description: GPU Alternative Memory Interface clock 1518cc087a1SEmmanuel Vadot - const: gfx3d 1528cc087a1SEmmanuel Vadot description: GPU 3D engine clock 1538cc087a1SEmmanuel Vadot - const: rbbmtimer 1548cc087a1SEmmanuel Vadot description: GPU RBBM Timer for Adreno 5xx series 155cb7aa33aSEmmanuel Vadot - const: rbcpr 156cb7aa33aSEmmanuel Vadot description: GPU RB Core Power Reduction clock 1578cc087a1SEmmanuel Vadot minItems: 2 1588cc087a1SEmmanuel Vadot maxItems: 7 1598cc087a1SEmmanuel Vadot 1608cc087a1SEmmanuel Vadot required: 1618cc087a1SEmmanuel Vadot - clocks 1628cc087a1SEmmanuel Vadot - clock-names 163f126890aSEmmanuel Vadot 1648cc087a1SEmmanuel Vadot - if: 1658cc087a1SEmmanuel Vadot properties: 1668cc087a1SEmmanuel Vadot compatible: 1678cc087a1SEmmanuel Vadot contains: 168f126890aSEmmanuel Vadot enum: 169f126890aSEmmanuel Vadot - qcom,adreno-610.0 170f126890aSEmmanuel Vadot - qcom,adreno-619.1 171f126890aSEmmanuel Vadot then: 172f126890aSEmmanuel Vadot properties: 173f126890aSEmmanuel Vadot clocks: 174f126890aSEmmanuel Vadot minItems: 6 175f126890aSEmmanuel Vadot maxItems: 6 176f126890aSEmmanuel Vadot 177f126890aSEmmanuel Vadot clock-names: 178f126890aSEmmanuel Vadot items: 179f126890aSEmmanuel Vadot - const: core 180f126890aSEmmanuel Vadot description: GPU Core clock 181f126890aSEmmanuel Vadot - const: iface 182f126890aSEmmanuel Vadot description: GPU Interface clock 183f126890aSEmmanuel Vadot - const: mem_iface 184f126890aSEmmanuel Vadot description: GPU Memory Interface clock 185f126890aSEmmanuel Vadot - const: alt_mem_iface 186f126890aSEmmanuel Vadot description: GPU Alternative Memory Interface clock 187f126890aSEmmanuel Vadot - const: gmu 188f126890aSEmmanuel Vadot description: CX GMU clock 189f126890aSEmmanuel Vadot - const: xo 190f126890aSEmmanuel Vadot description: GPUCC clocksource clock 191f126890aSEmmanuel Vadot 192f126890aSEmmanuel Vadot reg-names: 193f126890aSEmmanuel Vadot minItems: 1 194f126890aSEmmanuel Vadot items: 195f126890aSEmmanuel Vadot - const: kgsl_3d0_reg_memory 196f126890aSEmmanuel Vadot - const: cx_dbgc 197f126890aSEmmanuel Vadot 198f126890aSEmmanuel Vadot required: 199f126890aSEmmanuel Vadot - clocks 200f126890aSEmmanuel Vadot - clock-names 201f126890aSEmmanuel Vadot else: 202f126890aSEmmanuel Vadot if: 203f126890aSEmmanuel Vadot properties: 204f126890aSEmmanuel Vadot compatible: 205f126890aSEmmanuel Vadot contains: 206*01950c46SEmmanuel Vadot pattern: '^qcom,adreno-[67][0-9][0-9]\.[0-9]+$' 2078cc087a1SEmmanuel Vadot 208f126890aSEmmanuel Vadot then: # Starting with A6xx, the clocks are usually defined in the GMU node 2098cc087a1SEmmanuel Vadot properties: 2108cc087a1SEmmanuel Vadot clocks: false 2118cc087a1SEmmanuel Vadot clock-names: false 2128cc087a1SEmmanuel Vadot 213f126890aSEmmanuel Vadot reg-names: 214f126890aSEmmanuel Vadot minItems: 1 215f126890aSEmmanuel Vadot items: 216f126890aSEmmanuel Vadot - const: kgsl_3d0_reg_memory 217f126890aSEmmanuel Vadot - const: cx_mem 218f126890aSEmmanuel Vadot - const: cx_dbgc 219f126890aSEmmanuel Vadot 2208cc087a1SEmmanuel Vadotexamples: 2218cc087a1SEmmanuel Vadot - | 2228cc087a1SEmmanuel Vadot 2238cc087a1SEmmanuel Vadot // Example a3xx/4xx: 2248cc087a1SEmmanuel Vadot 2258cc087a1SEmmanuel Vadot #include <dt-bindings/clock/qcom,mmcc-msm8974.h> 2268cc087a1SEmmanuel Vadot #include <dt-bindings/clock/qcom,rpmcc.h> 2278cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 2288cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 2298cc087a1SEmmanuel Vadot 2308cc087a1SEmmanuel Vadot gpu: gpu@fdb00000 { 2318cc087a1SEmmanuel Vadot compatible = "qcom,adreno-330.2", "qcom,adreno"; 2328cc087a1SEmmanuel Vadot 2338cc087a1SEmmanuel Vadot reg = <0xfdb00000 0x10000>; 2348cc087a1SEmmanuel Vadot reg-names = "kgsl_3d0_reg_memory"; 2358cc087a1SEmmanuel Vadot 2368cc087a1SEmmanuel Vadot clock-names = "core", "iface", "mem_iface"; 2378cc087a1SEmmanuel Vadot clocks = <&mmcc OXILI_GFX3D_CLK>, 2388cc087a1SEmmanuel Vadot <&mmcc OXILICX_AHB_CLK>, 2398cc087a1SEmmanuel Vadot <&mmcc OXILICX_AXI_CLK>; 2408cc087a1SEmmanuel Vadot 2418cc087a1SEmmanuel Vadot interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; 2428cc087a1SEmmanuel Vadot interrupt-names = "kgsl_3d0_irq"; 2438cc087a1SEmmanuel Vadot 2448cc087a1SEmmanuel Vadot sram = <&gpu_sram>; 2458cc087a1SEmmanuel Vadot power-domains = <&mmcc OXILICX_GDSC>; 2468cc087a1SEmmanuel Vadot operating-points-v2 = <&gpu_opp_table>; 2478cc087a1SEmmanuel Vadot iommus = <&gpu_iommu 0>; 2488cc087a1SEmmanuel Vadot #cooling-cells = <2>; 2498cc087a1SEmmanuel Vadot }; 2508cc087a1SEmmanuel Vadot 2518cc087a1SEmmanuel Vadot ocmem@fdd00000 { 2528cc087a1SEmmanuel Vadot compatible = "qcom,msm8974-ocmem"; 2538cc087a1SEmmanuel Vadot 2548cc087a1SEmmanuel Vadot reg = <0xfdd00000 0x2000>, 2558cc087a1SEmmanuel Vadot <0xfec00000 0x180000>; 2568cc087a1SEmmanuel Vadot reg-names = "ctrl", "mem"; 2578cc087a1SEmmanuel Vadot 2588cc087a1SEmmanuel Vadot clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>, 2598cc087a1SEmmanuel Vadot <&mmcc OCMEMCX_OCMEMNOC_CLK>; 2608cc087a1SEmmanuel Vadot clock-names = "core", "iface"; 2618cc087a1SEmmanuel Vadot 2628cc087a1SEmmanuel Vadot #address-cells = <1>; 2638cc087a1SEmmanuel Vadot #size-cells = <1>; 2648cc087a1SEmmanuel Vadot ranges = <0 0xfec00000 0x100000>; 2658cc087a1SEmmanuel Vadot 2668cc087a1SEmmanuel Vadot gpu_sram: gpu-sram@0 { 2678cc087a1SEmmanuel Vadot reg = <0x0 0x100000>; 2688cc087a1SEmmanuel Vadot }; 2698cc087a1SEmmanuel Vadot }; 2708cc087a1SEmmanuel Vadot - | 2718cc087a1SEmmanuel Vadot 2728cc087a1SEmmanuel Vadot // Example a6xx (with GMU): 2738cc087a1SEmmanuel Vadot 2748cc087a1SEmmanuel Vadot #include <dt-bindings/clock/qcom,gpucc-sdm845.h> 2758cc087a1SEmmanuel Vadot #include <dt-bindings/clock/qcom,gcc-sdm845.h> 2768cc087a1SEmmanuel Vadot #include <dt-bindings/power/qcom-rpmpd.h> 2778cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 2788cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 2798cc087a1SEmmanuel Vadot #include <dt-bindings/interconnect/qcom,sdm845.h> 2808cc087a1SEmmanuel Vadot 2818cc087a1SEmmanuel Vadot reserved-memory { 2828cc087a1SEmmanuel Vadot #address-cells = <2>; 2838cc087a1SEmmanuel Vadot #size-cells = <2>; 2848cc087a1SEmmanuel Vadot 2858cc087a1SEmmanuel Vadot zap_shader_region: gpu@8f200000 { 2868cc087a1SEmmanuel Vadot compatible = "shared-dma-pool"; 2878cc087a1SEmmanuel Vadot reg = <0x0 0x90b00000 0x0 0xa00000>; 2888cc087a1SEmmanuel Vadot no-map; 2898cc087a1SEmmanuel Vadot }; 2908cc087a1SEmmanuel Vadot }; 2918cc087a1SEmmanuel Vadot 2928cc087a1SEmmanuel Vadot gpu@5000000 { 2938cc087a1SEmmanuel Vadot compatible = "qcom,adreno-630.2", "qcom,adreno"; 2948cc087a1SEmmanuel Vadot 2958cc087a1SEmmanuel Vadot reg = <0x5000000 0x40000>, <0x509e000 0x10>; 2968cc087a1SEmmanuel Vadot reg-names = "kgsl_3d0_reg_memory", "cx_mem"; 2978cc087a1SEmmanuel Vadot 2988cc087a1SEmmanuel Vadot #cooling-cells = <2>; 2998cc087a1SEmmanuel Vadot 3008cc087a1SEmmanuel Vadot interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; 3018cc087a1SEmmanuel Vadot 3028cc087a1SEmmanuel Vadot iommus = <&adreno_smmu 0>; 3038cc087a1SEmmanuel Vadot 3048cc087a1SEmmanuel Vadot operating-points-v2 = <&gpu_opp_table>; 3058cc087a1SEmmanuel Vadot 3068cc087a1SEmmanuel Vadot interconnects = <&rsc_hlos MASTER_GFX3D &rsc_hlos SLAVE_EBI1>; 3078cc087a1SEmmanuel Vadot interconnect-names = "gfx-mem"; 3088cc087a1SEmmanuel Vadot 3098cc087a1SEmmanuel Vadot qcom,gmu = <&gmu>; 3108cc087a1SEmmanuel Vadot 3118cc087a1SEmmanuel Vadot gpu_opp_table: opp-table { 3128cc087a1SEmmanuel Vadot compatible = "operating-points-v2"; 3138cc087a1SEmmanuel Vadot 3148cc087a1SEmmanuel Vadot opp-430000000 { 3158cc087a1SEmmanuel Vadot opp-hz = /bits/ 64 <430000000>; 3168cc087a1SEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; 3178cc087a1SEmmanuel Vadot opp-peak-kBps = <5412000>; 3188cc087a1SEmmanuel Vadot }; 3198cc087a1SEmmanuel Vadot 3208cc087a1SEmmanuel Vadot opp-355000000 { 3218cc087a1SEmmanuel Vadot opp-hz = /bits/ 64 <355000000>; 3228cc087a1SEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_SVS>; 3238cc087a1SEmmanuel Vadot opp-peak-kBps = <3072000>; 3248cc087a1SEmmanuel Vadot }; 3258cc087a1SEmmanuel Vadot 3268cc087a1SEmmanuel Vadot opp-267000000 { 3278cc087a1SEmmanuel Vadot opp-hz = /bits/ 64 <267000000>; 3288cc087a1SEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>; 3298cc087a1SEmmanuel Vadot opp-peak-kBps = <3072000>; 3308cc087a1SEmmanuel Vadot }; 3318cc087a1SEmmanuel Vadot 3328cc087a1SEmmanuel Vadot opp-180000000 { 3338cc087a1SEmmanuel Vadot opp-hz = /bits/ 64 <180000000>; 3348cc087a1SEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>; 3358cc087a1SEmmanuel Vadot opp-peak-kBps = <1804000>; 3368cc087a1SEmmanuel Vadot }; 3378cc087a1SEmmanuel Vadot }; 3388cc087a1SEmmanuel Vadot 3398cc087a1SEmmanuel Vadot zap-shader { 3408cc087a1SEmmanuel Vadot memory-region = <&zap_shader_region>; 3418cc087a1SEmmanuel Vadot firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn"; 3428cc087a1SEmmanuel Vadot }; 3438cc087a1SEmmanuel Vadot }; 344