0001 // SPDX-License-Identifier: GPL-2.0
0002 #include "qcom-msm8974pro.dtsi"
0003 #include "qcom-pm8841.dtsi"
0004 #include "qcom-pm8941.dtsi"
0005 #include <dt-bindings/input/input.h>
0006 #include <dt-bindings/leds/common.h>
0007 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0008
0009 / {
0010 model = "Sony Xperia Z2 Tablet";
0011 compatible = "sony,xperia-castor", "qcom,msm8974";
0012
0013 aliases {
0014 serial0 = &blsp1_uart2;
0015 serial1 = &blsp2_uart1;
0016 };
0017
0018 chosen {
0019 stdout-path = "serial0:115200n8";
0020 };
0021
0022 gpio-keys {
0023 compatible = "gpio-keys";
0024
0025 pinctrl-names = "default";
0026 pinctrl-0 = <&gpio_keys_pin_a>;
0027
0028 key-volume-down {
0029 label = "volume_down";
0030 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
0031 linux,input-type = <1>;
0032 linux,code = <KEY_VOLUMEDOWN>;
0033 };
0034
0035 key-camera-snapshot {
0036 label = "camera_snapshot";
0037 gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
0038 linux,input-type = <1>;
0039 linux,code = <KEY_CAMERA>;
0040 };
0041
0042 key-camera-focus {
0043 label = "camera_focus";
0044 gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
0045 linux,input-type = <1>;
0046 linux,code = <KEY_CAMERA_FOCUS>;
0047 };
0048
0049 key-volume-up {
0050 label = "volume_up";
0051 gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
0052 linux,input-type = <1>;
0053 linux,code = <KEY_VOLUMEUP>;
0054 };
0055 };
0056
0057 vreg_bl_vddio: lcd-backlight-vddio {
0058 compatible = "regulator-fixed";
0059 regulator-name = "vreg_bl_vddio";
0060 regulator-min-microvolt = <3150000>;
0061 regulator-max-microvolt = <3150000>;
0062
0063 gpio = <&tlmm 69 0>;
0064 enable-active-high;
0065
0066 vin-supply = <&pm8941_s3>;
0067 startup-delay-us = <70000>;
0068
0069 pinctrl-names = "default";
0070 pinctrl-0 = <&lcd_backlight_en_pin_a>;
0071 };
0072
0073 vreg_vsp: lcd-dcdc-regulator {
0074 compatible = "regulator-fixed";
0075 regulator-name = "vreg_vsp";
0076 regulator-min-microvolt = <5600000>;
0077 regulator-max-microvolt = <5600000>;
0078
0079 gpio = <&pm8941_gpios 20 GPIO_ACTIVE_HIGH>;
0080 enable-active-high;
0081
0082 pinctrl-names = "default";
0083 pinctrl-0 = <&lcd_dcdc_en_pin_a>;
0084 };
0085
0086 vreg_wlan: wlan-regulator {
0087 compatible = "regulator-fixed";
0088
0089 regulator-name = "wl-reg";
0090 regulator-min-microvolt = <3300000>;
0091 regulator-max-microvolt = <3300000>;
0092
0093 gpio = <&pm8941_gpios 18 GPIO_ACTIVE_HIGH>;
0094 enable-active-high;
0095
0096 pinctrl-names = "default";
0097 pinctrl-0 = <&wlan_regulator_pin>;
0098 };
0099 };
0100
0101 &blsp1_uart2 {
0102 status = "okay";
0103 };
0104
0105 &blsp2_i2c2 {
0106 status = "okay";
0107 clock-frequency = <355000>;
0108
0109 synaptics@2c {
0110 compatible = "syna,rmi4-i2c";
0111 reg = <0x2c>;
0112
0113 interrupt-parent = <&tlmm>;
0114 interrupts = <86 IRQ_TYPE_EDGE_FALLING>;
0115
0116 #address-cells = <1>;
0117 #size-cells = <0>;
0118
0119 vdd-supply = <&pm8941_l22>;
0120 vio-supply = <&pm8941_lvs3>;
0121
0122 pinctrl-names = "default";
0123 pinctrl-0 = <&ts_int_pin>;
0124
0125 syna,startup-delay-ms = <10>;
0126
0127 rmi-f01@1 {
0128 reg = <0x1>;
0129 syna,nosleep = <1>;
0130 };
0131
0132 rmi-f11@11 {
0133 reg = <0x11>;
0134 syna,f11-flip-x = <1>;
0135 syna,sensor-type = <1>;
0136 };
0137 };
0138 };
0139
0140 &blsp2_i2c5 {
0141 status = "okay";
0142 clock-frequency = <355000>;
0143
0144 lp8566_wled: backlight@2c {
0145 compatible = "ti,lp8556";
0146 reg = <0x2c>;
0147 power-supply = <&vreg_bl_vddio>;
0148
0149 bl-name = "backlight";
0150 dev-ctrl = /bits/ 8 <0x05>;
0151 init-brt = /bits/ 8 <0x3f>;
0152 rom_a0h {
0153 rom-addr = /bits/ 8 <0xa0>;
0154 rom-val = /bits/ 8 <0xff>;
0155 };
0156 rom_a1h {
0157 rom-addr = /bits/ 8 <0xa1>;
0158 rom-val = /bits/ 8 <0x3f>;
0159 };
0160 rom_a2h {
0161 rom-addr = /bits/ 8 <0xa2>;
0162 rom-val = /bits/ 8 <0x20>;
0163 };
0164 rom_a3h {
0165 rom-addr = /bits/ 8 <0xa3>;
0166 rom-val = /bits/ 8 <0x5e>;
0167 };
0168 rom_a4h {
0169 rom-addr = /bits/ 8 <0xa4>;
0170 rom-val = /bits/ 8 <0x02>;
0171 };
0172 rom_a5h {
0173 rom-addr = /bits/ 8 <0xa5>;
0174 rom-val = /bits/ 8 <0x04>;
0175 };
0176 rom_a6h {
0177 rom-addr = /bits/ 8 <0xa6>;
0178 rom-val = /bits/ 8 <0x80>;
0179 };
0180 rom_a7h {
0181 rom-addr = /bits/ 8 <0xa7>;
0182 rom-val = /bits/ 8 <0xf7>;
0183 };
0184 rom_a9h {
0185 rom-addr = /bits/ 8 <0xa9>;
0186 rom-val = /bits/ 8 <0x80>;
0187 };
0188 rom_aah {
0189 rom-addr = /bits/ 8 <0xaa>;
0190 rom-val = /bits/ 8 <0x0f>;
0191 };
0192 rom_aeh {
0193 rom-addr = /bits/ 8 <0xae>;
0194 rom-val = /bits/ 8 <0x0f>;
0195 };
0196 };
0197 };
0198
0199 &blsp2_uart1 {
0200 status = "okay";
0201
0202 bluetooth {
0203 compatible = "brcm,bcm43438-bt";
0204 max-speed = <3000000>;
0205
0206 pinctrl-names = "default";
0207 pinctrl-0 = <&bt_host_wake_pin>, <&bt_dev_wake_pin>, <&bt_reg_on_pin>;
0208
0209 host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
0210 device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
0211 shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>;
0212 };
0213 };
0214
0215 &otg {
0216 status = "okay";
0217
0218 phys = <&usb_hs1_phy>;
0219 phy-select = <&tcsr 0xb000 0>;
0220 extcon = <&smbb>, <&usb_id>;
0221 vbus-supply = <&chg_otg>;
0222
0223 hnp-disable;
0224 srp-disable;
0225 adp-disable;
0226
0227 ulpi {
0228 phy@a {
0229 status = "okay";
0230
0231 v1p8-supply = <&pm8941_l6>;
0232 v3p3-supply = <&pm8941_l24>;
0233
0234 extcon = <&smbb>;
0235 qcom,init-seq = /bits/ 8 <0x1 0x64>;
0236 };
0237 };
0238 };
0239
0240 &pm8941_coincell {
0241 status = "okay";
0242
0243 qcom,rset-ohms = <2100>;
0244 qcom,vset-millivolts = <3000>;
0245 };
0246
0247 &pm8941_gpios {
0248 gpio_keys_pin_a: gpio-keys-active-state {
0249 pins = "gpio2", "gpio5";
0250 function = "normal";
0251
0252 bias-pull-up;
0253 power-source = <PM8941_GPIO_S3>;
0254 };
0255
0256 bt_reg_on_pin: bt-reg-on-state {
0257 pins = "gpio16";
0258 function = "normal";
0259
0260 output-low;
0261 power-source = <PM8941_GPIO_S3>;
0262 };
0263
0264 wlan_sleep_clk_pin: wl-sleep-clk-state {
0265 pins = "gpio17";
0266 function = "func2";
0267
0268 output-high;
0269 power-source = <PM8941_GPIO_S3>;
0270 };
0271
0272 wlan_regulator_pin: wl-reg-active-state {
0273 pins = "gpio18";
0274 function = "normal";
0275
0276 bias-disable;
0277 power-source = <PM8941_GPIO_S3>;
0278 };
0279
0280 lcd_dcdc_en_pin_a: lcd-dcdc-en-active-state {
0281 pins = "gpio20";
0282 function = "normal";
0283
0284 bias-disable;
0285 power-source = <PM8941_GPIO_S3>;
0286 input-disable;
0287 output-low;
0288 };
0289
0290 };
0291
0292 &pm8941_lpg {
0293 status = "okay";
0294
0295 qcom,power-source = <1>;
0296
0297 rgb-led {
0298 color = <LED_COLOR_ID_RGB>;
0299 function = LED_FUNCTION_STATUS;
0300
0301 #address-cells = <1>;
0302 #size-cells = <0>;
0303
0304 led@5 {
0305 reg = <5>;
0306 color = <LED_COLOR_ID_BLUE>;
0307 };
0308
0309 led@6 {
0310 reg = <6>;
0311 color = <LED_COLOR_ID_GREEN>;
0312 };
0313
0314 led@7 {
0315 reg = <7>;
0316 color = <LED_COLOR_ID_RED>;
0317 };
0318 };
0319 };
0320
0321 &rpm_requests {
0322 pm8941-regulators {
0323 compatible = "qcom,rpm-pm8941-regulators";
0324
0325 vdd_l1_l3-supply = <&pm8941_s1>;
0326 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
0327 vdd_l4_l11-supply = <&pm8941_s1>;
0328 vdd_l5_l7-supply = <&pm8941_s2>;
0329 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
0330 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
0331 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
0332 vdd_l21-supply = <&vreg_boost>;
0333
0334 pm8941_s1: s1 {
0335 regulator-min-microvolt = <1300000>;
0336 regulator-max-microvolt = <1300000>;
0337 regulator-always-on;
0338 regulator-boot-on;
0339 };
0340
0341 pm8941_s2: s2 {
0342 regulator-min-microvolt = <2150000>;
0343 regulator-max-microvolt = <2150000>;
0344 regulator-boot-on;
0345 };
0346
0347 pm8941_s3: s3 {
0348 regulator-min-microvolt = <1800000>;
0349 regulator-max-microvolt = <1800000>;
0350 regulator-system-load = <154000>;
0351 regulator-always-on;
0352 regulator-boot-on;
0353 };
0354
0355 pm8941_s4: s4 {
0356 regulator-min-microvolt = <5000000>;
0357 regulator-max-microvolt = <5000000>;
0358 };
0359
0360 pm8941_l1: l1 {
0361 regulator-min-microvolt = <1225000>;
0362 regulator-max-microvolt = <1225000>;
0363 regulator-always-on;
0364 regulator-boot-on;
0365 };
0366
0367 pm8941_l2: l2 {
0368 regulator-min-microvolt = <1200000>;
0369 regulator-max-microvolt = <1200000>;
0370 };
0371
0372 pm8941_l3: l3 {
0373 regulator-min-microvolt = <1200000>;
0374 regulator-max-microvolt = <1200000>;
0375 };
0376
0377 pm8941_l4: l4 {
0378 regulator-min-microvolt = <1225000>;
0379 regulator-max-microvolt = <1225000>;
0380 };
0381
0382 pm8941_l5: l5 {
0383 regulator-min-microvolt = <1800000>;
0384 regulator-max-microvolt = <1800000>;
0385 };
0386
0387 pm8941_l6: l6 {
0388 regulator-min-microvolt = <1800000>;
0389 regulator-max-microvolt = <1800000>;
0390 regulator-boot-on;
0391 };
0392
0393 pm8941_l7: l7 {
0394 regulator-min-microvolt = <1800000>;
0395 regulator-max-microvolt = <1800000>;
0396 regulator-boot-on;
0397 };
0398
0399 pm8941_l8: l8 {
0400 regulator-min-microvolt = <1800000>;
0401 regulator-max-microvolt = <1800000>;
0402 };
0403
0404 pm8941_l9: l9 {
0405 regulator-min-microvolt = <1800000>;
0406 regulator-max-microvolt = <2950000>;
0407 };
0408
0409 pm8941_l11: l11 {
0410 regulator-min-microvolt = <1300000>;
0411 regulator-max-microvolt = <1350000>;
0412 };
0413
0414 pm8941_l12: l12 {
0415 regulator-min-microvolt = <1800000>;
0416 regulator-max-microvolt = <1800000>;
0417 regulator-always-on;
0418 regulator-boot-on;
0419 };
0420
0421 pm8941_l13: l13 {
0422 regulator-min-microvolt = <1800000>;
0423 regulator-max-microvolt = <2950000>;
0424 regulator-boot-on;
0425 };
0426
0427 pm8941_l14: l14 {
0428 regulator-min-microvolt = <1800000>;
0429 regulator-max-microvolt = <1800000>;
0430 };
0431
0432 pm8941_l15: l15 {
0433 regulator-min-microvolt = <2050000>;
0434 regulator-max-microvolt = <2050000>;
0435 };
0436
0437 pm8941_l16: l16 {
0438 regulator-min-microvolt = <2700000>;
0439 regulator-max-microvolt = <2700000>;
0440 };
0441
0442 pm8941_l17: l17 {
0443 regulator-min-microvolt = <2700000>;
0444 regulator-max-microvolt = <2700000>;
0445 };
0446
0447 pm8941_l18: l18 {
0448 regulator-min-microvolt = <2850000>;
0449 regulator-max-microvolt = <2850000>;
0450 };
0451
0452 pm8941_l19: l19 {
0453 regulator-min-microvolt = <2850000>;
0454 regulator-max-microvolt = <2850000>;
0455 };
0456
0457 pm8941_l20: l20 {
0458 regulator-min-microvolt = <2950000>;
0459 regulator-max-microvolt = <2950000>;
0460 regulator-system-load = <500000>;
0461 regulator-allow-set-load;
0462 regulator-boot-on;
0463 };
0464
0465 pm8941_l21: l21 {
0466 regulator-min-microvolt = <2950000>;
0467 regulator-max-microvolt = <2950000>;
0468 regulator-boot-on;
0469 };
0470
0471 pm8941_l22: l22 {
0472 regulator-min-microvolt = <3000000>;
0473 regulator-max-microvolt = <3000000>;
0474 };
0475
0476 pm8941_l23: l23 {
0477 regulator-min-microvolt = <2800000>;
0478 regulator-max-microvolt = <2800000>;
0479 };
0480
0481 pm8941_l24: l24 {
0482 regulator-min-microvolt = <3075000>;
0483 regulator-max-microvolt = <3075000>;
0484 regulator-boot-on;
0485 };
0486
0487 pm8941_lvs3: lvs3 {};
0488 };
0489 };
0490
0491 &sdhc_1 {
0492 status = "okay";
0493
0494 vmmc-supply = <&pm8941_l20>;
0495 vqmmc-supply = <&pm8941_s3>;
0496
0497 pinctrl-names = "default", "sleep";
0498 pinctrl-0 = <&sdc1_on>;
0499 pinctrl-1 = <&sdc1_off>;
0500 };
0501
0502 &sdhc_2 {
0503 status = "okay";
0504
0505 vmmc-supply = <&pm8941_l21>;
0506 vqmmc-supply = <&pm8941_l13>;
0507
0508 cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
0509
0510 pinctrl-names = "default", "sleep";
0511 pinctrl-0 = <&sdc2_on>;
0512 pinctrl-1 = <&sdc2_off>;
0513 };
0514
0515 &sdhc_3 {
0516 status = "okay";
0517
0518 max-frequency = <100000000>;
0519 vmmc-supply = <&vreg_wlan>;
0520 non-removable;
0521
0522 pinctrl-names = "default";
0523 pinctrl-0 = <&sdc3_on>;
0524
0525 #address-cells = <1>;
0526 #size-cells = <0>;
0527
0528 bcrmf@1 {
0529 compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
0530 reg = <1>;
0531
0532 brcm,drive-strength = <10>;
0533
0534 pinctrl-names = "default";
0535 pinctrl-0 = <&wlan_sleep_clk_pin>;
0536 };
0537 };
0538
0539 &smbb {
0540 qcom,fast-charge-safe-current = <1500000>;
0541 qcom,fast-charge-current-limit = <1500000>;
0542 qcom,dc-current-limit = <1800000>;
0543 qcom,fast-charge-safe-voltage = <4400000>;
0544 qcom,fast-charge-high-threshold-voltage = <4350000>;
0545 qcom,fast-charge-low-threshold-voltage = <3400000>;
0546 qcom,auto-recharge-threshold-voltage = <4200000>;
0547 qcom,minimum-input-voltage = <4300000>;
0548 };
0549
0550 &tlmm {
0551 lcd_backlight_en_pin_a: lcd-backlight-vddio {
0552 pins = "gpio69";
0553 drive-strength = <10>;
0554 output-low;
0555 bias-disable;
0556 };
0557
0558 sdc1_on: sdc1-on {
0559 clk {
0560 pins = "sdc1_clk";
0561 drive-strength = <16>;
0562 bias-disable;
0563 };
0564
0565 cmd-data {
0566 pins = "sdc1_cmd", "sdc1_data";
0567 drive-strength = <10>;
0568 bias-pull-up;
0569 };
0570 };
0571
0572 sdc2_on: sdc2-on {
0573 clk {
0574 pins = "sdc2_clk";
0575 drive-strength = <6>;
0576 bias-disable;
0577 };
0578
0579 cmd-data {
0580 pins = "sdc2_cmd", "sdc2_data";
0581 drive-strength = <6>;
0582 bias-pull-up;
0583 };
0584
0585 cd {
0586 pins = "gpio62";
0587 function = "gpio";
0588 drive-strength = <2>;
0589 bias-disable;
0590 };
0591 };
0592
0593 sdc3_on: sdc3-on {
0594 clk {
0595 pins = "gpio40";
0596 function = "sdc3";
0597 drive-strength = <10>;
0598 bias-disable;
0599 };
0600
0601 cmd {
0602 pins = "gpio39";
0603 function = "sdc3";
0604 drive-strength = <10>;
0605 bias-pull-up;
0606 };
0607
0608 data {
0609 pins = "gpio35", "gpio36", "gpio37", "gpio38";
0610 function = "sdc3";
0611 drive-strength = <10>;
0612 bias-pull-up;
0613 };
0614 };
0615
0616 ts_int_pin: ts-int-pin {
0617 pins = "gpio86";
0618 function = "gpio";
0619 drive-strength = <2>;
0620 bias-disable;
0621 input-enable;
0622 };
0623
0624 bt_host_wake_pin: bt-host-wake {
0625 pins = "gpio95";
0626 function = "gpio";
0627 drive-strength = <2>;
0628 bias-disable;
0629 output-low;
0630 };
0631
0632 bt_dev_wake_pin: bt-dev-wake {
0633 pins = "gpio96";
0634 function = "gpio";
0635 drive-strength = <2>;
0636 bias-disable;
0637 };
0638 };