Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: cpufreq: enhance MediaTek cpufreq dt-binding document

Update binding document with adding operating-points-v2 as the required
property and the cooling level as the optional properties and adding more
examples guiding people how to use MediaTek cpufreq driver for MediaTek
SoCs.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Sean Wang and committed by
Rafael J. Wysocki
bb33270c 7e17ae86

+167 -3
+167 -3
Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
··· 1 - Device Tree Clock bindins for CPU DVFS of Mediatek MT8173 SoC 1 + Binding for MediaTek's CPUFreq driver 2 + ===================================== 2 3 3 4 Required properties: 4 5 - clocks: A list of phandle + clock-specifier pairs for the clocks listed in clock names. ··· 10 9 transition and not stable yet. 11 10 Please refer to Documentation/devicetree/bindings/clk/clock-bindings.txt for 12 11 generic clock consumer properties. 12 + - operating-points-v2: Please refer to Documentation/devicetree/bindings/opp/opp.txt 13 + for detail. 13 14 - proc-supply: Regulator for Vproc of CPU cluster. 14 15 15 16 Optional properties: ··· 20 17 Vsram to fit SoC specific needs. When absent, the voltage scaling 21 18 flow is handled by hardware, hence no software "voltage tracking" is 22 19 needed. 20 + - #cooling-cells: 21 + - cooling-min-level: 22 + - cooling-max-level: 23 + Please refer to Documentation/devicetree/bindings/thermal/thermal.txt 24 + for detail. 23 25 24 - Example: 25 - -------- 26 + Example 1 (MT7623 SoC): 27 + 28 + cpu_opp_table: opp_table { 29 + compatible = "operating-points-v2"; 30 + opp-shared; 31 + 32 + opp-598000000 { 33 + opp-hz = /bits/ 64 <598000000>; 34 + opp-microvolt = <1050000>; 35 + }; 36 + 37 + opp-747500000 { 38 + opp-hz = /bits/ 64 <747500000>; 39 + opp-microvolt = <1050000>; 40 + }; 41 + 42 + opp-1040000000 { 43 + opp-hz = /bits/ 64 <1040000000>; 44 + opp-microvolt = <1150000>; 45 + }; 46 + 47 + opp-1196000000 { 48 + opp-hz = /bits/ 64 <1196000000>; 49 + opp-microvolt = <1200000>; 50 + }; 51 + 52 + opp-1300000000 { 53 + opp-hz = /bits/ 64 <1300000000>; 54 + opp-microvolt = <1300000>; 55 + }; 56 + }; 57 + 58 + cpu0: cpu@0 { 59 + device_type = "cpu"; 60 + compatible = "arm,cortex-a7"; 61 + reg = <0x0>; 62 + clocks = <&infracfg CLK_INFRA_CPUSEL>, 63 + <&apmixedsys CLK_APMIXED_MAINPLL>; 64 + clock-names = "cpu", "intermediate"; 65 + operating-points-v2 = <&cpu_opp_table>; 66 + #cooling-cells = <2>; 67 + cooling-min-level = <0>; 68 + cooling-max-level = <7>; 69 + }; 70 + cpu@1 { 71 + device_type = "cpu"; 72 + compatible = "arm,cortex-a7"; 73 + reg = <0x1>; 74 + operating-points-v2 = <&cpu_opp_table>; 75 + }; 76 + cpu@2 { 77 + device_type = "cpu"; 78 + compatible = "arm,cortex-a7"; 79 + reg = <0x2>; 80 + operating-points-v2 = <&cpu_opp_table>; 81 + }; 82 + cpu@3 { 83 + device_type = "cpu"; 84 + compatible = "arm,cortex-a7"; 85 + reg = <0x3>; 86 + operating-points-v2 = <&cpu_opp_table>; 87 + }; 88 + 89 + Example 2 (MT8173 SoC): 90 + cpu_opp_table_a: opp_table_a { 91 + compatible = "operating-points-v2"; 92 + opp-shared; 93 + 94 + opp-507000000 { 95 + opp-hz = /bits/ 64 <507000000>; 96 + opp-microvolt = <859000>; 97 + }; 98 + 99 + opp-702000000 { 100 + opp-hz = /bits/ 64 <702000000>; 101 + opp-microvolt = <908000>; 102 + }; 103 + 104 + opp-1001000000 { 105 + opp-hz = /bits/ 64 <1001000000>; 106 + opp-microvolt = <983000>; 107 + }; 108 + 109 + opp-1105000000 { 110 + opp-hz = /bits/ 64 <1105000000>; 111 + opp-microvolt = <1009000>; 112 + }; 113 + 114 + opp-1183000000 { 115 + opp-hz = /bits/ 64 <1183000000>; 116 + opp-microvolt = <1028000>; 117 + }; 118 + 119 + opp-1404000000 { 120 + opp-hz = /bits/ 64 <1404000000>; 121 + opp-microvolt = <1083000>; 122 + }; 123 + 124 + opp-1508000000 { 125 + opp-hz = /bits/ 64 <1508000000>; 126 + opp-microvolt = <1109000>; 127 + }; 128 + 129 + opp-1573000000 { 130 + opp-hz = /bits/ 64 <1573000000>; 131 + opp-microvolt = <1125000>; 132 + }; 133 + }; 134 + 135 + cpu_opp_table_b: opp_table_b { 136 + compatible = "operating-points-v2"; 137 + opp-shared; 138 + 139 + opp-507000000 { 140 + opp-hz = /bits/ 64 <507000000>; 141 + opp-microvolt = <828000>; 142 + }; 143 + 144 + opp-702000000 { 145 + opp-hz = /bits/ 64 <702000000>; 146 + opp-microvolt = <867000>; 147 + }; 148 + 149 + opp-1001000000 { 150 + opp-hz = /bits/ 64 <1001000000>; 151 + opp-microvolt = <927000>; 152 + }; 153 + 154 + opp-1209000000 { 155 + opp-hz = /bits/ 64 <1209000000>; 156 + opp-microvolt = <968000>; 157 + }; 158 + 159 + opp-1404000000 { 160 + opp-hz = /bits/ 64 <1007000000>; 161 + opp-microvolt = <1028000>; 162 + }; 163 + 164 + opp-1612000000 { 165 + opp-hz = /bits/ 64 <1612000000>; 166 + opp-microvolt = <1049000>; 167 + }; 168 + 169 + opp-1807000000 { 170 + opp-hz = /bits/ 64 <1807000000>; 171 + opp-microvolt = <1089000>; 172 + }; 173 + 174 + opp-1989000000 { 175 + opp-hz = /bits/ 64 <1989000000>; 176 + opp-microvolt = <1125000>; 177 + }; 178 + }; 179 + 26 180 cpu0: cpu@0 { 27 181 device_type = "cpu"; 28 182 compatible = "arm,cortex-a53"; ··· 189 29 clocks = <&infracfg CLK_INFRA_CA53SEL>, 190 30 <&apmixedsys CLK_APMIXED_MAINPLL>; 191 31 clock-names = "cpu", "intermediate"; 32 + operating-points-v2 = <&cpu_opp_table_a>; 192 33 }; 193 34 194 35 cpu1: cpu@1 { ··· 201 40 clocks = <&infracfg CLK_INFRA_CA53SEL>, 202 41 <&apmixedsys CLK_APMIXED_MAINPLL>; 203 42 clock-names = "cpu", "intermediate"; 43 + operating-points-v2 = <&cpu_opp_table_a>; 204 44 }; 205 45 206 46 cpu2: cpu@100 { ··· 213 51 clocks = <&infracfg CLK_INFRA_CA57SEL>, 214 52 <&apmixedsys CLK_APMIXED_MAINPLL>; 215 53 clock-names = "cpu", "intermediate"; 54 + operating-points-v2 = <&cpu_opp_table_b>; 216 55 }; 217 56 218 57 cpu3: cpu@101 { ··· 225 62 clocks = <&infracfg CLK_INFRA_CA57SEL>, 226 63 <&apmixedsys CLK_APMIXED_MAINPLL>; 227 64 clock-names = "cpu", "intermediate"; 65 + operating-points-v2 = <&cpu_opp_table_b>; 228 66 }; 229 67 230 68 &cpu0 {