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