1// SPDX-License-Identifier: GPL-2.0 2#include "qcom-msm8974.dtsi" 3#include "pm8841.dtsi" 4#include "pm8941.dtsi" 5#include <dt-bindings/input/input.h> 6#include <dt-bindings/leds/common.h> 7#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 8 9/ { 10 aliases { 11 mmc0 = &sdhc_1; 12 mmc1 = &sdhc_2; 13 serial0 = &blsp1_uart2; 14 }; 15 16 chosen { 17 stdout-path = "serial0:115200n8"; 18 }; 19 20 gpio-keys { 21 compatible = "gpio-keys"; 22 23 pinctrl-names = "default"; 24 pinctrl-0 = <&gpio_keys_pin_a>; 25 26 key-volume-down { 27 label = "volume_down"; 28 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; 29 linux,input-type = <1>; 30 linux,code = <KEY_VOLUMEDOWN>; 31 }; 32 33 key-volume-up { 34 label = "volume_up"; 35 gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; 36 linux,input-type = <1>; 37 linux,code = <KEY_VOLUMEUP>; 38 }; 39 }; 40 41 reserved-memory { 42 #address-cells = <1>; 43 #size-cells = <1>; 44 ranges; 45 46 ramoops@3e8e0000 { 47 compatible = "ramoops"; 48 reg = <0x3e8e0000 0x200000>; 49 50 console-size = <0x100000>; 51 record-size = <0x10000>; 52 ftrace-size = <0x10000>; 53 pmsg-size = <0x80000>; 54 }; 55 }; 56 57 vreg_boost: vreg-boost { 58 compatible = "regulator-fixed"; 59 60 regulator-name = "vreg-boost"; 61 regulator-min-microvolt = <3150000>; 62 regulator-max-microvolt = <3150000>; 63 64 regulator-always-on; 65 regulator-boot-on; 66 67 gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>; 68 enable-active-high; 69 70 pinctrl-names = "default"; 71 pinctrl-0 = <&boost_bypass_n_pin>; 72 }; 73 74 vreg_vph_pwr: vreg-vph-pwr { 75 compatible = "regulator-fixed"; 76 regulator-name = "vph-pwr"; 77 78 regulator-min-microvolt = <3600000>; 79 regulator-max-microvolt = <3600000>; 80 81 regulator-always-on; 82 }; 83}; 84 85&blsp1_i2c2 { 86 status = "okay"; 87 clock-frequency = <355000>; 88 89 touchscreen: synaptics@2c { 90 compatible = "syna,rmi4-i2c"; 91 reg = <0x2c>; 92 93 interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; 94 95 #address-cells = <1>; 96 #size-cells = <0>; 97 98 vdd-supply = <&pm8941_l22>; 99 vio-supply = <&pm8941_lvs3>; 100 101 pinctrl-names = "default"; 102 pinctrl-0 = <&ts_int_pin>; 103 104 syna,startup-delay-ms = <10>; 105 106 rmi4-f01@1 { 107 reg = <0x1>; 108 syna,nosleep-mode = <1>; 109 }; 110 111 rmi4-f11@11 { 112 reg = <0x11>; 113 touchscreen-inverted-x; 114 syna,sensor-type = <1>; 115 }; 116 }; 117}; 118 119&blsp1_i2c6 { 120 status = "okay"; 121 clock-frequency = <355000>; 122 123 nfc@28 { 124 compatible = "nxp,pn544-i2c"; 125 reg = <0x28>; 126 127 interrupt-parent = <&tlmm>; 128 interrupts = <59 IRQ_TYPE_EDGE_RISING>; 129 130 enable-gpios = <&pm8941_gpios 23 GPIO_ACTIVE_HIGH>; 131 firmware-gpios = <&tlmm 77 GPIO_ACTIVE_HIGH>; 132 }; 133}; 134 135&blsp1_uart2 { 136 status = "okay"; 137}; 138 139&blsp2_dma { 140 qcom,controlled-remotely; 141}; 142 143&blsp2_i2c5 { 144 status = "okay"; 145 clock-frequency = <355000>; 146 147 /* sii8334 MHL HDMI bridge */ 148}; 149 150&pm8941_coincell { 151 status = "okay"; 152 qcom,rset-ohms = <2100>; 153 qcom,vset-millivolts = <3000>; 154}; 155 156&pm8941_gpios { 157 gpio_keys_pin_a: gpio-keys-active-state { 158 pins = "gpio2", "gpio3", "gpio4", "gpio5"; 159 function = "normal"; 160 161 bias-pull-up; 162 power-source = <PM8941_GPIO_S3>; 163 }; 164}; 165 166&pm8941_lpg { 167 status = "okay"; 168 169 qcom,power-source = <1>; 170 171 multi-led { 172 color = <LED_COLOR_ID_RGB>; 173 function = LED_FUNCTION_STATUS; 174 175 #address-cells = <1>; 176 #size-cells = <0>; 177 178 led@5 { 179 reg = <5>; 180 color = <LED_COLOR_ID_BLUE>; 181 }; 182 183 led@6 { 184 reg = <6>; 185 color = <LED_COLOR_ID_GREEN>; 186 }; 187 188 led@7 { 189 reg = <7>; 190 color = <LED_COLOR_ID_RED>; 191 }; 192 }; 193}; 194 195&pm8941_wled { 196 status = "okay"; 197 198 qcom,cs-out; 199 qcom,current-limit = <20>; 200 qcom,current-boost-limit = <805>; 201 qcom,switching-freq = <1600>; 202 qcom,ovp = <29>; 203 qcom,num-strings = <2>; 204}; 205 206&remoteproc_adsp { 207 cx-supply = <&pm8841_s2>; 208 status = "okay"; 209}; 210 211&remoteproc_mss { 212 cx-supply = <&pm8841_s2>; 213 mss-supply = <&pm8841_s3>; 214 mx-supply = <&pm8841_s1>; 215 pll-supply = <&pm8941_l12>; 216 status = "okay"; 217}; 218 219&rpm_requests { 220 regulators-0 { 221 compatible = "qcom,rpm-pm8841-regulators"; 222 223 pm8841_s1: s1 { 224 regulator-min-microvolt = <675000>; 225 regulator-max-microvolt = <1050000>; 226 }; 227 228 pm8841_s2: s2 { 229 regulator-min-microvolt = <500000>; 230 regulator-max-microvolt = <1050000>; 231 }; 232 233 pm8841_s3: s3 { 234 regulator-min-microvolt = <500000>; 235 regulator-max-microvolt = <1050000>; 236 }; 237 238 pm8841_s4: s4 { 239 regulator-min-microvolt = <500000>; 240 regulator-max-microvolt = <1050000>; 241 }; 242 }; 243 244 regulators-1 { 245 compatible = "qcom,rpm-pm8941-regulators"; 246 247 vdd_l1_l3-supply = <&pm8941_s1>; 248 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; 249 vdd_l4_l11-supply = <&pm8941_s1>; 250 vdd_l5_l7-supply = <&pm8941_s2>; 251 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; 252 vdd_l9_l10_l17_l22-supply = <&vreg_boost>; 253 vdd_l13_l20_l23_l24-supply = <&vreg_boost>; 254 vdd_l21-supply = <&vreg_boost>; 255 256 pm8941_s1: s1 { 257 regulator-min-microvolt = <1300000>; 258 regulator-max-microvolt = <1300000>; 259 regulator-always-on; 260 regulator-boot-on; 261 }; 262 263 pm8941_s2: s2 { 264 regulator-min-microvolt = <2150000>; 265 regulator-max-microvolt = <2150000>; 266 regulator-boot-on; 267 }; 268 269 pm8941_s3: s3 { 270 regulator-min-microvolt = <1800000>; 271 regulator-max-microvolt = <1800000>; 272 regulator-always-on; 273 regulator-boot-on; 274 }; 275 276 pm8941_s4: s4 { 277 regulator-min-microvolt = <5000000>; 278 regulator-max-microvolt = <5000000>; 279 }; 280 281 pm8941_l1: l1 { 282 regulator-min-microvolt = <1225000>; 283 regulator-max-microvolt = <1225000>; 284 regulator-always-on; 285 regulator-boot-on; 286 }; 287 288 pm8941_l2: l2 { 289 regulator-min-microvolt = <1200000>; 290 regulator-max-microvolt = <1200000>; 291 }; 292 293 pm8941_l3: l3 { 294 regulator-min-microvolt = <1200000>; 295 regulator-max-microvolt = <1200000>; 296 }; 297 298 pm8941_l4: l4 { 299 regulator-min-microvolt = <1225000>; 300 regulator-max-microvolt = <1225000>; 301 }; 302 303 pm8941_l5: l5 { 304 regulator-min-microvolt = <1800000>; 305 regulator-max-microvolt = <1800000>; 306 }; 307 308 pm8941_l6: l6 { 309 regulator-min-microvolt = <1800000>; 310 regulator-max-microvolt = <1800000>; 311 regulator-boot-on; 312 }; 313 314 pm8941_l7: l7 { 315 regulator-min-microvolt = <1800000>; 316 regulator-max-microvolt = <1800000>; 317 regulator-boot-on; 318 }; 319 320 pm8941_l8: l8 { 321 regulator-min-microvolt = <1800000>; 322 regulator-max-microvolt = <1800000>; 323 }; 324 325 pm8941_l9: l9 { 326 regulator-min-microvolt = <1800000>; 327 regulator-max-microvolt = <2950000>; 328 }; 329 330 pm8941_l11: l11 { 331 regulator-min-microvolt = <1300000>; 332 regulator-max-microvolt = <1350000>; 333 }; 334 335 pm8941_l12: l12 { 336 regulator-min-microvolt = <1800000>; 337 regulator-max-microvolt = <1800000>; 338 regulator-always-on; 339 regulator-boot-on; 340 }; 341 342 pm8941_l13: l13 { 343 regulator-min-microvolt = <1800000>; 344 regulator-max-microvolt = <2950000>; 345 regulator-boot-on; 346 }; 347 348 pm8941_l14: l14 { 349 regulator-min-microvolt = <1800000>; 350 regulator-max-microvolt = <1800000>; 351 }; 352 353 pm8941_l15: l15 { 354 regulator-min-microvolt = <2050000>; 355 regulator-max-microvolt = <2050000>; 356 }; 357 358 pm8941_l16: l16 { 359 regulator-min-microvolt = <2700000>; 360 regulator-max-microvolt = <2700000>; 361 }; 362 363 pm8941_l17: l17 { 364 regulator-min-microvolt = <2700000>; 365 regulator-max-microvolt = <2700000>; 366 }; 367 368 pm8941_l18: l18 { 369 regulator-min-microvolt = <2850000>; 370 regulator-max-microvolt = <2850000>; 371 }; 372 373 pm8941_l19: l19 { 374 regulator-min-microvolt = <3300000>; 375 regulator-max-microvolt = <3300000>; 376 }; 377 378 pm8941_l20: l20 { 379 regulator-min-microvolt = <2950000>; 380 regulator-max-microvolt = <2950000>; 381 regulator-system-load = <200000>; 382 regulator-allow-set-load; 383 regulator-boot-on; 384 }; 385 386 pm8941_l21: l21 { 387 regulator-min-microvolt = <2950000>; 388 regulator-max-microvolt = <2950000>; 389 regulator-boot-on; 390 }; 391 392 pm8941_l22: l22 { 393 regulator-min-microvolt = <3000000>; 394 regulator-max-microvolt = <3000000>; 395 }; 396 397 pm8941_l23: l23 { 398 regulator-min-microvolt = <2800000>; 399 regulator-max-microvolt = <2800000>; 400 }; 401 402 pm8941_l24: l24 { 403 regulator-min-microvolt = <3075000>; 404 regulator-max-microvolt = <3075000>; 405 regulator-boot-on; 406 }; 407 408 pm8941_lvs3: lvs3 {}; 409 }; 410}; 411 412&sdhc_1 { 413 status = "okay"; 414 415 vmmc-supply = <&pm8941_l20>; 416 vqmmc-supply = <&pm8941_s3>; 417 418 pinctrl-names = "default", "sleep"; 419 pinctrl-0 = <&sdc1_on>; 420 pinctrl-1 = <&sdc1_off>; 421}; 422 423&sdhc_2 { 424 status = "okay"; 425 426 vmmc-supply = <&pm8941_l21>; 427 vqmmc-supply = <&pm8941_l13>; 428 429 cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; 430 431 pinctrl-names = "default", "sleep"; 432 pinctrl-0 = <&sdc2_on>; 433 pinctrl-1 = <&sdc2_off>; 434}; 435 436&smbb { 437 usb-charge-current-limit = <1800000>; 438 439 qcom,fast-charge-safe-current = <1500000>; 440 qcom,fast-charge-current-limit = <1500000>; 441 qcom,dc-current-limit = <1800000>; 442 qcom,fast-charge-safe-voltage = <4400000>; 443 qcom,fast-charge-high-threshold-voltage = <4350000>; 444 qcom,fast-charge-low-threshold-voltage = <3400000>; 445 qcom,auto-recharge-threshold-voltage = <4200000>; 446 qcom,minimum-input-voltage = <4300000>; 447 448 status = "okay"; 449}; 450 451&tlmm { 452 ts_int_pin: touch-int-state { 453 pins = "gpio61"; 454 function = "gpio"; 455 drive-strength = <2>; 456 bias-disable; 457 }; 458 459 sdc1_on: sdc1-on-state { 460 clk-pins { 461 pins = "sdc1_clk"; 462 drive-strength = <16>; 463 bias-disable; 464 }; 465 466 cmd-data-pins { 467 pins = "sdc1_cmd", "sdc1_data"; 468 drive-strength = <10>; 469 bias-pull-up; 470 }; 471 }; 472 473 sdc2_on: sdc-on-state { 474 clk-pins { 475 pins = "sdc2_clk"; 476 drive-strength = <10>; 477 bias-disable; 478 }; 479 480 cmd-data-pins { 481 pins = "sdc2_cmd", "sdc2_data"; 482 drive-strength = <6>; 483 bias-pull-up; 484 }; 485 486 cd-pins { 487 pins = "gpio62"; 488 function = "gpio"; 489 drive-strength = <2>; 490 bias-disable; 491 }; 492 }; 493}; 494 495&usb { 496 status = "okay"; 497 498 phys = <&usb_hs1_phy>; 499 phy-select = <&tcsr 0xb000 0>; 500 extcon = <&smbb>, <&usb_id>; 501 vbus-supply = <&chg_otg>; 502 503 hnp-disable; 504 srp-disable; 505 adp-disable; 506}; 507 508&usb_hs1_phy { 509 status = "okay"; 510 511 v1p8-supply = <&pm8941_l6>; 512 v3p3-supply = <&pm8941_l24>; 513 514 extcon = <&smbb>; 515 qcom,init-seq = /bits/ 8 <0x1 0x64>; 516}; 517