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