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

ARM: dts: exynos: Adjust bus related OPPs to the values correct for Exynos5422 Odroids

Hardkernel's Odroid XU3/XU4/HC1 boards use bootloader, which configures
top PLLs to the following values: MPLL: 532MHz, CPLL: 666MHz and DPLL:
600MHz.

Adjust all bus related OPPs to the values that are possible to derive
from the top PLL configured by the bootloader. Also add a comment for
each bus describing which PLL is used for it.

The most significant change is the highest rate for wcore bus. It has
been increased to 532MHz as this is the value configured initially by
the bootloader. Also the voltage for this OPP is changed to match the
value set by the bootloader.

This patch finally allows the buses to operate on the rates matching the
values set for each OPP and fixes the following warnings observed on
boot:

exynos-bus: new bus device registered: soc:bus_wcore ( 84000 KHz ~ 400000 KHz)
exynos-bus: new bus device registered: soc:bus_noc ( 67000 KHz ~ 100000 KHz)
exynos-bus: new bus device registered: soc:bus_fsys_apb (100000 KHz ~ 200000 KHz)
...
exynos-bus soc:bus_wcore: dev_pm_opp_set_rate: failed to find current OPP for freq 532000000 (-34)
exynos-bus soc:bus_noc: dev_pm_opp_set_rate: failed to find current OPP for freq 111000000 (-34)
exynos-bus soc:bus_fsys_apb: dev_pm_opp_set_rate: failed to find current OPP for freq 222000000 (-34)

The problem with setting incorrect (in some cases much lower) clock rate
for the defined OPP were there from the beginning, but went unnoticed
because the only way to observe it was to manually check the rate of the
respective clocks. The commit 4294a779bd8d ("PM / devfreq: exynos-bus:
Convert to use dev_pm_opp_set_rate()") finally revealed it, because it
enabled use of the generic code from the OPP framework, which issues the
above mentioned warnings.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

authored by

Marek Szyprowski and committed by
Krzysztof Kozlowski
1019fe2c c6d0192a

+45 -31
+45 -31
arch/arm/boot/dts/exynos5422-odroid-core.dtsi
··· 38 38 bus_wcore_opp_table: opp_table2 { 39 39 compatible = "operating-points-v2"; 40 40 41 + /* derived from 532MHz MPLL */ 41 42 opp00 { 42 - opp-hz = /bits/ 64 <84000000>; 43 + opp-hz = /bits/ 64 <88700000>; 43 44 opp-microvolt = <925000 925000 1400000>; 44 45 }; 45 46 opp01 { 46 - opp-hz = /bits/ 64 <111000000>; 47 + opp-hz = /bits/ 64 <133000000>; 47 48 opp-microvolt = <950000 950000 1400000>; 48 49 }; 49 50 opp02 { 50 - opp-hz = /bits/ 64 <222000000>; 51 + opp-hz = /bits/ 64 <177400000>; 51 52 opp-microvolt = <950000 950000 1400000>; 52 53 }; 53 54 opp03 { 54 - opp-hz = /bits/ 64 <333000000>; 55 + opp-hz = /bits/ 64 <266000000>; 55 56 opp-microvolt = <950000 950000 1400000>; 56 57 }; 57 58 opp04 { 58 - opp-hz = /bits/ 64 <400000000>; 59 - opp-microvolt = <987500 987500 1400000>; 59 + opp-hz = /bits/ 64 <532000000>; 60 + opp-microvolt = <1000000 1000000 1400000>; 60 61 }; 61 62 }; 62 63 63 64 bus_noc_opp_table: opp_table3 { 64 65 compatible = "operating-points-v2"; 65 66 67 + /* derived from 666MHz CPLL */ 66 68 opp00 { 67 - opp-hz = /bits/ 64 <67000000>; 69 + opp-hz = /bits/ 64 <66600000>; 68 70 }; 69 71 opp01 { 70 - opp-hz = /bits/ 64 <75000000>; 72 + opp-hz = /bits/ 64 <74000000>; 71 73 }; 72 74 opp02 { 73 - opp-hz = /bits/ 64 <86000000>; 75 + opp-hz = /bits/ 64 <83250000>; 74 76 }; 75 77 opp03 { 76 - opp-hz = /bits/ 64 <100000000>; 78 + opp-hz = /bits/ 64 <111000000>; 77 79 }; 78 80 }; 79 81 80 82 bus_fsys_apb_opp_table: opp_table4 { 81 83 compatible = "operating-points-v2"; 82 - opp-shared; 83 84 85 + /* derived from 666MHz CPLL */ 84 86 opp00 { 85 - opp-hz = /bits/ 64 <100000000>; 87 + opp-hz = /bits/ 64 <111000000>; 86 88 }; 87 89 opp01 { 88 - opp-hz = /bits/ 64 <200000000>; 90 + opp-hz = /bits/ 64 <222000000>; 89 91 }; 90 92 }; 91 93 92 94 bus_fsys2_opp_table: opp_table5 { 93 95 compatible = "operating-points-v2"; 94 96 97 + /* derived from 600MHz DPLL */ 95 98 opp00 { 96 99 opp-hz = /bits/ 64 <75000000>; 97 100 }; 98 101 opp01 { 99 - opp-hz = /bits/ 64 <100000000>; 102 + opp-hz = /bits/ 64 <120000000>; 100 103 }; 101 104 opp02 { 102 - opp-hz = /bits/ 64 <150000000>; 105 + opp-hz = /bits/ 64 <200000000>; 103 106 }; 104 107 }; 105 108 106 109 bus_mfc_opp_table: opp_table6 { 107 110 compatible = "operating-points-v2"; 108 111 112 + /* derived from 666MHz CPLL */ 109 113 opp00 { 110 - opp-hz = /bits/ 64 <96000000>; 114 + opp-hz = /bits/ 64 <83250000>; 111 115 }; 112 116 opp01 { 113 117 opp-hz = /bits/ 64 <111000000>; 114 118 }; 115 119 opp02 { 116 - opp-hz = /bits/ 64 <167000000>; 120 + opp-hz = /bits/ 64 <166500000>; 117 121 }; 118 122 opp03 { 119 123 opp-hz = /bits/ 64 <222000000>; ··· 130 126 bus_gen_opp_table: opp_table7 { 131 127 compatible = "operating-points-v2"; 132 128 129 + /* derived from 532MHz MPLL */ 133 130 opp00 { 134 - opp-hz = /bits/ 64 <89000000>; 131 + opp-hz = /bits/ 64 <88700000>; 135 132 }; 136 133 opp01 { 137 134 opp-hz = /bits/ 64 <133000000>; ··· 141 136 opp-hz = /bits/ 64 <178000000>; 142 137 }; 143 138 opp03 { 144 - opp-hz = /bits/ 64 <267000000>; 139 + opp-hz = /bits/ 64 <266000000>; 145 140 }; 146 141 }; 147 142 148 143 bus_peri_opp_table: opp_table8 { 149 144 compatible = "operating-points-v2"; 150 145 146 + /* derived from 666MHz CPLL */ 151 147 opp00 { 152 - opp-hz = /bits/ 64 <67000000>; 148 + opp-hz = /bits/ 64 <66600000>; 153 149 }; 154 150 }; 155 151 156 152 bus_g2d_opp_table: opp_table9 { 157 153 compatible = "operating-points-v2"; 158 154 155 + /* derived from 666MHz CPLL */ 159 156 opp00 { 160 - opp-hz = /bits/ 64 <84000000>; 157 + opp-hz = /bits/ 64 <83250000>; 161 158 }; 162 159 opp01 { 163 - opp-hz = /bits/ 64 <167000000>; 160 + opp-hz = /bits/ 64 <111000000>; 164 161 }; 165 162 opp02 { 166 - opp-hz = /bits/ 64 <222000000>; 163 + opp-hz = /bits/ 64 <166500000>; 167 164 }; 168 165 opp03 { 169 - opp-hz = /bits/ 64 <300000000>; 166 + opp-hz = /bits/ 64 <222000000>; 170 167 }; 171 168 opp04 { 172 169 opp-hz = /bits/ 64 <333000000>; ··· 178 171 bus_g2d_acp_opp_table: opp_table10 { 179 172 compatible = "operating-points-v2"; 180 173 174 + /* derived from 532MHz MPLL */ 181 175 opp00 { 182 - opp-hz = /bits/ 64 <67000000>; 176 + opp-hz = /bits/ 64 <66500000>; 183 177 }; 184 178 opp01 { 185 179 opp-hz = /bits/ 64 <133000000>; ··· 189 181 opp-hz = /bits/ 64 <178000000>; 190 182 }; 191 183 opp03 { 192 - opp-hz = /bits/ 64 <267000000>; 184 + opp-hz = /bits/ 64 <266000000>; 193 185 }; 194 186 }; 195 187 196 188 bus_jpeg_opp_table: opp_table11 { 197 189 compatible = "operating-points-v2"; 198 190 191 + /* derived from 600MHz DPLL */ 199 192 opp00 { 200 193 opp-hz = /bits/ 64 <75000000>; 201 194 }; ··· 214 205 bus_jpeg_apb_opp_table: opp_table12 { 215 206 compatible = "operating-points-v2"; 216 207 208 + /* derived from 666MHz CPLL */ 217 209 opp00 { 218 - opp-hz = /bits/ 64 <84000000>; 210 + opp-hz = /bits/ 64 <83250000>; 219 211 }; 220 212 opp01 { 221 213 opp-hz = /bits/ 64 <111000000>; 222 214 }; 223 215 opp02 { 224 - opp-hz = /bits/ 64 <134000000>; 216 + opp-hz = /bits/ 64 <133000000>; 225 217 }; 226 218 opp03 { 227 - opp-hz = /bits/ 64 <167000000>; 219 + opp-hz = /bits/ 64 <166500000>; 228 220 }; 229 221 }; 230 222 231 223 bus_disp1_fimd_opp_table: opp_table13 { 232 224 compatible = "operating-points-v2"; 233 225 226 + /* derived from 600MHz DPLL */ 234 227 opp00 { 235 228 opp-hz = /bits/ 64 <120000000>; 236 229 }; ··· 244 233 bus_disp1_opp_table: opp_table14 { 245 234 compatible = "operating-points-v2"; 246 235 236 + /* derived from 600MHz DPLL */ 247 237 opp00 { 248 238 opp-hz = /bits/ 64 <120000000>; 249 239 }; ··· 259 247 bus_gscl_opp_table: opp_table15 { 260 248 compatible = "operating-points-v2"; 261 249 250 + /* derived from 600MHz DPLL */ 262 251 opp00 { 263 252 opp-hz = /bits/ 64 <150000000>; 264 253 }; ··· 274 261 bus_mscl_opp_table: opp_table16 { 275 262 compatible = "operating-points-v2"; 276 263 264 + /* derived from 666MHz CPLL */ 277 265 opp00 { 278 266 opp-hz = /bits/ 64 <84000000>; 279 267 }; ··· 288 274 opp-hz = /bits/ 64 <333000000>; 289 275 }; 290 276 opp04 { 291 - opp-hz = /bits/ 64 <400000000>; 277 + opp-hz = /bits/ 64 <666000000>; 292 278 }; 293 279 }; 294 280 ··· 412 398 }; 413 399 414 400 &bus_fsys { 415 - operating-points-v2 = <&bus_fsys_apb_opp_table>; 401 + operating-points-v2 = <&bus_fsys2_opp_table>; 416 402 devfreq = <&bus_wcore>; 417 403 status = "okay"; 418 404 };