1c66ec88fSEmmanuel VadotQualcomm adreno/snapdragon GPU 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotRequired properties: 4c66ec88fSEmmanuel Vadot- compatible: "qcom,adreno-XYZ.W", "qcom,adreno" or 5c66ec88fSEmmanuel Vadot "amd,imageon-XYZ.W", "amd,imageon" 6c66ec88fSEmmanuel Vadot for example: "qcom,adreno-306.0", "qcom,adreno" 7c66ec88fSEmmanuel Vadot Note that you need to list the less specific "qcom,adreno" (since this 8c66ec88fSEmmanuel Vadot is what the device is matched on), in addition to the more specific 9c66ec88fSEmmanuel Vadot with the chip-id. 10c66ec88fSEmmanuel Vadot If "amd,imageon" is used, there should be no top level msm device. 11c66ec88fSEmmanuel Vadot- reg: Physical base address and length of the controller's registers. 12c66ec88fSEmmanuel Vadot- interrupts: The interrupt signal from the gpu. 13c66ec88fSEmmanuel Vadot- clocks: device clocks (if applicable) 14c66ec88fSEmmanuel Vadot See ../clocks/clock-bindings.txt for details. 15c66ec88fSEmmanuel Vadot- clock-names: the following clocks are required by a3xx, a4xx and a5xx 16c66ec88fSEmmanuel Vadot cores: 17c66ec88fSEmmanuel Vadot * "core" 18c66ec88fSEmmanuel Vadot * "iface" 19c66ec88fSEmmanuel Vadot * "mem_iface" 20c66ec88fSEmmanuel Vadot For GMU attached devices the GPU clocks are not used and are not required. The 21c66ec88fSEmmanuel Vadot following devices should not list clocks: 22c66ec88fSEmmanuel Vadot - qcom,adreno-630.2 23c66ec88fSEmmanuel Vadot- iommus: optional phandle to an adreno iommu instance 24c66ec88fSEmmanuel Vadot- operating-points-v2: optional phandle to the OPP operating points 25c66ec88fSEmmanuel Vadot- interconnects: optional phandle to an interconnect provider. See 26c66ec88fSEmmanuel Vadot ../interconnect/interconnect.txt for details. Some A3xx and all A4xx platforms 27c66ec88fSEmmanuel Vadot will have two paths; all others will have one path. 28c66ec88fSEmmanuel Vadot- interconnect-names: The names of the interconnect paths that correspond to the 29c66ec88fSEmmanuel Vadot interconnects property. Values must be gfx-mem and ocmem. 30c66ec88fSEmmanuel Vadot- qcom,gmu: For GMU attached devices a phandle to the GMU device that will 31c66ec88fSEmmanuel Vadot control the power for the GPU. Applicable targets: 32c66ec88fSEmmanuel Vadot - qcom,adreno-630.2 33c66ec88fSEmmanuel Vadot- zap-shader: For a5xx and a6xx devices this node contains a memory-region that 34c66ec88fSEmmanuel Vadot points to reserved memory to store the zap shader that can be used to help 35c66ec88fSEmmanuel Vadot bring the GPU out of secure mode. 36c66ec88fSEmmanuel Vadot- firmware-name: optional property of the 'zap-shader' node, listing the 37c66ec88fSEmmanuel Vadot relative path of the device specific zap firmware. 38c66ec88fSEmmanuel Vadot- sram: phandle to the On Chip Memory (OCMEM) that's present on some a3xx and 39c66ec88fSEmmanuel Vadot a4xx Snapdragon SoCs. See 40c66ec88fSEmmanuel Vadot Documentation/devicetree/bindings/sram/qcom,ocmem.yaml. 41c66ec88fSEmmanuel Vadot 42*5def4c47SEmmanuel VadotOptional properties: 43*5def4c47SEmmanuel Vadot- #cooling-cells: The value must be 2. For details, please refer 44*5def4c47SEmmanuel Vadot Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml. 45*5def4c47SEmmanuel Vadot 46c66ec88fSEmmanuel VadotExample 3xx/4xx: 47c66ec88fSEmmanuel Vadot 48c66ec88fSEmmanuel Vadot/ { 49c66ec88fSEmmanuel Vadot ... 50c66ec88fSEmmanuel Vadot 51c66ec88fSEmmanuel Vadot gpu: adreno@fdb00000 { 52c66ec88fSEmmanuel Vadot compatible = "qcom,adreno-330.2", 53c66ec88fSEmmanuel Vadot "qcom,adreno"; 54c66ec88fSEmmanuel Vadot reg = <0xfdb00000 0x10000>; 55c66ec88fSEmmanuel Vadot reg-names = "kgsl_3d0_reg_memory"; 56c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; 57c66ec88fSEmmanuel Vadot interrupt-names = "kgsl_3d0_irq"; 58c66ec88fSEmmanuel Vadot clock-names = "core", 59c66ec88fSEmmanuel Vadot "iface", 60c66ec88fSEmmanuel Vadot "mem_iface"; 61c66ec88fSEmmanuel Vadot clocks = <&mmcc OXILI_GFX3D_CLK>, 62c66ec88fSEmmanuel Vadot <&mmcc OXILICX_AHB_CLK>, 63c66ec88fSEmmanuel Vadot <&mmcc OXILICX_AXI_CLK>; 64c66ec88fSEmmanuel Vadot sram = <&gpu_sram>; 65c66ec88fSEmmanuel Vadot power-domains = <&mmcc OXILICX_GDSC>; 66c66ec88fSEmmanuel Vadot operating-points-v2 = <&gpu_opp_table>; 67c66ec88fSEmmanuel Vadot iommus = <&gpu_iommu 0>; 68*5def4c47SEmmanuel Vadot #cooling-cells = <2>; 69c66ec88fSEmmanuel Vadot }; 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot gpu_sram: ocmem@fdd00000 { 72c66ec88fSEmmanuel Vadot compatible = "qcom,msm8974-ocmem"; 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot reg = <0xfdd00000 0x2000>, 75c66ec88fSEmmanuel Vadot <0xfec00000 0x180000>; 76c66ec88fSEmmanuel Vadot reg-names = "ctrl", 77c66ec88fSEmmanuel Vadot "mem"; 78c66ec88fSEmmanuel Vadot 79c66ec88fSEmmanuel Vadot clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>, 80c66ec88fSEmmanuel Vadot <&mmcc OCMEMCX_OCMEMNOC_CLK>; 81c66ec88fSEmmanuel Vadot clock-names = "core", 82c66ec88fSEmmanuel Vadot "iface"; 83c66ec88fSEmmanuel Vadot 84c66ec88fSEmmanuel Vadot #address-cells = <1>; 85c66ec88fSEmmanuel Vadot #size-cells = <1>; 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot gpu_sram: gpu-sram@0 { 88c66ec88fSEmmanuel Vadot reg = <0x0 0x100000>; 89c66ec88fSEmmanuel Vadot ranges = <0 0 0xfec00000 0x100000>; 90c66ec88fSEmmanuel Vadot }; 91c66ec88fSEmmanuel Vadot }; 92c66ec88fSEmmanuel Vadot}; 93c66ec88fSEmmanuel Vadot 94c66ec88fSEmmanuel VadotExample a6xx (with GMU): 95c66ec88fSEmmanuel Vadot 96c66ec88fSEmmanuel Vadot/ { 97c66ec88fSEmmanuel Vadot ... 98c66ec88fSEmmanuel Vadot 99c66ec88fSEmmanuel Vadot gpu@5000000 { 100c66ec88fSEmmanuel Vadot compatible = "qcom,adreno-630.2", "qcom,adreno"; 101c66ec88fSEmmanuel Vadot #stream-id-cells = <16>; 102c66ec88fSEmmanuel Vadot 103c66ec88fSEmmanuel Vadot reg = <0x5000000 0x40000>, <0x509e000 0x10>; 104c66ec88fSEmmanuel Vadot reg-names = "kgsl_3d0_reg_memory", "cx_mem"; 105c66ec88fSEmmanuel Vadot 106*5def4c47SEmmanuel Vadot #cooling-cells = <2>; 107*5def4c47SEmmanuel Vadot 108c66ec88fSEmmanuel Vadot /* 109c66ec88fSEmmanuel Vadot * Look ma, no clocks! The GPU clocks and power are 110c66ec88fSEmmanuel Vadot * controlled entirely by the GMU 111c66ec88fSEmmanuel Vadot */ 112c66ec88fSEmmanuel Vadot 113c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadot iommus = <&adreno_smmu 0>; 116c66ec88fSEmmanuel Vadot 117c66ec88fSEmmanuel Vadot operating-points-v2 = <&gpu_opp_table>; 118c66ec88fSEmmanuel Vadot 119c66ec88fSEmmanuel Vadot interconnects = <&rsc_hlos MASTER_GFX3D &rsc_hlos SLAVE_EBI1>; 120c66ec88fSEmmanuel Vadot interconnect-names = "gfx-mem"; 121c66ec88fSEmmanuel Vadot 122c66ec88fSEmmanuel Vadot gpu_opp_table: opp-table { 123c66ec88fSEmmanuel Vadot compatible = "operating-points-v2"; 124c66ec88fSEmmanuel Vadot 125c66ec88fSEmmanuel Vadot opp-430000000 { 126c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <430000000>; 127c66ec88fSEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; 128c66ec88fSEmmanuel Vadot opp-peak-kBps = <5412000>; 129c66ec88fSEmmanuel Vadot }; 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot opp-355000000 { 132c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <355000000>; 133c66ec88fSEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_SVS>; 134c66ec88fSEmmanuel Vadot opp-peak-kBps = <3072000>; 135c66ec88fSEmmanuel Vadot }; 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel Vadot opp-267000000 { 138c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <267000000>; 139c66ec88fSEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>; 140c66ec88fSEmmanuel Vadot opp-peak-kBps = <3072000>; 141c66ec88fSEmmanuel Vadot }; 142c66ec88fSEmmanuel Vadot 143c66ec88fSEmmanuel Vadot opp-180000000 { 144c66ec88fSEmmanuel Vadot opp-hz = /bits/ 64 <180000000>; 145c66ec88fSEmmanuel Vadot opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>; 146c66ec88fSEmmanuel Vadot opp-peak-kBps = <1804000>; 147c66ec88fSEmmanuel Vadot }; 148c66ec88fSEmmanuel Vadot }; 149c66ec88fSEmmanuel Vadot 150c66ec88fSEmmanuel Vadot qcom,gmu = <&gmu>; 151c66ec88fSEmmanuel Vadot 152c66ec88fSEmmanuel Vadot zap-shader { 153c66ec88fSEmmanuel Vadot memory-region = <&zap_shader_region>; 154c66ec88fSEmmanuel Vadot firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn" 155c66ec88fSEmmanuel Vadot }; 156c66ec88fSEmmanuel Vadot }; 157c66ec88fSEmmanuel Vadot}; 158