1// SPDX-License-Identifier: GPL-2.0 2#include "qcom-msm8974pro.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 model = "Sony Xperia Z2 Tablet"; 11 compatible = "sony,xperia-castor", "qcom,msm8974pro", "qcom,msm8974"; 12 chassis-type = "tablet"; 13 14 aliases { 15 mmc0 = &sdhc_1; 16 mmc1 = &sdhc_2; 17 serial0 = &blsp1_uart2; 18 serial1 = &blsp2_uart1; 19 }; 20 21 chosen { 22 stdout-path = "serial0:115200n8"; 23 }; 24 25 gpio-keys { 26 compatible = "gpio-keys"; 27 28 pinctrl-0 = <&gpio_keys_pin_a>; 29 pinctrl-names = "default"; 30 31 key-volume-down { 32 label = "volume_down"; 33 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; 34 linux,code = <KEY_VOLUMEDOWN>; 35 debounce-interval = <15>; 36 }; 37 38 key-volume-up { 39 label = "volume_up"; 40 gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; 41 linux,code = <KEY_VOLUMEUP>; 42 debounce-interval = <15>; 43 }; 44 }; 45 46 vreg_bl_vddio: lcd-backlight-vddio { 47 compatible = "regulator-fixed"; 48 regulator-name = "vreg_bl_vddio"; 49 regulator-min-microvolt = <3150000>; 50 regulator-max-microvolt = <3150000>; 51 52 gpio = <&tlmm 69 0>; 53 enable-active-high; 54 55 vin-supply = <&pm8941_s3>; 56 startup-delay-us = <70000>; 57 58 pinctrl-0 = <&lcd_backlight_en_pin_a>; 59 pinctrl-names = "default"; 60 }; 61 62 vreg_vsp: lcd-dcdc-regulator { 63 compatible = "regulator-fixed"; 64 regulator-name = "vreg_vsp"; 65 regulator-min-microvolt = <5600000>; 66 regulator-max-microvolt = <5600000>; 67 68 gpio = <&pm8941_gpios 20 GPIO_ACTIVE_HIGH>; 69 enable-active-high; 70 71 pinctrl-0 = <&lcd_dcdc_en_pin_a>; 72 pinctrl-names = "default"; 73 }; 74 75 vreg_boost: vreg-boost { 76 compatible = "regulator-fixed"; 77 78 regulator-name = "vreg-boost"; 79 regulator-min-microvolt = <3150000>; 80 regulator-max-microvolt = <3150000>; 81 82 regulator-always-on; 83 regulator-boot-on; 84 85 gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>; 86 enable-active-high; 87 88 pinctrl-names = "default"; 89 pinctrl-0 = <&boost_bypass_n_pin>; 90 }; 91 92 vreg_vph_pwr: vreg-vph-pwr { 93 compatible = "regulator-fixed"; 94 regulator-name = "vph-pwr"; 95 96 regulator-min-microvolt = <3600000>; 97 regulator-max-microvolt = <3600000>; 98 99 regulator-always-on; 100 }; 101 102 vreg_wlan: wlan-regulator { 103 compatible = "regulator-fixed"; 104 105 regulator-name = "wl-reg"; 106 regulator-min-microvolt = <3300000>; 107 regulator-max-microvolt = <3300000>; 108 109 gpio = <&pm8941_gpios 18 GPIO_ACTIVE_HIGH>; 110 enable-active-high; 111 112 pinctrl-0 = <&wlan_regulator_pin>; 113 pinctrl-names = "default"; 114 }; 115}; 116 117&blsp1_uart2 { 118 status = "okay"; 119}; 120 121&blsp2_i2c2 { 122 clock-frequency = <355000>; 123 124 status = "okay"; 125 126 synaptics@2c { 127 compatible = "syna,rmi4-i2c"; 128 reg = <0x2c>; 129 130 interrupt-parent = <&tlmm>; 131 interrupts = <86 IRQ_TYPE_EDGE_FALLING>; 132 133 #address-cells = <1>; 134 #size-cells = <0>; 135 136 vdd-supply = <&pm8941_l22>; 137 vio-supply = <&pm8941_lvs3>; 138 139 pinctrl-0 = <&ts_int_pin>; 140 pinctrl-names = "default"; 141 142 syna,startup-delay-ms = <100>; 143 144 rmi4-f01@1 { 145 reg = <0x1>; 146 syna,nosleep-mode = <1>; 147 }; 148 149 rmi4-f11@11 { 150 reg = <0x11>; 151 syna,sensor-type = <1>; 152 touchscreen-inverted-x; 153 }; 154 }; 155}; 156 157&blsp2_i2c5 { 158 clock-frequency = <355000>; 159 160 status = "okay"; 161 162 lp8566_wled: backlight@2c { 163 compatible = "ti,lp8556"; 164 reg = <0x2c>; 165 power-supply = <&vreg_bl_vddio>; 166 167 bl-name = "backlight"; 168 dev-ctrl = /bits/ 8 <0x05>; 169 init-brt = /bits/ 8 <0x3f>; 170 171 rom-a0h { 172 rom-addr = /bits/ 8 <0xa0>; 173 rom-val = /bits/ 8 <0xff>; 174 }; 175 rom-a1h { 176 rom-addr = /bits/ 8 <0xa1>; 177 rom-val = /bits/ 8 <0x3f>; 178 }; 179 rom-a2h { 180 rom-addr = /bits/ 8 <0xa2>; 181 rom-val = /bits/ 8 <0x20>; 182 }; 183 rom-a3h { 184 rom-addr = /bits/ 8 <0xa3>; 185 rom-val = /bits/ 8 <0x5e>; 186 }; 187 rom-a4h { 188 rom-addr = /bits/ 8 <0xa4>; 189 rom-val = /bits/ 8 <0x02>; 190 }; 191 rom-a5h { 192 rom-addr = /bits/ 8 <0xa5>; 193 rom-val = /bits/ 8 <0x04>; 194 }; 195 rom-a6h { 196 rom-addr = /bits/ 8 <0xa6>; 197 rom-val = /bits/ 8 <0x80>; 198 }; 199 rom-a7h { 200 rom-addr = /bits/ 8 <0xa7>; 201 rom-val = /bits/ 8 <0xf7>; 202 }; 203 rom-a9h { 204 rom-addr = /bits/ 8 <0xa9>; 205 rom-val = /bits/ 8 <0x80>; 206 }; 207 rom-aah { 208 rom-addr = /bits/ 8 <0xaa>; 209 rom-val = /bits/ 8 <0x0f>; 210 }; 211 rom-aeh { 212 rom-addr = /bits/ 8 <0xae>; 213 rom-val = /bits/ 8 <0x0f>; 214 }; 215 }; 216}; 217 218&blsp2_uart1 { 219 status = "okay"; 220 221 bluetooth { 222 compatible = "brcm,bcm43438-bt"; 223 max-speed = <3000000>; 224 225 pinctrl-0 = <&bt_host_wake_pin>, <&bt_dev_wake_pin>, <&bt_reg_on_pin>; 226 pinctrl-names = "default"; 227 228 host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>; 229 device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; 230 shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>; 231 }; 232}; 233 234&pm8941_coincell { 235 qcom,rset-ohms = <2100>; 236 qcom,vset-millivolts = <3000>; 237 238 status = "okay"; 239}; 240 241&pm8941_gpios { 242 gpio_keys_pin_a: gpio-keys-active-state { 243 pins = "gpio2", "gpio5"; 244 function = "normal"; 245 bias-pull-up; 246 power-source = <PM8941_GPIO_S3>; 247 }; 248 249 bt_reg_on_pin: bt-reg-on-state { 250 pins = "gpio16"; 251 function = "normal"; 252 output-low; 253 power-source = <PM8941_GPIO_S3>; 254 }; 255 256 wlan_sleep_clk_pin: wl-sleep-clk-state { 257 pins = "gpio17"; 258 function = "func2"; 259 output-high; 260 power-source = <PM8941_GPIO_S3>; 261 }; 262 263 wlan_regulator_pin: wl-reg-active-state { 264 pins = "gpio18"; 265 function = "normal"; 266 bias-disable; 267 power-source = <PM8941_GPIO_S3>; 268 }; 269 270 lcd_dcdc_en_pin_a: lcd-dcdc-en-active-state { 271 pins = "gpio20"; 272 function = "normal"; 273 bias-disable; 274 power-source = <PM8941_GPIO_S3>; 275 input-disable; 276 output-low; 277 }; 278}; 279 280&pm8941_lpg { 281 qcom,power-source = <1>; 282 283 status = "okay"; 284 285 multi-led { 286 color = <LED_COLOR_ID_RGB>; 287 function = LED_FUNCTION_STATUS; 288 289 #address-cells = <1>; 290 #size-cells = <0>; 291 292 led@5 { 293 reg = <5>; 294 color = <LED_COLOR_ID_BLUE>; 295 }; 296 297 led@6 { 298 reg = <6>; 299 color = <LED_COLOR_ID_GREEN>; 300 }; 301 302 led@7 { 303 reg = <7>; 304 color = <LED_COLOR_ID_RED>; 305 }; 306 }; 307}; 308 309&remoteproc_adsp { 310 cx-supply = <&pm8841_s2>; 311 status = "okay"; 312}; 313 314&remoteproc_mss { 315 cx-supply = <&pm8841_s2>; 316 mss-supply = <&pm8841_s3>; 317 mx-supply = <&pm8841_s1>; 318 pll-supply = <&pm8941_l12>; 319 status = "okay"; 320}; 321 322&rpm_requests { 323 regulators-0 { 324 compatible = "qcom,rpm-pm8841-regulators"; 325 326 pm8841_s1: s1 { 327 regulator-min-microvolt = <675000>; 328 regulator-max-microvolt = <1050000>; 329 }; 330 331 pm8841_s2: s2 { 332 regulator-min-microvolt = <500000>; 333 regulator-max-microvolt = <1050000>; 334 }; 335 336 pm8841_s3: s3 { 337 regulator-min-microvolt = <500000>; 338 regulator-max-microvolt = <1050000>; 339 }; 340 341 pm8841_s4: s4 { 342 regulator-min-microvolt = <500000>; 343 regulator-max-microvolt = <1050000>; 344 }; 345 }; 346 347 regulators-1 { 348 compatible = "qcom,rpm-pm8941-regulators"; 349 350 vdd_l1_l3-supply = <&pm8941_s1>; 351 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; 352 vdd_l4_l11-supply = <&pm8941_s1>; 353 vdd_l5_l7-supply = <&pm8941_s2>; 354 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; 355 vdd_l9_l10_l17_l22-supply = <&vreg_boost>; 356 vdd_l13_l20_l23_l24-supply = <&vreg_boost>; 357 vdd_l21-supply = <&vreg_boost>; 358 359 pm8941_s1: s1 { 360 regulator-min-microvolt = <1300000>; 361 regulator-max-microvolt = <1300000>; 362 regulator-always-on; 363 regulator-boot-on; 364 }; 365 366 pm8941_s2: s2 { 367 regulator-min-microvolt = <2150000>; 368 regulator-max-microvolt = <2150000>; 369 regulator-boot-on; 370 }; 371 372 pm8941_s3: s3 { 373 regulator-min-microvolt = <1800000>; 374 regulator-max-microvolt = <1800000>; 375 regulator-system-load = <154000>; 376 regulator-always-on; 377 regulator-boot-on; 378 }; 379 380 pm8941_s4: s4 { 381 regulator-min-microvolt = <5000000>; 382 regulator-max-microvolt = <5000000>; 383 }; 384 385 pm8941_l1: l1 { 386 regulator-min-microvolt = <1225000>; 387 regulator-max-microvolt = <1225000>; 388 regulator-always-on; 389 regulator-boot-on; 390 }; 391 392 pm8941_l2: l2 { 393 regulator-min-microvolt = <1200000>; 394 regulator-max-microvolt = <1200000>; 395 }; 396 397 pm8941_l3: l3 { 398 regulator-min-microvolt = <1200000>; 399 regulator-max-microvolt = <1200000>; 400 }; 401 402 pm8941_l4: l4 { 403 regulator-min-microvolt = <1225000>; 404 regulator-max-microvolt = <1225000>; 405 }; 406 407 pm8941_l5: l5 { 408 regulator-min-microvolt = <1800000>; 409 regulator-max-microvolt = <1800000>; 410 }; 411 412 pm8941_l6: l6 { 413 regulator-min-microvolt = <1800000>; 414 regulator-max-microvolt = <1800000>; 415 regulator-boot-on; 416 }; 417 418 pm8941_l7: l7 { 419 regulator-min-microvolt = <1800000>; 420 regulator-max-microvolt = <1800000>; 421 regulator-boot-on; 422 }; 423 424 pm8941_l8: l8 { 425 regulator-min-microvolt = <1800000>; 426 regulator-max-microvolt = <1800000>; 427 }; 428 429 pm8941_l9: l9 { 430 regulator-min-microvolt = <1800000>; 431 regulator-max-microvolt = <2950000>; 432 }; 433 434 pm8941_l11: l11 { 435 regulator-min-microvolt = <1300000>; 436 regulator-max-microvolt = <1350000>; 437 }; 438 439 pm8941_l12: l12 { 440 regulator-min-microvolt = <1800000>; 441 regulator-max-microvolt = <1800000>; 442 regulator-always-on; 443 regulator-boot-on; 444 }; 445 446 pm8941_l13: l13 { 447 regulator-min-microvolt = <1800000>; 448 regulator-max-microvolt = <2950000>; 449 regulator-boot-on; 450 }; 451 452 pm8941_l14: l14 { 453 regulator-min-microvolt = <1800000>; 454 regulator-max-microvolt = <1800000>; 455 }; 456 457 pm8941_l15: l15 { 458 regulator-min-microvolt = <2050000>; 459 regulator-max-microvolt = <2050000>; 460 }; 461 462 pm8941_l16: l16 { 463 regulator-min-microvolt = <2700000>; 464 regulator-max-microvolt = <2700000>; 465 }; 466 467 pm8941_l17: l17 { 468 regulator-min-microvolt = <2700000>; 469 regulator-max-microvolt = <2700000>; 470 }; 471 472 pm8941_l18: l18 { 473 regulator-min-microvolt = <2850000>; 474 regulator-max-microvolt = <2850000>; 475 }; 476 477 pm8941_l19: l19 { 478 regulator-min-microvolt = <2850000>; 479 regulator-max-microvolt = <2850000>; 480 }; 481 482 pm8941_l20: l20 { 483 regulator-min-microvolt = <2950000>; 484 regulator-max-microvolt = <2950000>; 485 regulator-system-load = <500000>; 486 regulator-allow-set-load; 487 regulator-boot-on; 488 }; 489 490 pm8941_l21: l21 { 491 regulator-min-microvolt = <2950000>; 492 regulator-max-microvolt = <2950000>; 493 regulator-boot-on; 494 }; 495 496 pm8941_l22: l22 { 497 regulator-min-microvolt = <3000000>; 498 regulator-max-microvolt = <3000000>; 499 }; 500 501 pm8941_l23: l23 { 502 regulator-min-microvolt = <2800000>; 503 regulator-max-microvolt = <2800000>; 504 }; 505 506 pm8941_l24: l24 { 507 regulator-min-microvolt = <3075000>; 508 regulator-max-microvolt = <3075000>; 509 regulator-boot-on; 510 }; 511 512 pm8941_lvs3: lvs3 {}; 513 }; 514}; 515 516&sdhc_1 { 517 vmmc-supply = <&pm8941_l20>; 518 vqmmc-supply = <&pm8941_s3>; 519 520 pinctrl-0 = <&sdc1_on>; 521 pinctrl-1 = <&sdc1_off>; 522 pinctrl-names = "default", "sleep"; 523 524 status = "okay"; 525}; 526 527&sdhc_2 { 528 vmmc-supply = <&pm8941_l21>; 529 vqmmc-supply = <&pm8941_l13>; 530 531 cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; 532 533 pinctrl-0 = <&sdc2_on>; 534 pinctrl-1 = <&sdc2_off>; 535 pinctrl-names = "default", "sleep"; 536 537 status = "okay"; 538}; 539 540&sdhc_3 { 541 max-frequency = <100000000>; 542 vmmc-supply = <&vreg_wlan>; 543 non-removable; 544 545 pinctrl-0 = <&sdc3_on>; 546 pinctrl-names = "default"; 547 548 status = "okay"; 549 550 wifi@1 { 551 compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; 552 reg = <1>; 553 554 brcm,drive-strength = <10>; 555 556 pinctrl-0 = <&wlan_sleep_clk_pin>; 557 pinctrl-names = "default"; 558 }; 559}; 560 561&smbb { 562 qcom,fast-charge-safe-current = <1500000>; 563 qcom,fast-charge-current-limit = <1500000>; 564 qcom,dc-current-limit = <1800000>; 565 usb-charge-current-limit = <1800000>; 566 qcom,fast-charge-safe-voltage = <4400000>; 567 qcom,fast-charge-high-threshold-voltage = <4350000>; 568 qcom,fast-charge-low-threshold-voltage = <3400000>; 569 qcom,auto-recharge-threshold-voltage = <4200000>; 570 qcom,minimum-input-voltage = <4300000>; 571 572 status = "okay"; 573}; 574 575&tlmm { 576 lcd_backlight_en_pin_a: lcd-backlight-vddio-state { 577 pins = "gpio69"; 578 function = "gpio"; 579 drive-strength = <10>; 580 output-low; 581 bias-disable; 582 }; 583 584 sdc1_on: sdc1-on-state { 585 clk-pins { 586 pins = "sdc1_clk"; 587 drive-strength = <16>; 588 bias-disable; 589 }; 590 591 cmd-data-pins { 592 pins = "sdc1_cmd", "sdc1_data"; 593 drive-strength = <10>; 594 bias-pull-up; 595 }; 596 }; 597 598 sdc2_on: sdc2-on-state { 599 clk-pins { 600 pins = "sdc2_clk"; 601 drive-strength = <6>; 602 bias-disable; 603 }; 604 605 cmd-data-pins { 606 pins = "sdc2_cmd", "sdc2_data"; 607 drive-strength = <6>; 608 bias-pull-up; 609 }; 610 611 cd-pins { 612 pins = "gpio62"; 613 function = "gpio"; 614 drive-strength = <2>; 615 bias-disable; 616 }; 617 }; 618 619 sdc3_on: sdc3-on-state { 620 clk-pins { 621 pins = "gpio40"; 622 function = "sdc3"; 623 drive-strength = <10>; 624 bias-disable; 625 }; 626 627 cmd-pins { 628 pins = "gpio39"; 629 function = "sdc3"; 630 drive-strength = <10>; 631 bias-pull-up; 632 }; 633 634 data-pins { 635 pins = "gpio35", "gpio36", "gpio37", "gpio38"; 636 function = "sdc3"; 637 drive-strength = <10>; 638 bias-pull-up; 639 }; 640 }; 641 642 ts_int_pin: ts-int-pin-state { 643 pins = "gpio86"; 644 function = "gpio"; 645 drive-strength = <2>; 646 bias-disable; 647 }; 648 649 bt_host_wake_pin: bt-host-wake-state { 650 pins = "gpio95"; 651 function = "gpio"; 652 drive-strength = <2>; 653 bias-disable; 654 output-low; 655 }; 656 657 bt_dev_wake_pin: bt-dev-wake-state { 658 pins = "gpio96"; 659 function = "gpio"; 660 drive-strength = <2>; 661 bias-disable; 662 }; 663}; 664 665&usb { 666 phys = <&usb_hs1_phy>; 667 phy-select = <&tcsr 0xb000 0>; 668 extcon = <&smbb>, <&usb_id>; 669 vbus-supply = <&chg_otg>; 670 671 hnp-disable; 672 srp-disable; 673 adp-disable; 674 675 status = "okay"; 676}; 677 678&usb_hs1_phy { 679 v1p8-supply = <&pm8941_l6>; 680 v3p3-supply = <&pm8941_l24>; 681 682 extcon = <&smbb>; 683 qcom,init-seq = /bits/ 8 <0x1 0x64>; 684 685 status = "okay"; 686}; 687