|
| 1 | +# |
| 2 | +# (C) COPYRIGHT 2013-2018 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 | +# This program is distributed in the hope that it will be useful, |
| 10 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +# GNU General Public License for more details. |
| 13 | +# |
| 14 | +# You should have received a copy of the GNU General Public License |
| 15 | +# along with this program; if not, you can access it online at |
| 16 | +# http://www.gnu.org/licenses/gpl-2.0.html. |
| 17 | +# |
| 18 | +# SPDX-License-Identifier: GPL-2.0 |
| 19 | +# |
| 20 | +# |
| 21 | + |
| 22 | +* ARM Mali Midgard devices |
| 23 | + |
| 24 | + |
| 25 | +Required properties: |
| 26 | + |
| 27 | +- compatible : Should be mali<chip>, replacing digits with x from the back, |
| 28 | +until malit<Major>xx, ending with arm,mali-midgard, the latter not optional. |
| 29 | +- reg : Physical base address of the device and length of the register area. |
| 30 | +- interrupts : Contains the three IRQ lines required by T-6xx devices |
| 31 | +- interrupt-names : Contains the names of IRQ resources in the order they were |
| 32 | +provided in the interrupts property. Must contain: "JOB, "MMU", "GPU". |
| 33 | + |
| 34 | +Optional: |
| 35 | + |
| 36 | +- clocks : Phandle to clock for the Mali T-6xx device. |
| 37 | +- clock-names : Shall be "clk_mali". |
| 38 | +- mali-supply : Phandle to regulator for the Mali device. Refer to |
| 39 | +Documentation/devicetree/bindings/regulator/regulator.txt for details. |
| 40 | +- operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt |
| 41 | +for details. |
| 42 | +- jm_config : For T860/T880. Sets job manager configuration. An array containing: |
| 43 | + - 1 to override the TIMESTAMP value, 0 otherwise. |
| 44 | + - 1 to override clock gate, forcing them to be always on, 0 otherwise. |
| 45 | + - 1 to enable job throttle, limiting the number of cores that can be started |
| 46 | + simultaneously, 0 otherwise. |
| 47 | + - Value between 0 and 63 (including). If job throttle is enabled, this is one |
| 48 | + less than the number of cores that can be started simultaneously. |
| 49 | +- power_model : Sets the power model parameters. Three power models are currently |
| 50 | + defined which include "mali-simple-power-model", "mali-g71-power-model" and |
| 51 | + "mali-g72-power-model". |
| 52 | + - mali-simple-power-model: this model derives the GPU power usage based |
| 53 | + on the GPU voltage scaled by the system temperature. Note: it was |
| 54 | + designed for the Juno platform, and may not be suitable for others. |
| 55 | + - compatible: Should be "arm,mali-simple-power-model" |
| 56 | + - dynamic-coefficient: Coefficient, in pW/(Hz V^2), which is |
| 57 | + multiplied by v^2*f to calculate the dynamic power consumption. |
| 58 | + - static-coefficient: Coefficient, in uW/V^3, which is |
| 59 | + multiplied by v^3 to calculate the static power consumption. |
| 60 | + - ts: An array containing coefficients for the temperature |
| 61 | + scaling factor. This is used to scale the static power by a |
| 62 | + factor of tsf/1000000, |
| 63 | + where tsf = ts[3]*T^3 + ts[2]*T^2 + ts[1]*T + ts[0], |
| 64 | + and T = temperature in degrees. |
| 65 | + - thermal-zone: A string identifying the thermal zone used for |
| 66 | + the GPU |
| 67 | + - temp-poll-interval-ms: the interval at which the system |
| 68 | + temperature is polled |
| 69 | + - mali-g71-power-model / mali-g72-power-model: these models derive |
| 70 | + the GPU power usage based on performance counters, so they are more |
| 71 | + accurate. |
| 72 | + - compatible: Should be "arm,mali-g71-power-model" / |
| 73 | + "arm,mali-g72-power-model" |
| 74 | + - scale: the dynamic power calculated by the power model is |
| 75 | + scaled by a factor of "scale"/1000. This value should be |
| 76 | + chosen to match a particular implementation. |
| 77 | + * Note: when IPA is used, two separate power models (simple and counter-based) |
| 78 | + are used at different points so care should be taken to configure |
| 79 | + both power models in the device tree (specifically dynamic-coefficient, |
| 80 | + static-coefficient and scale) to best match the platform. |
| 81 | +- system-coherency : Sets the coherency protocol to be used for coherent |
| 82 | + accesses made from the GPU. |
| 83 | + If not set then no coherency is used. |
| 84 | + - 0 : ACE-Lite |
| 85 | + - 1 : ACE |
| 86 | + - 31 : No coherency |
| 87 | +- ipa-model : Sets the IPA model to be used for power management. GPU probe will fail if the |
| 88 | + model is not found in the registered models list. If no model is specified here, |
| 89 | + a gpu-id based model is picked if available, otherwise the default model is used. |
| 90 | + - mali-simple-power-model: Default model used on mali |
| 91 | +- protected-mode-switcher : Phandle to device implemented protected mode switching functionality. |
| 92 | +Refer to Documentation/devicetree/bindings/arm/smc-protected-mode-switcher.txt for one implementation. |
| 93 | + |
| 94 | +Example for a Mali GPU: |
| 95 | + |
| 96 | +gpu@0xfc010000 { |
| 97 | + compatible = "arm,malit602", "arm,malit60x", "arm,malit6xx", "arm,mali-midgard"; |
| 98 | + reg = <0xfc010000 0x4000>; |
| 99 | + interrupts = <0 36 4>, <0 37 4>, <0 38 4>; |
| 100 | + interrupt-names = "JOB", "MMU", "GPU"; |
| 101 | + |
| 102 | + clocks = <&pclk_mali>; |
| 103 | + clock-names = "clk_mali"; |
| 104 | + mali-supply = <&vdd_mali>; |
| 105 | + operating-points-v2 = <&gpu_opp_table>; |
| 106 | + power_model@0 { |
| 107 | + compatible = "arm,mali-simple-power-model"; |
| 108 | + static-coefficient = <2427750>; |
| 109 | + dynamic-coefficient = <4687>; |
| 110 | + ts = <20000 2000 (-20) 2>; |
| 111 | + thermal-zone = "gpu"; |
| 112 | + }; |
| 113 | + power_model@1 { |
| 114 | + compatible = "arm,mali-g71-power-model"; |
| 115 | + scale = <5>; |
| 116 | + }; |
| 117 | +}; |
| 118 | + |
| 119 | +gpu_opp_table: opp_table0 { |
| 120 | + compatible = "operating-points-v2"; |
| 121 | + |
| 122 | + opp@533000000 { |
| 123 | + opp-hz = /bits/ 64 <533000000>; |
| 124 | + opp-microvolt = <1250000>; |
| 125 | + }; |
| 126 | + opp@450000000 { |
| 127 | + opp-hz = /bits/ 64 <450000000>; |
| 128 | + opp-microvolt = <1150000>; |
| 129 | + }; |
| 130 | + opp@400000000 { |
| 131 | + opp-hz = /bits/ 64 <400000000>; |
| 132 | + opp-microvolt = <1125000>; |
| 133 | + }; |
| 134 | + opp@350000000 { |
| 135 | + opp-hz = /bits/ 64 <350000000>; |
| 136 | + opp-microvolt = <1075000>; |
| 137 | + }; |
| 138 | + opp@266000000 { |
| 139 | + opp-hz = /bits/ 64 <266000000>; |
| 140 | + opp-microvolt = <1025000>; |
| 141 | + }; |
| 142 | + opp@160000000 { |
| 143 | + opp-hz = /bits/ 64 <160000000>; |
| 144 | + opp-microvolt = <925000>; |
| 145 | + }; |
| 146 | + opp@100000000 { |
| 147 | + opp-hz = /bits/ 64 <100000000>; |
| 148 | + opp-microvolt = <912500>; |
| 149 | + }; |
| 150 | +}; |
0 commit comments