Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: BSD-3-Clause
0002 /*
0003  * Copyright (c) 2021, AngeloGioacchino Del Regno
0004  *                     <angelogioacchino.delregno@somainline.org>
0005  * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
0006  */
0007 
0008 #include "msm8996.dtsi"
0009 #include "pm8994.dtsi"
0010 #include "pmi8994.dtsi"
0011 #include "pmi8996.dtsi"
0012 #include <dt-bindings/input/input.h>
0013 #include <dt-bindings/gpio/gpio.h>
0014 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0015 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
0016 
0017 /delete-node/ &adsp_mem;
0018 /delete-node/ &slpi_mem;
0019 /delete-node/ &venus_mem;
0020 /delete-node/ &gpu_mem;
0021 
0022 / {
0023         qcom,msm-id = <246 0x30001>; /* MSM8996 V3.1 (Final) */
0024         qcom,board-id = <8 0>;
0025 
0026         chosen {
0027                 /*
0028                  * Due to an unknown-for-a-few-years regression,
0029                  * SDHCI only works on MSM8996 in PIO (lame) mode.
0030                  */
0031                 bootargs = "sdhci.debug_quirks=0x40 sdhci.debug_quirks2=0x4 maxcpus=2";
0032         };
0033 
0034         reserved-memory {
0035                 ramoops@a7f00000 {
0036                         compatible = "ramoops";
0037                         reg = <0 0xa7f00000 0 0x100000>;
0038                         record-size = <0x20000>;
0039                         console-size = <0x40000>;
0040                         ftrace-size = <0x20000>;
0041                         pmsg-size = <0x20000>;
0042                         ecc-size = <16>;
0043                 };
0044 
0045                 adsp_mem: adsp@8ea00000 {
0046                         reg = <0x0 0x8ea00000 0x0 0x1a00000>;
0047                         no-map;
0048                 };
0049 
0050                 gpu_mem: gpu@90400000 {
0051                         compatible = "shared-dma-pool";
0052                         reg = <0x0 0x90400000 0x0 0x2000>;
0053                         no-map;
0054                 };
0055 
0056                 slpi_mem: memory@90500000 {
0057                         reg = <0 0x90500000 0 0xa00000>;
0058                         no-map;
0059                 };
0060 
0061                 venus_mem: memory@90f00000 {
0062                         reg = <0 0x90f00000 0 0x500000>;
0063                         no-map;
0064                 };
0065         };
0066 
0067         panel_tvdd: tvdd-regulator {
0068                 compatible = "regulator-fixed";
0069                 regulator-name = "panel_tvdd";
0070                 gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
0071                 pinctrl-0 = <&tp_vddio_en>;
0072                 pinctrl-names = "default";
0073         };
0074 
0075         usb3_id: usb3-id {
0076                 compatible = "linux,extcon-usb-gpio";
0077                 id-gpio = <&tlmm 25 GPIO_ACTIVE_LOW>;
0078                 pinctrl-names = "default";
0079                 pinctrl-0 = <&usb_detect>;
0080         };
0081 
0082         vph_pwr: vph-pwr-regulator {
0083                 compatible = "regulator-fixed";
0084                 regulator-min-microvolt = <3700000>;
0085                 regulator-max-microvolt = <3700000>;
0086                 regulator-name = "vph_pwr";
0087                 regulator-always-on;
0088                 regulator-boot-on;
0089         };
0090 
0091         wlan_en: wlan-en-1-8v {
0092                 compatible = "regulator-fixed";
0093                 regulator-name = "wlan-en-regulator";
0094                 regulator-min-microvolt = <1800000>;
0095                 regulator-max-microvolt = <1800000>;
0096                 gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
0097                 pinctrl-names = "default";
0098                 pinctrl-0 = <&wl_reg_on>;
0099 
0100                 /* WLAN card specific delay */
0101                 startup-delay-us = <70000>;
0102                 enable-active-high;
0103         };
0104 };
0105 
0106 &blsp1_i2c3 {
0107         status = "okay";
0108         clock-frequency = <355000>;
0109 
0110         tof_sensor: vl53l0x@29 {
0111                 compatible = "st,vl53l0x";
0112                 reg = <0x29>;
0113         };
0114 };
0115 
0116 &blsp1_uart2 {
0117         status = "okay";
0118 };
0119 
0120 &blsp2_i2c5 {
0121         status = "okay";
0122         clock-frequency = <355000>;
0123 
0124         /* FUSB301 USB-C controller */
0125 };
0126 
0127 &blsp2_i2c6 {
0128         status = "okay";
0129         clock-frequency = <355000>;
0130 
0131         synaptics@2c {
0132                 compatible = "syna,rmi4-i2c";
0133                 reg = <0x2c>;
0134                 interrupt-parent = <&tlmm>;
0135                 interrupts = <125 IRQ_TYPE_EDGE_FALLING>;
0136                 vdd-supply = <&panel_tvdd>;
0137 
0138                 syna,reset-delay-ms = <220>;
0139                 syna,startup-delay-ms = <220>;
0140                 #address-cells = <1>;
0141                 #size-cells = <0>;
0142 
0143                 rmi4-f01@1 {
0144                         reg = <0x1>;
0145                         syna,nosleep-mode = <1>;
0146                 };
0147 
0148                 rmi4-f11@11 {
0149                         reg = <0x11>;
0150                         syna,sensor-type = <1>;
0151                 };
0152         };
0153 };
0154 
0155 &blsp2_uart2 {
0156         status = "okay";
0157 };
0158 
0159 &camera0_mclk {
0160         drive-strength = <2>;
0161         output-low;
0162 };
0163 
0164 &camera0_pwdn {
0165         drive-strength = <2>;
0166         output-low;
0167 };
0168 
0169 &camera0_rst {
0170         pins = "gpio30";
0171         drive-strength = <2>;
0172         output-low;
0173 };
0174 
0175 &camera2_mclk {
0176         drive-strength = <2>;
0177         output-low;
0178 };
0179 
0180 &camera2_rst {
0181         drive-strength = <2>;
0182         output-low;
0183 };
0184 
0185 &hsusb_phy1 {
0186         status = "okay";
0187 
0188         vdd-supply = <&pm8994_l28>;
0189         vdda-pll-supply = <&pm8994_l12>;
0190         vdda-phy-dpdm-supply = <&pm8994_l24>;
0191 };
0192 
0193 &mmcc {
0194         vdd-gfx-supply = <&vdd_gfx>;
0195 };
0196 
0197 &pcie0 {
0198         status = "okay";
0199         perst-gpio = <&tlmm 35 GPIO_ACTIVE_LOW>;
0200         wake-gpio = <&tlmm 37 GPIO_ACTIVE_HIGH>;
0201         vddpe-3v3-supply = <&wlan_en>;
0202         vdda-supply = <&pm8994_l28>;
0203 };
0204 
0205 &pcie_phy {
0206         status = "okay";
0207 
0208         vdda-phy-supply = <&pm8994_l28>;
0209         vdda-pll-supply = <&pm8994_l12>;
0210 };
0211 
0212 &pm8994_gpios {
0213         pinctrl-names = "default";
0214         pinctrl-0 = <&pm8994_gpios_defaults>;
0215         gpio-line-names =
0216                 "NC",
0217                 "VOL_DOWN_N",
0218                 "VOL_UP_N",
0219                 "SNAPSHOT_N",
0220                 "FOCUS_N",
0221                 "NC",
0222                 "NFC_VEN",
0223                 "NC",
0224                 "NC",
0225                 "NC",
0226                 "NC",
0227                 "NC",
0228                 "EAR_EN",
0229                 "NC",
0230                 "PM_DIVCLK1",
0231                 "PMI_CLK",
0232                 "NC",
0233                 "WL_SLEEP_CLK",
0234                 "NC",
0235                 "PMIC_SPON",
0236                 "UIM_BATT_ALARM",
0237                 "PMK_SLEEP_CLK";
0238 
0239         /*
0240          * We don't yet know for sure which GPIOs are of our interest, but what
0241          * we do know is that if a vendor sets the pins to a non-default state, there's
0242          * probably a reason for it, and just to be on the safe side, we follow suit.
0243          */
0244         pm8994_gpios_defaults: pm8994-gpios-default-state {
0245                 pm8994-gpio1-nc-pins {
0246                         pins = "gpio1";
0247                         function = PMIC_GPIO_FUNC_NORMAL;
0248                         drive-push-pull;
0249                         bias-high-impedance;
0250                 };
0251 
0252                 vol-down-n-pins {
0253                         pins = "gpio2";
0254                         function = PMIC_GPIO_FUNC_NORMAL;
0255                         drive-push-pull;
0256                         input-enable;
0257                         bias-pull-up;
0258                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0259                         power-source = <PM8994_GPIO_S4>;
0260                 };
0261 
0262                 vol-up-n-pins {
0263                         pins = "gpio3";
0264                         function = PMIC_GPIO_FUNC_NORMAL;
0265                         drive-push-pull;
0266                         input-enable;
0267                         bias-pull-up;
0268                         power-source = <PM8994_GPIO_S4>;
0269                 };
0270 
0271                 camera-snapshot-n-pins {
0272                         pins = "gpio4";
0273                         function = PMIC_GPIO_FUNC_NORMAL;
0274                         drive-push-pull;
0275                         input-enable;
0276                         bias-pull-up;
0277                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0278                         power-source = <PM8994_GPIO_S4>;
0279                 };
0280 
0281                 camera-focus-n-pins {
0282                         pins = "gpio5";
0283                         function = PMIC_GPIO_FUNC_NORMAL;
0284                         drive-push-pull;
0285                         input-enable;
0286                         bias-pull-up;
0287                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0288                         power-source = <PM8994_GPIO_S4>;
0289                 };
0290 
0291                 pm8994-gpio6-nc-pins {
0292                         pins = "gpio6";
0293                         function = PMIC_GPIO_FUNC_NORMAL;
0294                         drive-push-pull;
0295                         bias-high-impedance;
0296                         power-source = <PM8994_GPIO_VPH>;
0297                 };
0298 
0299                 nfc-download-pins {
0300                         pins = "gpio7";
0301                         function = PMIC_GPIO_FUNC_NORMAL;
0302                         output-low;
0303                         drive-push-pull;
0304                         bias-disable;
0305                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0306                         power-source = <PM8994_GPIO_S4>;
0307                 };
0308 
0309                 pm8994-gpio8-nc-pins {
0310                         pins = "gpio8";
0311                         function = PMIC_GPIO_FUNC_NORMAL;
0312                         output-low;
0313                         drive-push-pull;
0314                         bias-high-impedance;
0315                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0316                         power-source = <PM8994_GPIO_VPH>;
0317                 };
0318 
0319                 pm8994-gpio9-nc-pins {
0320                         pins = "gpio9";
0321                         function = PMIC_GPIO_FUNC_NORMAL;
0322                         output-high;
0323                         drive-push-pull;
0324                         bias-high-impedance;
0325                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0326                         power-source = <PM8994_GPIO_VPH>;
0327                 };
0328 
0329                 nfc-clock-pins {
0330                         pins = "gpio10";
0331                         function = PMIC_GPIO_FUNC_NORMAL;
0332                         input-enable;
0333                         drive-push-pull;
0334                         bias-pull-down;
0335                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0336                         power-source = <PM8994_GPIO_S4>;
0337                 };
0338 
0339                 pm8994-gpio11-nc-pins {
0340                         pins = "gpio11";
0341                         function = PMIC_GPIO_FUNC_NORMAL;
0342                         drive-push-pull;
0343                         bias-high-impedance;
0344                         power-source = <PM8994_GPIO_VPH>;
0345                 };
0346 
0347                 pm8994-gpio12-nc-pins {
0348                         pins = "gpio12";
0349                         function = PMIC_GPIO_FUNC_NORMAL;
0350                         drive-push-pull;
0351                         bias-high-impedance;
0352                         power-source = <PM8994_GPIO_VPH>;
0353                 };
0354 
0355                 ear-enable-pins {
0356                         pins = "gpio13";
0357                         function = PMIC_GPIO_FUNC_NORMAL;
0358                         output-high;
0359                         drive-push-pull;
0360                         bias-disable;
0361                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0362                         power-source = <PM8994_GPIO_S4>;
0363                 };
0364 
0365                 pm8994-gpio14-nc-pins {
0366                         pins = "gpio14";
0367                         function = PMIC_GPIO_FUNC_NORMAL;
0368                         drive-push-pull;
0369                         input-enable;
0370                         bias-high-impedance;
0371                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0372                         power-source = <PM8994_GPIO_VPH>;
0373                 };
0374 
0375                 pm-divclk1-gpio-pins {
0376                         pins = "gpio15";
0377                         function = "func1";
0378                         output-high;
0379                         drive-push-pull;
0380                         bias-high-impedance;
0381                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0382                         power-source = <PM8994_GPIO_VPH>;
0383                 };
0384 
0385                 pmi-clk-gpio-pins {
0386                         pins = "gpio16";
0387                         function = PMIC_GPIO_FUNC_NORMAL;
0388                         drive-push-pull;
0389                 };
0390 
0391                 pm8994-gpio17-nc-pins {
0392                         pins = "gpio17";
0393                         function = PMIC_GPIO_FUNC_NORMAL;
0394                         drive-push-pull;
0395                         bias-high-impedance;
0396                         power-source = <PM8994_GPIO_VPH>;
0397                 };
0398 
0399                 rome-sleep-pins {
0400                         pins = "gpio18";
0401                         function = PMIC_GPIO_FUNC_FUNC2;
0402                         output-low;
0403                         drive-push-pull;
0404                         bias-disable;
0405                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_MED>;
0406                         power-source = <PM8994_GPIO_S4>;
0407                 };
0408 
0409                 pm8994-gpio19-nc-pins {
0410                         pins = "gpio19";
0411                         function = PMIC_GPIO_FUNC_NORMAL;
0412                         output-low;
0413                         drive-push-pull;
0414                         bias-high-impedance;
0415                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0416                         power-source = <PM8994_GPIO_VPH>;
0417                 };
0418 
0419                 pm8994-gpio22-nc-pins {
0420                         pins = "gpio22";
0421                         function = PMIC_GPIO_FUNC_NORMAL;
0422                         drive-push-pull;
0423                         bias-high-impedance;
0424                         power-source = <PM8994_GPIO_VPH>;
0425                 };
0426         };
0427 };
0428 
0429 &pm8994_mpps {
0430         pinctrl-names = "default";
0431         pinctrl-0 = <&pm8994_mpps_defaults>;
0432 
0433         gpio-line-names =
0434                 "SDC_UIM_VBIAS",
0435                 "LCD_ID_ADC",
0436                 "VREF_DACX",
0437                 "NC",
0438                 "FLASH_THERM",
0439                 "NC",
0440                 "NC",
0441                 "RF_ID";
0442 
0443         pm8994_mpps_defaults: pm8994-mpps-default-state {
0444                 lcd-id_adc-mpp-pins {
0445                         pins = "mpp2";
0446                         function = "analog";
0447                         input-enable;
0448                         qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH6>;
0449                 };
0450 
0451                 pm-mpp4-nc-pins {
0452                         pins = "mpp4";
0453                         function = "digital";
0454                         bias-high-impedance;
0455                         power-source = <PM8994_GPIO_VPH>;
0456                 };
0457 
0458                 flash-therm-mpp-pins {
0459                         pins = "mpp5";
0460                         function = "analog";
0461                         input-enable;
0462                         qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
0463                 };
0464 
0465                 mpp6-nc-pins {
0466                         pins = "mpp6";
0467                         function = "digital";
0468                         bias-high-impedance;
0469                 };
0470 
0471                 rf-id-mpp-pins {
0472                         pins = "mpp8";
0473                         function = "analog";
0474                         input-enable;
0475                         qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH8>;
0476                 };
0477         };
0478 };
0479 
0480 &pm8994_resin {
0481         status = "okay";
0482         linux,code = <KEY_VOLUMEUP>;
0483 };
0484 
0485 &pmi8994_gpios {
0486         pinctrl-names = "default";
0487         pinctrl-0 = <&pmi8994_gpios_defaults>;
0488 
0489         gpio-line-names =
0490                 "VIB_LDO_EN",
0491                 "NC",
0492                 "NC",
0493                 "NC",
0494                 "NC",
0495                 "NC",
0496                 "NC",
0497                 "NC",
0498                 "USB_SWITCH_SEL",
0499                 "NC";
0500 
0501         pmi8994_gpios_defaults: pmi8994-gpios-default-state {
0502                 vib-ldo-en-gpio-pins {
0503                         pins = "gpio1";
0504                         function = PMIC_GPIO_FUNC_NORMAL;
0505                         drive-push-pull;
0506                         output-low;
0507                         bias-disable;
0508                         power-source = <PM8994_GPIO_S4>;
0509                 };
0510 
0511                 pmi-gpio2-nc-pins {
0512                         pins = "gpio2";
0513                         function = PMIC_GPIO_FUNC_NORMAL;
0514                         drive-push-pull;
0515                         input-enable;
0516                         bias-high-impedance;
0517                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0518                         power-source = <PM8994_GPIO_VPH>;
0519                 };
0520 
0521                 pmi-gpio3-nc-pins {
0522                         pins = "gpio3";
0523                         function = PMIC_GPIO_FUNC_NORMAL;
0524                         drive-push-pull;
0525                         input-enable;
0526                         bias-high-impedance;
0527                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0528                         power-source = <PM8994_GPIO_VPH>;
0529                 };
0530 
0531                 pmi-gpio4-nc-pins {
0532                         pins = "gpio4";
0533                         function = PMIC_GPIO_FUNC_NORMAL;
0534                         drive-push-pull;
0535                         output-high;
0536                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0537                         power-source = <PM8994_GPIO_S4>;
0538                 };
0539 
0540                 pmi-gpio5-nc-pins {
0541                         pins = "gpio5";
0542                         function = PMIC_GPIO_FUNC_NORMAL;
0543                         drive-push-pull;
0544                         output-high;
0545                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0546                         power-source = <PM8994_GPIO_S4>;
0547                 };
0548 
0549                 pmi-gpio6-nc-pins {
0550                         pins = "gpio6";
0551                         function = PMIC_GPIO_FUNC_NORMAL;
0552                         drive-push-pull;
0553                         output-high;
0554                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0555                         power-source = <PM8994_GPIO_S4>;
0556                 };
0557 
0558                 pmi-gpio7-nc-pins {
0559                         pins = "gpio7";
0560                         function = PMIC_GPIO_FUNC_NORMAL;
0561                         drive-push-pull;
0562                         output-high;
0563                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0564                         power-source = <PM8994_GPIO_S4>;
0565                 };
0566 
0567                 pmi-gpio8-nc-pins {
0568                         pins = "gpio8";
0569                         function = PMIC_GPIO_FUNC_NORMAL;
0570                         drive-push-pull;
0571                         output-high;
0572                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0573                         power-source = <PM8994_GPIO_S4>;
0574                 };
0575 
0576                 usb-switch-sel-pins {
0577                         pins = "gpio9";
0578                         function = PMIC_GPIO_FUNC_NORMAL;
0579                         drive-push-pull;
0580                 };
0581 
0582                 pmi-gpio10-nc-pins {
0583                         pins = "gpio10";
0584                         function = PMIC_GPIO_FUNC_NORMAL;
0585                         output-low;
0586                         drive-push-pull;
0587                         bias-disable;
0588                         qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0589                         power-source = <PM8994_GPIO_S4>;
0590                 };
0591         };
0592 };
0593 
0594 &pm8994_spmi_regulators {
0595         qcom,saw-reg = <&saw3>;
0596 
0597         pm8994_s9: s9 {
0598                 qcom,saw-slave;
0599         };
0600 
0601         pm8994_s10: s10 {
0602                 qcom,saw-slave;
0603         };
0604 
0605         pm8994_s11: s11 {
0606                 qcom,saw-leader;
0607                 regulator-name = "vdd_apcc";
0608                 regulator-always-on;
0609                 regulator-min-microvolt = <470000>;
0610                 regulator-max-microvolt = <1140000>;
0611         };
0612 };
0613 
0614 &pmi8994_spmi_regulators {
0615         vdd_gfx:
0616         pmi8994_s2: s2 {
0617                 /* Pinned to a high value for now to avoid random crashes. */
0618                 regulator-min-microvolt = <1015000>;
0619                 regulator-max-microvolt = <1015000>;
0620                 regulator-name = "vdd_gfx";
0621                 regulator-always-on;
0622         };
0623 };
0624 
0625 &pmi8994_wled {
0626         status = "okay";
0627         default-brightness = <512>;
0628         qcom,num-strings = <3>;
0629 };
0630 
0631 &rpm_requests {
0632         pm8994-regulators {
0633                 compatible = "qcom,rpm-pm8994-regulators";
0634 
0635                 vdd_s1-supply = <&vph_pwr>;
0636                 vdd_s2-supply = <&vph_pwr>;
0637                 vdd_s3-supply = <&vph_pwr>;
0638                 vdd_s4-supply = <&vph_pwr>;
0639                 vdd_s5-supply = <&vph_pwr>;
0640                 vdd_s6-supply = <&vph_pwr>;
0641                 vdd_s7-supply = <&vph_pwr>;
0642                 vdd_s8-supply = <&vph_pwr>;
0643                 vdd_s9-supply = <&vph_pwr>;
0644                 vdd_s10-supply = <&vph_pwr>;
0645                 vdd_s11-supply = <&vph_pwr>;
0646                 vdd_s12-supply = <&vph_pwr>;
0647                 vdd_l1-supply = <&pm8994_s3>;
0648                 vdd_l2_l26_l28-supply = <&pm8994_s3>;
0649                 vdd_l3_l11-supply = <&pm8994_s3>;
0650                 vdd_l4_l27_l31-supply = <&pm8994_s3>;
0651                 vdd_l5_l7-supply = <&pm8994_s5>;
0652                 vdd_l6_l12_l32-supply = <&pm8994_s5>;
0653                 vdd_l8_l16_l30-supply = <&vph_pwr>;
0654                 vdd_l14_l15-supply = <&pm8994_s5>;
0655                 vdd_l20_l21-supply = <&pm8994_s5>;
0656                 vdd_l25-supply = <&pm8994_s3>;
0657                 vdd_lvs1_2-supply = <&pm8994_s4>;
0658 
0659                 pm8994_s3: s3 {
0660                         regulator-min-microvolt = <1300000>;
0661                         regulator-max-microvolt = <1300000>;
0662                 };
0663 
0664                 pm8994_s4: s4 {
0665                         regulator-min-microvolt = <1800000>;
0666                         regulator-max-microvolt = <1800000>;
0667                         regulator-system-load = <325000>;
0668                         regulator-always-on;
0669                 };
0670 
0671                 pm8994_s5: s5 {
0672                         regulator-min-microvolt = <2150000>;
0673                         regulator-max-microvolt = <2150000>;
0674                 };
0675 
0676                 pm8994_s7: s7 {
0677                         regulator-min-microvolt = <800000>;
0678                         regulator-max-microvolt = <800000>;
0679                 };
0680 
0681                 pm8994_l1: l1 {
0682                         regulator-min-microvolt = <1000000>;
0683                         regulator-max-microvolt = <1000000>;
0684                 };
0685 
0686                 pm8994_l2: l2 {
0687                         regulator-min-microvolt = <1250000>;
0688                         regulator-max-microvolt = <1250000>;
0689                 };
0690 
0691                 pm8994_l3: l3 {
0692                         regulator-min-microvolt = <1100000>;
0693                         regulator-max-microvolt = <1100000>;
0694                 };
0695 
0696                 pm8994_l4: l4 {
0697                         regulator-min-microvolt = <1225000>;
0698                         regulator-max-microvolt = <1225000>;
0699                 };
0700 
0701                 /* L6 and L7 seem unused. */
0702 
0703                 pm8994_l8: l8 {
0704                         regulator-min-microvolt = <1800000>;
0705                         regulator-max-microvolt = <1800000>;
0706                 };
0707 
0708                 pm8994_l9: l9 {
0709                         regulator-min-microvolt = <1800000>;
0710                         regulator-max-microvolt = <1800000>;
0711                 };
0712 
0713                 pm8994_l10: l10 {
0714                         regulator-min-microvolt = <1800000>;
0715                         regulator-max-microvolt = <1800000>;
0716                 };
0717 
0718                 pm8994_l11: l11 {
0719                         regulator-min-microvolt = <1100000>;
0720                         regulator-max-microvolt = <1100000>;
0721                 };
0722 
0723                 pm8994_l12: l12 {
0724                         regulator-min-microvolt = <1800000>;
0725                         regulator-max-microvolt = <1800000>;
0726                         regulator-allow-set-load;
0727                 };
0728 
0729                 pm8994_l13: l13 {
0730                         regulator-min-microvolt = <1800000>;
0731                         regulator-max-microvolt = <2950000>;
0732                         regulator-system-load = <22000>;
0733                         regulator-allow-set-load;
0734                 };
0735 
0736                 pm8994_l14: l14 {
0737                         regulator-min-microvolt = <1700000>;
0738                         regulator-max-microvolt = <1900000>;
0739                 };
0740 
0741                 pm8994_l15: l15 {
0742                         regulator-min-microvolt = <1800000>;
0743                         regulator-max-microvolt = <1800000>;
0744                 };
0745 
0746                 pm8994_l16: l16 {
0747                         regulator-min-microvolt = <2700000>;
0748                         regulator-max-microvolt = <2700000>;
0749                 };
0750 
0751                 pm8994_l17: l17 {
0752                         regulator-min-microvolt = <2200000>;
0753                         regulator-max-microvolt = <2500000>;
0754                 };
0755 
0756                 pm8994_l18: l18 {
0757                         regulator-min-microvolt = <1800000>;
0758                         regulator-max-microvolt = <1800000>;
0759                 };
0760 
0761                 pm8994_l19: l19 {
0762                         regulator-min-microvolt = <3000000>;
0763                         regulator-max-microvolt = <3000000>;
0764                 };
0765 
0766                 pm8994_l20: l20 {
0767                         regulator-min-microvolt = <2950000>;
0768                         regulator-max-microvolt = <2950000>;
0769                         regulator-system-load = <570000>;
0770                         regulator-allow-set-load;
0771                 };
0772 
0773                 pm8994_l21: l21 {
0774                         regulator-min-microvolt = <2950000>;
0775                         regulator-max-microvolt = <2950000>;
0776                         regulator-system-load = <800000>;
0777                         regulator-allow-set-load;
0778                 };
0779 
0780                 pm8994_l22: l22 {
0781                         regulator-min-microvolt = <3000000>;
0782                         regulator-max-microvolt = <3000000>;
0783                 };
0784 
0785                 pm8994_l23: l23 {
0786                         regulator-min-microvolt = <2700000>;
0787                         regulator-max-microvolt = <2700000>;
0788                 };
0789 
0790                 pm8994_l24: l24 {
0791                         regulator-min-microvolt = <3075000>;
0792                         regulator-max-microvolt = <3075000>;
0793                         regulator-allow-set-load;
0794                 };
0795 
0796                 pm8994_l25: l25 {
0797                         regulator-min-microvolt = <1200000>;
0798                         regulator-max-microvolt = <1200000>;
0799                         regulator-allow-set-load;
0800                 };
0801 
0802                 pm8994_l27: l27 {
0803                         regulator-min-microvolt = <1000000>;
0804                         regulator-max-microvolt = <1200000>;
0805                 };
0806 
0807                 pm8994_l28: l28 {
0808                         regulator-min-microvolt = <925000>;
0809                         regulator-max-microvolt = <925000>;
0810                         regulator-allow-set-load;
0811                 };
0812 
0813                 pm8994_l29: l29 {
0814                         regulator-min-microvolt = <2700000>;
0815                         regulator-max-microvolt = <2700000>;
0816                 };
0817 
0818                 pm8994_l30: l30 { };
0819 
0820                 pm8994_l32: l32 {
0821                         regulator-min-microvolt = <1800000>;
0822                         regulator-max-microvolt = <1800000>;
0823                 };
0824         };
0825 };
0826 
0827 &sdhc1 {
0828         /* eMMC doesn't seem to cooperate even in PIO mode.. */
0829         status = "disabled";
0830 
0831         vmmc-supply = <&pm8994_l20>;
0832         vqmmc-supply = <&pm8994_s4>;
0833         mmc-hs400-1_8v;
0834         mmc-hs200-1_8v;
0835 };
0836 
0837 &sdhc2 {
0838         status = "okay";
0839 
0840         cd-gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
0841         vmmc-supply = <&pm8994_l21>;
0842         vqmmc-supply = <&pm8994_l13>;
0843 };
0844 
0845 &tlmm {
0846         gpio-reserved-ranges = <0 4>;
0847         pinctrl-0 = <&sw_service_gpio>;
0848         pinctrl-names = "default";
0849 
0850         disp_reset_n_gpio: disp-reset-n {
0851                 pins = "gpio8";
0852                 function = "gpio";
0853                 drive-strength = <2>;
0854                 bias-disable;
0855         };
0856 
0857         mdp_vsync_p_gpio: mdp-vsync-p {
0858                 pins = "gpio10";
0859                 function = "mdp_vsync";
0860                 drive-strength = <2>;
0861                 bias-disable;
0862         };
0863 
0864         sw_service_gpio: sw-service-gpio {
0865                 pins = "gpio16";
0866                 function = "gpio";
0867                 drive-strength = <2>;
0868                 bias-pull-up;
0869         };
0870 
0871         usb_detect: usb-detect {
0872                 pins = "gpio25";
0873                 function = "gpio";
0874                 drive-strength = <2>;
0875                 bias-disable;
0876                 output-high;
0877         };
0878 
0879         uim_detect_en: uim-detect-en {
0880                 pins = "gpio29";
0881                 function = "gpio";
0882                 drive-strength = <2>;
0883                 bias-disable;
0884                 output-high;
0885         };
0886 
0887         tray_det_pin: tray-det {
0888                 pins = "gpio40";
0889                 function = "gpio";
0890                 drive-strength = <2>;
0891                 bias-disable;
0892         };
0893 
0894         tp_vddio_en: tp-vddio-en {
0895                 pins = "gpio50";
0896                 function = "gpio";
0897                 drive-strength = <2>;
0898                 bias-disable;
0899                 output-high;
0900         };
0901 
0902         lcd_vddio_en: lcd-vddio-en {
0903                 pins = "gpio51";
0904                 function = "gpio";
0905                 drive-strength = <2>;
0906                 bias-disable;
0907                 output-low;
0908         };
0909 
0910         wl_host_wake: wl-host-wake {
0911                 pins = "gpio79";
0912                 function = "gpio";
0913                 drive-strength = <2>;
0914                 bias-pull-down;
0915                 input-high;
0916         };
0917 
0918         wl_reg_on: wl-reg-on {
0919                 pins = "gpio84";
0920                 function = "gpio";
0921                 drive-strength = <2>;
0922                 bias-disable;
0923                 output-low;
0924         };
0925 
0926         ts_reset_n: ts-rst-n {
0927                 pins = "gpio89";
0928                 function = "gpio";
0929                 drive-strength = <2>;
0930         };
0931 
0932         touch_int_n: touch-int-n {
0933                 pins = "gpio125";
0934                 function = "gpio";
0935                 drive-strength = <2>;
0936                 bias-pull-up;
0937         };
0938 
0939         touch_int_sleep: touch-int-sleep {
0940                 pins = "gpio125";
0941                 function = "gpio";
0942                 drive-strength = <2>;
0943                 bias-pull-down;
0944         };
0945 };
0946 
0947 /*
0948  * For reasons that are currently unknown (but probably related to fusb301), USB takes about
0949  * 6 minutes to wake up (nothing interesting in kernel logs), but then it works as it should.
0950  */
0951 &usb3 {
0952         status = "okay";
0953         qcom,select-utmi-as-pipe-clk;
0954 };
0955 
0956 &usb3_dwc3 {
0957         extcon = <&usb3_id>;
0958         dr_mode = "peripheral";
0959         phys = <&hsusb_phy1>;
0960         phy-names = "usb2-phy";
0961         snps,hird-threshold = /bits/ 8 <0>;
0962 };