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