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