1 // SPDX-License-Identifier: BSD-3-Clause 1 // SPDX-License-Identifier: BSD-3-Clause 2 /* 2 /* 3 * Copyright (c) 2020, Konrad Dybcio 3 * Copyright (c) 2020, Konrad Dybcio 4 */ 4 */ 5 5 6 /dts-v1/; 6 /dts-v1/; 7 7 8 #include "msm8992.dtsi" 8 #include "msm8992.dtsi" 9 #include "pm8994.dtsi" 9 #include "pm8994.dtsi" 10 #include "pmi8994.dtsi" 10 #include "pmi8994.dtsi" 11 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/gpio/gpio.h> 12 #include <dt-bindings/input/gpio-keys.h> 12 #include <dt-bindings/input/gpio-keys.h> 13 13 14 /delete-node/ &adsp_mem; << 15 /delete-node/ &audio_mem; << 16 /delete-node/ &mpss_mem; << 17 /delete-node/ &peripheral_region; << 18 /delete-node/ &res_hyp_mem; << 19 /delete-node/ &rmtfs_mem; << 20 << 21 / { 14 / { 22 model = "Xiaomi Mi 4C"; 15 model = "Xiaomi Mi 4C"; 23 compatible = "xiaomi,libra", "qcom,msm 16 compatible = "xiaomi,libra", "qcom,msm8992"; 24 chassis-type = "handset"; 17 chassis-type = "handset"; 25 18 26 /* required for bootloader to select c 19 /* required for bootloader to select correct board */ 27 qcom,msm-id = <251 0>, <252 0>; !! 20 qcom,msm-id = <251 0 252 0>; 28 qcom,pmic-id = <65545 65546 0 0>; 21 qcom,pmic-id = <65545 65546 0 0>; 29 qcom,board-id = <12 0>; 22 qcom,board-id = <12 0>; 30 23 31 /* This enables graphical output via b 24 /* This enables graphical output via bootloader-enabled display */ 32 chosen { 25 chosen { 33 bootargs = "earlycon=tty0 cons !! 26 bootargs = "earlycon=tty0 console=tty0"; 34 27 35 #address-cells = <2>; 28 #address-cells = <2>; 36 #size-cells = <2>; 29 #size-cells = <2>; 37 ranges; 30 ranges; 38 31 39 framebuffer0: framebuffer@3400 !! 32 framebuffer0: framebuffer@3404000 { >> 33 status= "okay"; 40 compatible = "simple-f 34 compatible = "simple-framebuffer"; 41 reg = <0 0x3400000 0 ( !! 35 reg = <0 0x3404000 0 (1080 * 1920 * 3)>; 42 width = <1080>; 36 width = <1080>; 43 height = <1920>; 37 height = <1920>; 44 stride = <(1080 * 3)>; 38 stride = <(1080 * 3)>; 45 format = "r8g8b8"; 39 format = "r8g8b8"; 46 /* << 47 * That's a lot of clo << 48 * to unused clk clean << 49 */ << 50 clocks = <&mmcc MDSS_A << 51 <&mmcc MDSS_A << 52 <&mmcc MDSS_V << 53 <&mmcc MDSS_M << 54 <&mmcc MDSS_B << 55 <&mmcc MDSS_P << 56 <&mmcc MDSS_E << 57 power-domains = <&mmcc << 58 }; 40 }; 59 }; 41 }; 60 42 61 gpio-keys { !! 43 gpio_keys { 62 compatible = "gpio-keys"; 44 compatible = "gpio-keys"; >> 45 input-name = "gpio-keys"; >> 46 #address-cells = <1>; >> 47 #size-cells = <0>; 63 autorepeat; 48 autorepeat; 64 49 65 button { !! 50 button@0 { 66 label = "Volume Up"; 51 label = "Volume Up"; 67 gpios = <&pm8994_gpios 52 gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>; 68 linux,input-type = <1> 53 linux,input-type = <1>; 69 linux,code = <KEY_VOLU 54 linux,code = <KEY_VOLUMEUP>; 70 wakeup-source; 55 wakeup-source; 71 debounce-interval = <1 56 debounce-interval = <15>; 72 }; 57 }; 73 }; 58 }; 74 59 75 reserved-memory { 60 reserved-memory { 76 #address-cells = <2>; 61 #address-cells = <2>; 77 #size-cells = <2>; 62 #size-cells = <2>; 78 ranges; 63 ranges; 79 64 80 memory_hole: hole@6400000 { !! 65 /* This is for getting crash logs using Android downstream kernels */ 81 reg = <0 0x06400000 0 << 82 no-map; << 83 }; << 84 << 85 memory_hole2: hole2@6c00000 { << 86 reg = <0 0x06c00000 0 << 87 no-map; << 88 }; << 89 << 90 mpss_mem: mpss@9000000 { << 91 reg = <0 0x09000000 0 << 92 no-map; << 93 }; << 94 << 95 tzapp: tzapp@ea00000 { << 96 reg = <0 0x0ea00000 0 << 97 no-map; << 98 }; << 99 << 100 mdm_rfsa_mem: mdm-rfsa@ca0b000 << 101 reg = <0 0xca0b0000 0 << 102 no-map; << 103 }; << 104 << 105 rmtfs_mem: rmtfs@ca100000 { << 106 compatible = "qcom,rmt << 107 reg = <0 0xca100000 0 << 108 no-map; << 109 << 110 qcom,client-id = <1>; << 111 }; << 112 << 113 qseecom_mem: qseecom@cb400000 << 114 reg = <0 0xcb400000 0 << 115 no-mem; << 116 }; << 117 << 118 adsp_rfsa_mem: adsp-rfsa@cd000 << 119 reg = <0 0xcd000000 0 << 120 no-map; << 121 }; << 122 << 123 sensor_rfsa_mem: sensor-rfsa@c << 124 reg = <0 0xcd010000 0 << 125 no-map; << 126 }; << 127 << 128 ramoops@dfc00000 { 66 ramoops@dfc00000 { 129 compatible = "ramoops" 67 compatible = "ramoops"; 130 reg = <0 0xdfc00000 0 !! 68 reg = <0x0 0xdfc00000 0x0 0x40000>; 131 console-size = <0x1000 69 console-size = <0x10000>; 132 record-size = <0x10000 70 record-size = <0x10000>; 133 ftrace-size = <0x10000 71 ftrace-size = <0x10000>; 134 pmsg-size = <0x20000>; 72 pmsg-size = <0x20000>; 135 }; 73 }; >> 74 >> 75 modem_region: modem_region@9000000 { >> 76 reg = <0x0 0x9000000 0x0 0x5a00000>; >> 77 no-map; >> 78 }; >> 79 >> 80 tzapp: modem_region@ea00000 { >> 81 reg = <0x0 0xea00000 0x0 0x1900000>; >> 82 no-map; >> 83 }; 136 }; 84 }; 137 }; 85 }; 138 86 139 &blsp1_i2c2 { 87 &blsp1_i2c2 { 140 status = "okay"; 88 status = "okay"; 141 89 142 /* Atmel or Synaptics touchscreen */ 90 /* Atmel or Synaptics touchscreen */ 143 }; 91 }; 144 92 145 &blsp1_i2c5 { 93 &blsp1_i2c5 { 146 status = "okay"; 94 status = "okay"; 147 95 148 /* ST lsm6db0 gyro/accelerometer */ 96 /* ST lsm6db0 gyro/accelerometer */ 149 }; 97 }; 150 98 151 &blsp1_i2c6 { 99 &blsp1_i2c6 { 152 status = "okay"; 100 status = "okay"; 153 101 154 /* 102 /* 155 * NXP NCI NFC, 103 * NXP NCI NFC, 156 * TI USB320 Type-C controller, 104 * TI USB320 Type-C controller, 157 * Pericom 30216a USB (de)mux switch 105 * Pericom 30216a USB (de)mux switch 158 */ 106 */ 159 }; 107 }; 160 108 161 &blsp2_i2c1 { 109 &blsp2_i2c1 { 162 status = "okay"; 110 status = "okay"; 163 111 164 /* cm36686 proximity and ambient light 112 /* cm36686 proximity and ambient light sensor */ 165 }; 113 }; 166 114 167 &blsp2_i2c5 { 115 &blsp2_i2c5 { 168 status = "okay"; 116 status = "okay"; 169 117 170 /* Silabs si4705 FM transmitter */ 118 /* Silabs si4705 FM transmitter */ 171 }; 119 }; 172 120 173 &blsp2_uart2 { 121 &blsp2_uart2 { 174 status = "okay"; 122 status = "okay"; 175 }; 123 }; 176 124 177 &pm8994_spmi_regulators { !! 125 &peripheral_region { 178 VDD_APC0: s8 { !! 126 reg = <0x0 0x7400000 0x0 0x1c00000>; 179 regulator-min-microvolt = <680 !! 127 no-map; 180 regulator-max-microvolt = <118 << 181 regulator-always-on; << 182 regulator-boot-on; << 183 }; << 184 << 185 /* APC1 is 3-phase, but quoting downst << 186 VDD_APC1: s11 { << 187 regulator-min-microvolt = <700 << 188 regulator-max-microvolt = <122 << 189 regulator-always-on; << 190 regulator-boot-on; << 191 }; << 192 }; 128 }; 193 129 194 &rpm_requests { 130 &rpm_requests { 195 regulators-0 { !! 131 pm8994-regulators { 196 compatible = "qcom,rpm-pm8994- 132 compatible = "qcom,rpm-pm8994-regulators"; 197 133 198 vdd_l1-supply = <&pm8994_s7>; 134 vdd_l1-supply = <&pm8994_s7>; 199 vdd_l2_26_28-supply = <&pm8994 135 vdd_l2_26_28-supply = <&pm8994_s3>; 200 vdd_l3_11-supply = <&pm8994_s3 136 vdd_l3_11-supply = <&pm8994_s3>; 201 vdd_l4_27_31-supply = <&pm8994 137 vdd_l4_27_31-supply = <&pm8994_s3>; 202 vdd_l5_7-supply = <&pm8994_s3> 138 vdd_l5_7-supply = <&pm8994_s3>; 203 vdd_l6_12_32-supply = <&pm8994 139 vdd_l6_12_32-supply = <&pm8994_s5>; 204 vdd_l8_16_30-supply = <&vph_pw 140 vdd_l8_16_30-supply = <&vph_pwr>; 205 vdd_l9_10_18_22-supply = <&vph 141 vdd_l9_10_18_22-supply = <&vph_pwr>; 206 vdd_l13_19_23_24-supply = <&vp 142 vdd_l13_19_23_24-supply = <&vph_pwr>; 207 vdd_l14_15-supply = <&pm8994_s 143 vdd_l14_15-supply = <&pm8994_s5>; 208 vdd_l17_29-supply = <&vph_pwr> 144 vdd_l17_29-supply = <&vph_pwr>; 209 vdd_l20_21-supply = <&vph_pwr> 145 vdd_l20_21-supply = <&vph_pwr>; 210 vdd_l25-supply = <&pm8994_s5>; 146 vdd_l25-supply = <&pm8994_s5>; 211 vdd_lvs1_2-supply = <&pm8994_s !! 147 vdd_lvs1_2 = <&pm8994_s4>; 212 148 213 /* S1, S2, S6 and S12 are mana 149 /* S1, S2, S6 and S12 are managed by RPMPD */ 214 150 215 pm8994_s3: s3 { 151 pm8994_s3: s3 { 216 regulator-min-microvol 152 regulator-min-microvolt = <1300000>; 217 regulator-max-microvol 153 regulator-max-microvolt = <1300000>; 218 }; 154 }; 219 155 220 pm8994_s4: s4 { 156 pm8994_s4: s4 { 221 regulator-min-microvol 157 regulator-min-microvolt = <1800000>; 222 regulator-max-microvol 158 regulator-max-microvolt = <1800000>; 223 regulator-allow-set-lo 159 regulator-allow-set-load; 224 regulator-always-on; 160 regulator-always-on; 225 regulator-system-load 161 regulator-system-load = <325000>; 226 }; 162 }; 227 163 228 pm8994_s5: s5 { 164 pm8994_s5: s5 { 229 regulator-min-microvol 165 regulator-min-microvolt = <2150000>; 230 regulator-max-microvol 166 regulator-max-microvolt = <2150000>; 231 }; 167 }; 232 168 233 pm8994_s7: s7 { 169 pm8994_s7: s7 { 234 regulator-min-microvol 170 regulator-min-microvolt = <1000000>; 235 regulator-max-microvol 171 regulator-max-microvolt = <1000000>; 236 }; 172 }; 237 173 238 /* S8, S9, S10 and S11 - SPMI- 174 /* S8, S9, S10 and S11 - SPMI-managed VDD_APC */ 239 175 240 pm8994_l1: l1 { 176 pm8994_l1: l1 { 241 regulator-min-microvol 177 regulator-min-microvolt = <1000000>; 242 regulator-max-microvol 178 regulator-max-microvolt = <1000000>; 243 }; 179 }; 244 180 245 pm8994_l2: l2 { 181 pm8994_l2: l2 { 246 regulator-min-microvol 182 regulator-min-microvolt = <1250000>; 247 regulator-max-microvol 183 regulator-max-microvolt = <1250000>; 248 }; 184 }; 249 185 250 pm8994_l3: l3 { 186 pm8994_l3: l3 { 251 regulator-min-microvol 187 regulator-min-microvolt = <1200000>; 252 regulator-max-microvol 188 regulator-max-microvolt = <1200000>; 253 }; 189 }; 254 190 255 pm8994_l4: l4 { 191 pm8994_l4: l4 { 256 regulator-min-microvol 192 regulator-min-microvolt = <1225000>; 257 regulator-max-microvol 193 regulator-max-microvolt = <1225000>; 258 }; 194 }; 259 195 260 /* L5 is inaccessible from RPM 196 /* L5 is inaccessible from RPM */ 261 197 262 pm8994_l6: l6 { 198 pm8994_l6: l6 { 263 regulator-min-microvol 199 regulator-min-microvolt = <1800000>; 264 regulator-max-microvol 200 regulator-max-microvolt = <1800000>; 265 }; 201 }; 266 202 267 /* L7 is inaccessible from RPM 203 /* L7 is inaccessible from RPM */ 268 204 269 pm8994_l8: l8 { 205 pm8994_l8: l8 { 270 regulator-min-microvol 206 regulator-min-microvolt = <1800000>; 271 regulator-max-microvol 207 regulator-max-microvolt = <1800000>; 272 }; 208 }; 273 209 274 pm8994_l9: l9 { 210 pm8994_l9: l9 { 275 regulator-min-microvol 211 regulator-min-microvolt = <1800000>; 276 regulator-max-microvol 212 regulator-max-microvolt = <1800000>; 277 }; 213 }; 278 214 279 pm8994_l10: l10 { 215 pm8994_l10: l10 { 280 regulator-min-microvol 216 regulator-min-microvolt = <1800000>; 281 regulator-max-microvol 217 regulator-max-microvolt = <1800000>; 282 }; 218 }; 283 219 284 pm8994_l11: l11 { 220 pm8994_l11: l11 { 285 regulator-min-microvol 221 regulator-min-microvolt = <1200000>; 286 regulator-max-microvol 222 regulator-max-microvolt = <1200000>; 287 }; 223 }; 288 224 289 pm8994_l12: l12 { 225 pm8994_l12: l12 { 290 regulator-min-microvol 226 regulator-min-microvolt = <1800000>; 291 regulator-max-microvol 227 regulator-max-microvolt = <1800000>; 292 }; 228 }; 293 229 294 pm8994_l13: l13 { 230 pm8994_l13: l13 { 295 regulator-min-microvol 231 regulator-min-microvolt = <1800000>; 296 regulator-max-microvol 232 regulator-max-microvolt = <2950000>; 297 }; 233 }; 298 234 299 pm8994_l14: l14 { 235 pm8994_l14: l14 { 300 regulator-min-microvol 236 regulator-min-microvolt = <1800000>; 301 regulator-max-microvol 237 regulator-max-microvolt = <1800000>; 302 }; 238 }; 303 239 304 pm8994_l15: l15 { 240 pm8994_l15: l15 { 305 regulator-min-microvol 241 regulator-min-microvolt = <1800000>; 306 regulator-max-microvol 242 regulator-max-microvolt = <1800000>; 307 }; 243 }; 308 244 309 pm8994_l16: l16 { 245 pm8994_l16: l16 { 310 regulator-min-microvol 246 regulator-min-microvolt = <2700000>; 311 regulator-max-microvol 247 regulator-max-microvolt = <2700000>; 312 }; 248 }; 313 249 314 pm8994_l17: l17 { 250 pm8994_l17: l17 { 315 regulator-min-microvol 251 regulator-min-microvolt = <2700000>; 316 regulator-max-microvol 252 regulator-max-microvolt = <2700000>; 317 }; 253 }; 318 254 319 pm8994_l18: l18 { 255 pm8994_l18: l18 { 320 regulator-min-microvol 256 regulator-min-microvolt = <2850000>; 321 regulator-max-microvol 257 regulator-max-microvolt = <2850000>; 322 regulator-always-on; 258 regulator-always-on; 323 }; 259 }; 324 260 325 pm8994_l19: l19 { 261 pm8994_l19: l19 { 326 regulator-min-microvol 262 regulator-min-microvolt = <2800000>; 327 regulator-max-microvol 263 regulator-max-microvolt = <2800000>; 328 }; 264 }; 329 265 330 pm8994_l20: l20 { 266 pm8994_l20: l20 { 331 regulator-min-microvol 267 regulator-min-microvolt = <2950000>; 332 regulator-max-microvol 268 regulator-max-microvolt = <2950000>; 333 regulator-always-on; 269 regulator-always-on; 334 regulator-boot-on; 270 regulator-boot-on; 335 regulator-allow-set-lo 271 regulator-allow-set-load; 336 regulator-system-load 272 regulator-system-load = <570000>; 337 }; 273 }; 338 274 339 pm8994_l21: l21 { 275 pm8994_l21: l21 { 340 regulator-min-microvol 276 regulator-min-microvolt = <2950000>; 341 regulator-max-microvol 277 regulator-max-microvolt = <2950000>; 342 regulator-always-on; 278 regulator-always-on; 343 }; 279 }; 344 280 345 pm8994_l22: l22 { 281 pm8994_l22: l22 { 346 regulator-min-microvol 282 regulator-min-microvolt = <3000000>; 347 regulator-max-microvol 283 regulator-max-microvolt = <3000000>; 348 }; 284 }; 349 285 350 pm8994_l23: l23 { 286 pm8994_l23: l23 { 351 regulator-min-microvol 287 regulator-min-microvolt = <2800000>; 352 regulator-max-microvol 288 regulator-max-microvolt = <2800000>; 353 }; 289 }; 354 290 355 pm8994_l24: l24 { 291 pm8994_l24: l24 { 356 regulator-min-microvol 292 regulator-min-microvolt = <3075000>; 357 regulator-max-microvol 293 regulator-max-microvolt = <3150000>; 358 }; 294 }; 359 295 360 pm8994_l25: l25 { 296 pm8994_l25: l25 { 361 regulator-min-microvol 297 regulator-min-microvolt = <1000000>; 362 regulator-max-microvol 298 regulator-max-microvolt = <1000000>; 363 }; 299 }; 364 300 365 pm8994_l26: l26 { 301 pm8994_l26: l26 { 366 regulator-min-microvol 302 regulator-min-microvolt = <987500>; 367 regulator-max-microvol 303 regulator-max-microvolt = <987500>; 368 304 369 }; 305 }; 370 306 371 pm8994_l27: l27 { 307 pm8994_l27: l27 { 372 regulator-min-microvol 308 regulator-min-microvolt = <1050000>; 373 regulator-max-microvol 309 regulator-max-microvolt = <1050000>; 374 }; 310 }; 375 311 376 pm8994_l28: l28 { 312 pm8994_l28: l28 { 377 regulator-min-microvol 313 regulator-min-microvolt = <1000000>; 378 regulator-max-microvol 314 regulator-max-microvolt = <1000000>; 379 }; 315 }; 380 316 381 pm8994_l29: l29 { 317 pm8994_l29: l29 { 382 regulator-min-microvol 318 regulator-min-microvolt = <2800000>; 383 regulator-max-microvol 319 regulator-max-microvolt = <2800000>; 384 }; 320 }; 385 321 386 pm8994_l30: l30 { 322 pm8994_l30: l30 { 387 regulator-min-microvol 323 regulator-min-microvolt = <1800000>; 388 regulator-max-microvol 324 regulator-max-microvolt = <1800000>; 389 }; 325 }; 390 326 391 pm8994_l31: l31 { 327 pm8994_l31: l31 { 392 regulator-min-microvol 328 regulator-min-microvolt = <1262500>; 393 regulator-max-microvol 329 regulator-max-microvolt = <1262500>; 394 }; 330 }; 395 331 396 pm8994_l32: l32 { 332 pm8994_l32: l32 { 397 regulator-min-microvol 333 regulator-min-microvolt = <1800000>; 398 regulator-max-microvol 334 regulator-max-microvolt = <1800000>; 399 }; 335 }; 400 336 401 pm8994_lvs1: lvs1 {}; 337 pm8994_lvs1: lvs1 {}; 402 pm8994_lvs2: lvs2 {}; 338 pm8994_lvs2: lvs2 {}; 403 }; 339 }; 404 340 405 pmi8994_regulators: regulators-1 { !! 341 pmi8994_regulators: pmi8994-regulators { 406 compatible = "qcom,rpm-pmi8994 342 compatible = "qcom,rpm-pmi8994-regulators"; 407 vdd_s1-supply = <&vph_pwr>; 343 vdd_s1-supply = <&vph_pwr>; 408 vdd_bst_byp-supply = <&vph_pwr 344 vdd_bst_byp-supply = <&vph_pwr>; 409 345 410 pmi8994_s1: s1 { 346 pmi8994_s1: s1 { 411 regulator-min-microvol 347 regulator-min-microvolt = <1025000>; 412 regulator-max-microvol 348 regulator-max-microvolt = <1025000>; 413 }; 349 }; 414 350 415 /* S2 & S3 - VDD_GFX */ 351 /* S2 & S3 - VDD_GFX */ 416 352 417 pmi8994_bby: boost-bypass { 353 pmi8994_bby: boost-bypass { 418 regulator-min-microvol 354 regulator-min-microvolt = <3150000>; 419 regulator-max-microvol 355 regulator-max-microvolt = <3600000>; 420 }; 356 }; 421 }; 357 }; 422 }; 358 }; 423 359 424 &sdhc1 { 360 &sdhc1 { 425 status = "okay"; 361 status = "okay"; 426 362 427 mmc-hs400-1_8v; 363 mmc-hs400-1_8v; 428 vmmc-supply = <&pm8994_l20>; 364 vmmc-supply = <&pm8994_l20>; 429 vqmmc-supply = <&pm8994_s4>; 365 vqmmc-supply = <&pm8994_s4>; 430 }; 366 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.