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