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