xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/arm/mali-midgard.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#
2# (C) COPYRIGHT 2013-2017 ARM Limited. All rights reserved.
3#
4# This program is free software and is provided to you under the terms of the
5# GNU General Public License version 2 as published by the Free Software
6# Foundation, and any use by you of this program is subject to the terms
7# of such GNU licence.
8#
9# A copy of the licence is included with the program, and can also be obtained
10# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
11# Boston, MA  02110-1301, USA.
12#
13#
14
15
16* ARM Mali Midgard devices
17
18
19Required properties:
20
21- compatible : Should be mali<chip>, replacing digits with x from the back,
22until malit<Major>xx, ending with arm,mali-midgard, the latter not optional.
23- reg : Physical base address of the device and length of the register area.
24- interrupts : Contains the three IRQ lines required by T-6xx devices
25- interrupt-names : Contains the names of IRQ resources in the order they were
26provided in the interrupts property. Must contain: "JOB, "MMU", "GPU".
27
28Optional:
29
30- clocks : Phandle to clock for the Mali T-6xx device.
31- clock-names : Shall be "clk_mali".
32- mali-supply : Phandle to regulator for the Mali device. Refer to
33Documentation/devicetree/bindings/regulator/regulator.txt for details.
34- operating-points : Refer to Documentation/devicetree/bindings/power/opp.txt
35for details.
36- jm_config : For T860/T880. Sets job manager configuration. An array containing:
37	- 1 to override the TIMESTAMP value, 0 otherwise.
38	- 1 to override clock gate, forcing them to be always on, 0 otherwise.
39	- 1 to enable job throttle, limiting the number of cores that can be started
40	  simultaneously, 0 otherwise.
41	- Value between 0 and 63 (including). If job throttle is enabled, this is one
42	  less than the number of cores that can be started simultaneously.
43- power_model : Sets power model parameters. Note that this model was designed for the Juno
44	        platform, and may not be suitable for other platforms. A structure containing :
45	- compatible: Should be arm,mali-simple-power-model
46	- dynamic-coefficient: Coefficient, in pW/(Hz V^2), which is multiplied
47	  by v^2*f to calculate the dynamic power consumption.
48	- static-coefficient: Coefficient, in uW/V^3, which is multiplied by
49	  v^3 to calculate the static power consumption.
50	- ts: An array containing coefficients for the temperature scaling
51	  factor. This is used to scale the static power by a factor of
52	  tsf/1000000, where tsf = ts[3]*T^3 + ts[2]*T^2 + ts[1]*T + ts[0],
53	  and T = temperature in degrees.
54	- thermal-zone: A string identifying the thermal zone used for the GPU
55- system-coherency : Sets the coherency protocol to be used for coherent
56		     accesses made from the GPU.
57		     If not set then no coherency is used.
58	- 0  : ACE-Lite
59	- 1  : ACE
60	- 31 : No coherency
61- ipa-model : Sets the IPA model to be used for power management. GPU probe will fail if the
62	      model is not found in the registered models list. If no model is specified here,
63	      a gpu-id based model is picked if available, otherwise the default model is used.
64	- mali-simple-power-model: Default model used on mali
65- protected-mode-switcher : Phandle to device implemented protected mode switching functionality.
66Refer to Documentation/devicetree/bindings/arm/smc-protected-mode-switcher.txt for one implementation.
67
68Example for a Mali-T602:
69
70gpu@0xfc010000 {
71	compatible = "arm,malit602", "arm,malit60x", "arm,malit6xx", "arm,mali-midgard";
72	reg = <0xfc010000 0x4000>;
73	interrupts = <0 36 4>, <0 37 4>, <0 38 4>;
74	interrupt-names = "JOB", "MMU", "GPU";
75
76	clocks = <&pclk_mali>;
77	clock-names = "clk_mali";
78	mali-supply = <&vdd_mali>;
79	operating-points = <
80		/* KHz   uV */
81		533000 1250000,
82		450000 1150000,
83		400000 1125000,
84		350000 1075000,
85		266000 1025000,
86		160000  925000,
87		100000  912500,
88	>;
89	power_model {
90		compatible = "arm,mali-simple-power-model";
91		static-coefficient = <2427750>;
92		dynamic-coefficient = <4687>;
93		ts = <20000 2000 (-20) 2>;
94		thermal-zone = "gpu";
95	};
96};
97