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