Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 15 | |
Tirupathi Reddy | 8303147 | 2018-03-26 10:15:17 +0530 | [diff] [blame] | 16 | &pm8953_s3 { |
| 17 | regulator-min-microvolt = <984000>; |
| 18 | regulator-max-microvolt = <1240000>; |
| 19 | qcom,init-voltage = <984000>; |
| 20 | }; |
| 21 | |
| 22 | &pm8953_s4 { |
| 23 | regulator-min-microvolt = <1036000>; |
| 24 | regulator-max-microvolt = <2040000>; |
| 25 | qcom,init-voltage = <1036000>; |
| 26 | }; |
| 27 | |
| 28 | &pm8953_l1 { |
| 29 | regulator-min-microvolt = <975000>; |
| 30 | regulator-max-microvolt = <1050000>; |
| 31 | qcom,init-voltage = <975000>; |
| 32 | }; |
| 33 | |
| 34 | &pm8953_l2 { |
| 35 | regulator-min-microvolt = <975000>; |
| 36 | regulator-max-microvolt = <1175000>; |
| 37 | qcom,init-voltage = <975000>; |
| 38 | }; |
| 39 | |
| 40 | &pm8953_l10 { |
| 41 | regulator-min-microvolt = <2800000>; |
| 42 | regulator-max-microvolt = <3000000>; |
| 43 | qcom,init-voltage = <2800000>; |
| 44 | }; |
| 45 | |
| 46 | &pm8953_l22 { |
| 47 | regulator-min-microvolt = <2800000>; |
| 48 | regulator-max-microvolt = <2800000>; |
| 49 | qcom,init-voltage = <2800000>; |
| 50 | }; |
| 51 | |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 52 | &soc { |
| 53 | /delete-node/ regulator@19461d4; |
| 54 | /delete-node/ cpr4-ctrl@b018000; |
| 55 | /delete-node/ regulator@194415c; |
| 56 | /delete-node/ ldo@185f000; |
| 57 | |
| 58 | apc_mem_acc_vreg: apc-mem-acc-regulator { |
| 59 | compatible = "qcom,mem-acc-regulator"; |
| 60 | regulator-name = "apc_mem_acc_corner"; |
| 61 | regulator-min-microvolt = <1>; |
| 62 | regulator-max-microvolt = <3>; |
| 63 | qcom,acc-reg-addr-list = <0x0b1d1360 0x0b1d1364 |
| 64 | 0x0b1d1368 0x0b1d136c 0x0b1d1370>; |
| 65 | qcom,num-acc-corners = <3>; |
| 66 | qcom,boot-acc-corner = <1>; |
| 67 | qcom,corner1-reg-config = |
| 68 | /* 1 -> 1 */ |
| 69 | <(-1) (-1)>, <(-1) (-1)>, |
| 70 | <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>, |
| 71 | /* 1 -> 2 */ |
| 72 | < 1 0x0>, < 2 0x0>, |
| 73 | < 3 0x0>, < 4 0x0>, < 5 0x0>, |
| 74 | /* 1 -> 3 */ |
| 75 | < 1 0x0>, < 2 0x1>, |
| 76 | < 3 0x0>, < 4 0x10000>, < 5 0x0>; |
| 77 | qcom,corner2-reg-config = |
| 78 | /* 2 -> 1 */ |
| 79 | < 1 0x0>, < 2 0x80000000>, |
| 80 | < 3 0x0>, < 4 0x0>, < 5 0x80000000>, |
| 81 | /* 2 -> 2 */ |
| 82 | <(-1) (-1)>, <(-1) (-1)>, |
| 83 | <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>, |
| 84 | /* 2 -> 3 */ |
| 85 | < 1 0x0>, < 2 0x1>, |
| 86 | < 3 0x0>, < 4 0x10000>, < 5 0x0>; |
| 87 | qcom,corner3-reg-config = |
| 88 | /* 3 -> 1 */ |
| 89 | < 1 0x0>, < 2 0x80000000>, |
| 90 | < 3 0x0>, < 4 0x0>, < 5 0x80000000>, |
| 91 | /* 3 -> 2 */ |
| 92 | < 1 0x0>, < 2 0x0>, |
| 93 | < 3 0x0>, < 4 0x0>, < 5 0x0>, |
| 94 | /* 3 -> 3 */ |
| 95 | <(-1) (-1)>, <(-1) (-1)>, |
| 96 | <(-1) (-1)>, <(-1) (-1)>, <(-1) (-1)>; |
| 97 | }; |
| 98 | |
| 99 | apc_cpr: cpr4-ctrl@b018000 { |
| 100 | compatible = "qcom,cpr4-sdm632-apss-regulator"; |
| 101 | reg = <0xb018000 0x4000>, <0xa4000 0x1000>; |
| 102 | reg-names = "cpr_ctrl", "fuse_base"; |
| 103 | interrupts = <GIC_SPI 15 IRQ_TYPE_EDGE_RISING>; |
| 104 | interrupt-names = "cpr"; |
| 105 | |
| 106 | qcom,cpr-ctrl-name = "apc"; |
| 107 | |
| 108 | qcom,cpr-sensor-time = <1000>; |
| 109 | qcom,cpr-loop-time = <5000000>; |
| 110 | qcom,cpr-idle-cycles = <15>; |
| 111 | qcom,cpr-step-quot-init-min = <12>; |
| 112 | qcom,cpr-step-quot-init-max = <14>; |
| 113 | qcom,cpr-count-mode = <0>; /* All-at-once */ |
| 114 | qcom,cpr-count-repeat = <14>; |
| 115 | qcom,cpr-down-error-step-limit = <1>; |
| 116 | qcom,cpr-up-error-step-limit = <1>; |
| 117 | |
| 118 | qcom,apm-ctrl = <&apc_apm>; |
| 119 | qcom,apm-threshold-voltage = <875000>; |
| 120 | qcom,apm-hysteresis-voltage = <20000>; |
| 121 | |
Tirupathi Reddy | 26c7335 | 2018-03-26 13:43:15 +0530 | [diff] [blame] | 122 | vdd-supply = <&pm8953_s5>; |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 123 | qcom,voltage-step = <5000>; |
Tirupathi Reddy | 26c7335 | 2018-03-26 13:43:15 +0530 | [diff] [blame] | 124 | vdd-limit-supply = <&pm8953_s5_limit>; |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 125 | mem-acc-supply = <&apc_mem_acc_vreg>; |
| 126 | |
| 127 | qcom,cpr-panic-reg-addr-list = |
| 128 | <0xb1d2c18 0xb1d2900 0x0b1112b0 0xb018798>; |
| 129 | qcom,cpr-panic-reg-name-list = |
| 130 | "CCI_SAW4_PMIC_STS", "CCI_SAW4_VCTL", |
| 131 | "APCS_ALIAS0_APM_CTLER_STATUS", |
| 132 | "APCS0_CPR_CORE_ADJ_MODE_REG"; |
| 133 | |
| 134 | thread@0 { |
| 135 | qcom,cpr-thread-id = <0>; |
| 136 | qcom,cpr-consecutive-up = <0>; |
| 137 | qcom,cpr-consecutive-down = <2>; |
| 138 | qcom,cpr-up-threshold = <2>; |
| 139 | qcom,cpr-down-threshold = <1>; |
| 140 | |
| 141 | apc0_pwrcl_vreg: regulator { |
| 142 | regulator-name = "apc0_pwrcl_corner"; |
| 143 | regulator-min-microvolt = <1>; |
| 144 | regulator-max-microvolt = <7>; |
| 145 | |
| 146 | qcom,cpr-fuse-corners = <5>; |
Tirupathi Reddy | cd95623 | 2018-04-06 11:33:38 +0530 | [diff] [blame] | 147 | qcom,cpr-fuse-combos = <64>; |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 148 | qcom,cpr-corners = <7>; |
| 149 | qcom,cpr-corner-fmax-map = <1 2 3 4 7>; |
| 150 | |
| 151 | qcom,cpr-voltage-ceiling = |
Tirupathi Reddy | 8303147 | 2018-03-26 10:15:17 +0530 | [diff] [blame] | 152 | <720000 790000 865000 865000 920000 |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 153 | 990000 1065000>; |
| 154 | |
| 155 | qcom,cpr-voltage-floor = |
| 156 | <500000 500000 500000 500000 500000 |
| 157 | 500000 500000>; |
| 158 | |
| 159 | qcom,mem-acc-voltage = <1 1 2 2 2 2 3>; |
| 160 | |
| 161 | qcom,corner-frequencies = |
| 162 | <614400000 883200000 1036800000 |
| 163 | 1363200000 1536000000 1670400000 |
Tirupathi Reddy | 8303147 | 2018-03-26 10:15:17 +0530 | [diff] [blame] | 164 | 1804800000>; |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 165 | |
| 166 | qcom,cpr-ro-scaling-factor = |
| 167 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 168 | 1970 1880 2110 2010 2510 4900 4370 4780>, |
| 169 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 170 | 1970 1880 2110 2010 2510 4900 4370 4780>, |
| 171 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 172 | 1970 1880 2110 2010 2510 4900 4370 4780>, |
| 173 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 174 | 1970 1880 2110 2010 2510 4900 4370 4780>, |
| 175 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 176 | 1970 1880 2110 2010 2510 4900 4370 4780>; |
| 177 | |
| 178 | qcom,allow-voltage-interpolation; |
| 179 | qcom,allow-quotient-interpolation; |
| 180 | qcom,cpr-scaled-open-loop-voltage-as-ceiling; |
| 181 | }; |
| 182 | }; |
| 183 | |
| 184 | thread@1 { |
| 185 | qcom,cpr-thread-id = <1>; |
| 186 | qcom,cpr-consecutive-up = <0>; |
| 187 | qcom,cpr-consecutive-down = <2>; |
| 188 | qcom,cpr-up-threshold = <2>; |
| 189 | qcom,cpr-down-threshold = <1>; |
| 190 | |
| 191 | apc1_perfcl_vreg: regulator { |
| 192 | regulator-name = "apc1_perfcl_corner"; |
| 193 | regulator-min-microvolt = <1>; |
| 194 | regulator-max-microvolt = <5>; |
| 195 | |
| 196 | qcom,cpr-fuse-corners = <3>; |
Tirupathi Reddy | cd95623 | 2018-04-06 11:33:38 +0530 | [diff] [blame] | 197 | qcom,cpr-fuse-combos = <64>; |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 198 | qcom,cpr-corners = <5>; |
| 199 | qcom,cpr-corner-fmax-map = <1 2 5>; |
| 200 | |
| 201 | qcom,cpr-voltage-ceiling = |
Tirupathi Reddy | 8303147 | 2018-03-26 10:15:17 +0530 | [diff] [blame] | 202 | <865000 865000 920000 990000 1065000>; |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 203 | |
| 204 | qcom,cpr-voltage-floor = |
| 205 | <500000 500000 500000 500000 500000>; |
| 206 | |
| 207 | qcom,mem-acc-voltage = <2 2 2 2 3>; |
| 208 | |
| 209 | qcom,corner-frequencies = |
| 210 | <1094400000 1401600000 1555200000 |
Tirupathi Reddy | 8303147 | 2018-03-26 10:15:17 +0530 | [diff] [blame] | 211 | 1804800000 2016000000>; |
Tirupathi Reddy | a5db57f | 2018-02-16 10:13:53 +0530 | [diff] [blame] | 212 | |
| 213 | qcom,cpr-ro-scaling-factor = |
| 214 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 215 | 1970 1880 2110 2010 2510 4900 4370 4780>, |
| 216 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 217 | 1970 1880 2110 2010 2510 4900 4370 4780>, |
| 218 | <3600 3600 3830 2430 2520 2700 1790 1760 |
| 219 | 1970 1880 2110 2010 2510 4900 4370 4780>; |
| 220 | |
| 221 | qcom,allow-voltage-interpolation; |
| 222 | qcom,allow-quotient-interpolation; |
| 223 | qcom,cpr-scaled-open-loop-voltage-as-ceiling; |
| 224 | }; |
| 225 | }; |
| 226 | }; |
| 227 | |
| 228 | gfx_mem_acc: regulator@194415c { |
| 229 | compatible = "qcom,mem-acc-regulator"; |
| 230 | reg = <0x0194415c 0x4>; |
| 231 | reg-names = "acc-sel-l1"; |
| 232 | regulator-name = "gfx_mem_acc_corner"; |
| 233 | regulator-min-microvolt = <1>; |
| 234 | regulator-max-microvolt = <2>; |
| 235 | |
| 236 | qcom,acc-sel-l1-bit-pos = <0>; |
| 237 | qcom,acc-sel-l1-bit-size = <1>; |
| 238 | qcom,corner-acc-map = <0x1 0x0>; |
| 239 | }; |
| 240 | |
| 241 | gfx_vreg_corner: ldo@185f000 { |
| 242 | compatible = "qcom,msm8953-gfx-ldo"; |
| 243 | reg = <0x0185f000 0x30>, <0xa4000 0x1000>; |
| 244 | reg-names = "ldo_addr", "efuse_addr"; |
| 245 | |
| 246 | regulator-name = "msm_gfx_ldo"; |
| 247 | regulator-min-microvolt = <1>; |
| 248 | regulator-max-microvolt = <7>; |
| 249 | |
| 250 | qcom,ldo-voltage-ceiling = <620000 680000 750000>; |
| 251 | qcom,ldo-voltage-floor = <510000 510000 600000>; |
| 252 | |
| 253 | qcom,num-corners = <7>; |
| 254 | qcom,num-ldo-corners = <3>; |
| 255 | qcom,ldo-enable-corner-map = <0 0 0 0 0 0 0>; |
| 256 | qcom,init-corner = <4>; |
| 257 | |
| 258 | vdd-cx-supply = <&pm8953_s2_level>; |
| 259 | qcom,vdd-cx-corner-map = <RPM_SMD_REGULATOR_LEVEL_LOW_SVS>, |
| 260 | <RPM_SMD_REGULATOR_LEVEL_LOW_SVS>, |
| 261 | <RPM_SMD_REGULATOR_LEVEL_SVS>, |
| 262 | <RPM_SMD_REGULATOR_LEVEL_SVS_PLUS>, |
| 263 | <RPM_SMD_REGULATOR_LEVEL_NOM>, |
| 264 | <RPM_SMD_REGULATOR_LEVEL_NOM_PLUS>, |
| 265 | <RPM_SMD_REGULATOR_LEVEL_TURBO>; |
| 266 | |
| 267 | mem-acc-supply = <&gfx_mem_acc>; |
| 268 | qcom,mem-acc-corner-map = <1 1 1 2 2 2 2>; |
| 269 | }; |
| 270 | }; |