Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #include "qcom-msm8974.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         aliases {
0011                 serial0 = &blsp1_uart2;
0012         };
0013 
0014         chosen {
0015                 stdout-path = "serial0:115200n8";
0016         };
0017 
0018         gpio-keys {
0019                 compatible = "gpio-keys";
0020 
0021                 pinctrl-names = "default";
0022                 pinctrl-0 = <&gpio_keys_pin_a>;
0023 
0024                 key-volume-down {
0025                         label = "volume_down";
0026                         gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
0027                         linux,input-type = <1>;
0028                         linux,code = <KEY_VOLUMEDOWN>;
0029                 };
0030 
0031                 key-camera-snapshot {
0032                         label = "camera_snapshot";
0033                         gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
0034                         linux,input-type = <1>;
0035                         linux,code = <KEY_CAMERA>;
0036                 };
0037 
0038                 key-camera-focus {
0039                         label = "camera_focus";
0040                         gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
0041                         linux,input-type = <1>;
0042                         linux,code = <KEY_CAMERA_FOCUS>;
0043                 };
0044 
0045                 key-volume-up {
0046                         label = "volume_up";
0047                         gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
0048                         linux,input-type = <1>;
0049                         linux,code = <KEY_VOLUMEUP>;
0050                 };
0051         };
0052 
0053         reserved-memory {
0054                 #address-cells = <1>;
0055                 #size-cells = <1>;
0056                 ranges;
0057 
0058                 ramoops@3e8e0000 {
0059                         compatible = "ramoops";
0060                         reg = <0x3e8e0000 0x200000>;
0061 
0062                         console-size = <0x100000>;
0063                         record-size = <0x10000>;
0064                         ftrace-size = <0x10000>;
0065                         pmsg-size = <0x80000>;
0066                 };
0067         };
0068 };
0069 
0070 &blsp1_i2c2 {
0071         status = "okay";
0072         clock-frequency = <355000>;
0073 
0074         synaptics@2c {
0075                 compatible = "syna,rmi4-i2c";
0076                 reg = <0x2c>;
0077 
0078                 interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>;
0079 
0080                 #address-cells = <1>;
0081                 #size-cells = <0>;
0082 
0083                 vdd-supply = <&pm8941_l22>;
0084                 vio-supply = <&pm8941_lvs3>;
0085 
0086                 pinctrl-names = "default";
0087                 pinctrl-0 = <&ts_int_pin>;
0088 
0089                 syna,startup-delay-ms = <10>;
0090 
0091                 rmi4-f01@1 {
0092                         reg = <0x1>;
0093                         syna,nosleep-mode = <1>;
0094                 };
0095 
0096                 rmi4-f11@11 {
0097                         reg = <0x11>;
0098                         touchscreen-inverted-x;
0099                         syna,sensor-type = <1>;
0100                 };
0101         };
0102 };
0103 
0104 &blsp1_i2c6 {
0105         status = "okay";
0106         clock-frequency = <355000>;
0107 
0108         nfc@28 {
0109                 compatible = "nxp,pn544-i2c";
0110                 reg = <0x28>;
0111 
0112                 interrupt-parent = <&tlmm>;
0113                 interrupts = <59 IRQ_TYPE_EDGE_RISING>;
0114 
0115                 enable-gpios = <&pm8941_gpios 23 GPIO_ACTIVE_HIGH>;
0116                 firmware-gpios = <&tlmm 77 GPIO_ACTIVE_HIGH>;
0117         };
0118 };
0119 
0120 &blsp1_uart2 {
0121         status = "okay";
0122 };
0123 
0124 &blsp2_dma {
0125         qcom,controlled-remotely;
0126 };
0127 
0128 &blsp2_i2c5 {
0129         status = "okay";
0130         clock-frequency = <355000>;
0131 
0132         /* sii8334 MHL HDMI bridge */
0133 };
0134 
0135 &otg {
0136         status = "okay";
0137 
0138         phys = <&usb_hs1_phy>;
0139         phy-select = <&tcsr 0xb000 0>;
0140         extcon = <&smbb>, <&usb_id>;
0141         vbus-supply = <&chg_otg>;
0142 
0143         hnp-disable;
0144         srp-disable;
0145         adp-disable;
0146 
0147         ulpi {
0148                 phy@a {
0149                         status = "okay";
0150 
0151                         v1p8-supply = <&pm8941_l6>;
0152                         v3p3-supply = <&pm8941_l24>;
0153 
0154                         extcon = <&smbb>;
0155                         qcom,init-seq = /bits/ 8 <0x1 0x64>;
0156                 };
0157         };
0158 };
0159 
0160 &pm8941_coincell {
0161         status = "okay";
0162         qcom,rset-ohms = <2100>;
0163         qcom,vset-millivolts = <3000>;
0164 };
0165 
0166 &pm8941_gpios {
0167         gpio_keys_pin_a: gpio-keys-active-state {
0168                 pins = "gpio2", "gpio3", "gpio4", "gpio5";
0169                 function = "normal";
0170 
0171                 bias-pull-up;
0172                 power-source = <PM8941_GPIO_S3>;
0173         };
0174 };
0175 
0176 &pm8941_lpg {
0177         status = "okay";
0178 
0179         qcom,power-source = <1>;
0180 
0181         rgb-led {
0182                 color = <LED_COLOR_ID_RGB>;
0183                 function = LED_FUNCTION_STATUS;
0184 
0185                 #address-cells = <1>;
0186                 #size-cells = <0>;
0187 
0188                 led@5 {
0189                         reg = <5>;
0190                         color = <LED_COLOR_ID_BLUE>;
0191                 };
0192 
0193                 led@6 {
0194                         reg = <6>;
0195                         color = <LED_COLOR_ID_GREEN>;
0196                 };
0197 
0198                 led@7 {
0199                         reg = <7>;
0200                         color = <LED_COLOR_ID_RED>;
0201                 };
0202         };
0203 };
0204 
0205 &pm8941_wled {
0206         status = "okay";
0207 
0208         qcom,cs-out;
0209         qcom,current-limit = <20>;
0210         qcom,current-boost-limit = <805>;
0211         qcom,switching-freq = <1600>;
0212         qcom,ovp = <29>;
0213         qcom,num-strings = <2>;
0214 };
0215 
0216 &rpm_requests {
0217         pm8841-regulators {
0218                 compatible = "qcom,rpm-pm8841-regulators";
0219 
0220                 pm8841_s1: s1 {
0221                         regulator-min-microvolt = <675000>;
0222                         regulator-max-microvolt = <1050000>;
0223                 };
0224 
0225                 pm8841_s2: s2 {
0226                         regulator-min-microvolt = <500000>;
0227                         regulator-max-microvolt = <1050000>;
0228                 };
0229 
0230                 pm8841_s3: s3 {
0231                         regulator-min-microvolt = <500000>;
0232                         regulator-max-microvolt = <1050000>;
0233                 };
0234 
0235                 pm8841_s4: s4 {
0236                         regulator-min-microvolt = <500000>;
0237                         regulator-max-microvolt = <1050000>;
0238                 };
0239         };
0240 
0241         pm8941-regulators {
0242                 compatible = "qcom,rpm-pm8941-regulators";
0243 
0244                 vdd_l1_l3-supply = <&pm8941_s1>;
0245                 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
0246                 vdd_l4_l11-supply = <&pm8941_s1>;
0247                 vdd_l5_l7-supply = <&pm8941_s2>;
0248                 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
0249                 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
0250                 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
0251                 vdd_l21-supply = <&vreg_boost>;
0252 
0253                 pm8941_s1: s1 {
0254                         regulator-min-microvolt = <1300000>;
0255                         regulator-max-microvolt = <1300000>;
0256                         regulator-always-on;
0257                         regulator-boot-on;
0258                 };
0259 
0260                 pm8941_s2: s2 {
0261                         regulator-min-microvolt = <2150000>;
0262                         regulator-max-microvolt = <2150000>;
0263                         regulator-boot-on;
0264                 };
0265 
0266                 pm8941_s3: s3 {
0267                         regulator-min-microvolt = <1800000>;
0268                         regulator-max-microvolt = <1800000>;
0269                         regulator-always-on;
0270                         regulator-boot-on;
0271                 };
0272 
0273                 pm8941_s4: s4 {
0274                         regulator-min-microvolt = <5000000>;
0275                         regulator-max-microvolt = <5000000>;
0276                 };
0277 
0278                 pm8941_l1: l1 {
0279                         regulator-min-microvolt = <1225000>;
0280                         regulator-max-microvolt = <1225000>;
0281                         regulator-always-on;
0282                         regulator-boot-on;
0283                 };
0284 
0285                 pm8941_l2: l2 {
0286                         regulator-min-microvolt = <1200000>;
0287                         regulator-max-microvolt = <1200000>;
0288                 };
0289 
0290                 pm8941_l3: l3 {
0291                         regulator-min-microvolt = <1200000>;
0292                         regulator-max-microvolt = <1200000>;
0293                 };
0294 
0295                 pm8941_l4: l4 {
0296                         regulator-min-microvolt = <1225000>;
0297                         regulator-max-microvolt = <1225000>;
0298                 };
0299 
0300                 pm8941_l5: l5 {
0301                         regulator-min-microvolt = <1800000>;
0302                         regulator-max-microvolt = <1800000>;
0303                 };
0304 
0305                 pm8941_l6: l6 {
0306                         regulator-min-microvolt = <1800000>;
0307                         regulator-max-microvolt = <1800000>;
0308                         regulator-boot-on;
0309                 };
0310 
0311                 pm8941_l7: l7 {
0312                         regulator-min-microvolt = <1800000>;
0313                         regulator-max-microvolt = <1800000>;
0314                         regulator-boot-on;
0315                 };
0316 
0317                 pm8941_l8: l8 {
0318                         regulator-min-microvolt = <1800000>;
0319                         regulator-max-microvolt = <1800000>;
0320                 };
0321 
0322                 pm8941_l9: l9 {
0323                         regulator-min-microvolt = <1800000>;
0324                         regulator-max-microvolt = <2950000>;
0325                 };
0326 
0327                 pm8941_l11: l11 {
0328                         regulator-min-microvolt = <1300000>;
0329                         regulator-max-microvolt = <1350000>;
0330                 };
0331 
0332                 pm8941_l12: l12 {
0333                         regulator-min-microvolt = <1800000>;
0334                         regulator-max-microvolt = <1800000>;
0335                         regulator-always-on;
0336                         regulator-boot-on;
0337                 };
0338 
0339                 pm8941_l13: l13 {
0340                         regulator-min-microvolt = <1800000>;
0341                         regulator-max-microvolt = <2950000>;
0342                         regulator-boot-on;
0343                 };
0344 
0345                 pm8941_l14: l14 {
0346                         regulator-min-microvolt = <1800000>;
0347                         regulator-max-microvolt = <1800000>;
0348                 };
0349 
0350                 pm8941_l15: l15 {
0351                         regulator-min-microvolt = <2050000>;
0352                         regulator-max-microvolt = <2050000>;
0353                 };
0354 
0355                 pm8941_l16: l16 {
0356                         regulator-min-microvolt = <2700000>;
0357                         regulator-max-microvolt = <2700000>;
0358                 };
0359 
0360                 pm8941_l17: l17 {
0361                         regulator-min-microvolt = <2700000>;
0362                         regulator-max-microvolt = <2700000>;
0363                 };
0364 
0365                 pm8941_l18: l18 {
0366                         regulator-min-microvolt = <2850000>;
0367                         regulator-max-microvolt = <2850000>;
0368                 };
0369 
0370                 pm8941_l19: l19 {
0371                         regulator-min-microvolt = <3300000>;
0372                         regulator-max-microvolt = <3300000>;
0373                 };
0374 
0375                 pm8941_l20: l20 {
0376                         regulator-min-microvolt = <2950000>;
0377                         regulator-max-microvolt = <2950000>;
0378                         regulator-system-load = <200000>;
0379                         regulator-allow-set-load;
0380                         regulator-boot-on;
0381                 };
0382 
0383                 pm8941_l21: l21 {
0384                         regulator-min-microvolt = <2950000>;
0385                         regulator-max-microvolt = <2950000>;
0386                         regulator-boot-on;
0387                 };
0388 
0389                 pm8941_l22: l22 {
0390                         regulator-min-microvolt = <3000000>;
0391                         regulator-max-microvolt = <3000000>;
0392                 };
0393 
0394                 pm8941_l23: l23 {
0395                         regulator-min-microvolt = <2800000>;
0396                         regulator-max-microvolt = <2800000>;
0397                 };
0398 
0399                 pm8941_l24: l24 {
0400                         regulator-min-microvolt = <3075000>;
0401                         regulator-max-microvolt = <3075000>;
0402                         regulator-boot-on;
0403                 };
0404 
0405                 pm8941_lvs3: lvs3 {};
0406         };
0407 };
0408 
0409 &sdhc_1 {
0410         status = "okay";
0411 
0412         vmmc-supply = <&pm8941_l20>;
0413         vqmmc-supply = <&pm8941_s3>;
0414 
0415         pinctrl-names = "default", "sleep";
0416         pinctrl-0 = <&sdc1_on>;
0417         pinctrl-1 = <&sdc1_off>;
0418 };
0419 
0420 &sdhc_2 {
0421         status = "okay";
0422 
0423         vmmc-supply = <&pm8941_l21>;
0424         vqmmc-supply = <&pm8941_l13>;
0425 
0426         cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
0427 
0428         pinctrl-names = "default", "sleep";
0429         pinctrl-0 = <&sdc2_on>;
0430         pinctrl-1 = <&sdc2_off>;
0431 };
0432 
0433 &smbb {
0434         qcom,fast-charge-safe-current = <1500000>;
0435         qcom,fast-charge-current-limit = <1500000>;
0436         qcom,dc-current-limit = <1800000>;
0437         qcom,fast-charge-safe-voltage = <4400000>;
0438         qcom,fast-charge-high-threshold-voltage = <4350000>;
0439         qcom,fast-charge-low-threshold-voltage = <3400000>;
0440         qcom,auto-recharge-threshold-voltage = <4200000>;
0441         qcom,minimum-input-voltage = <4300000>;
0442 };
0443 
0444 &tlmm {
0445         ts_int_pin: touch-int {
0446                 pins = "gpio61";
0447                 function = "gpio";
0448                 drive-strength = <2>;
0449                 bias-disable;
0450                 input-enable;
0451         };
0452 
0453         sdc1_on: sdc1-on {
0454                 clk {
0455                         pins = "sdc1_clk";
0456                         drive-strength = <16>;
0457                         bias-disable;
0458                 };
0459 
0460                 cmd-data {
0461                         pins = "sdc1_cmd", "sdc1_data";
0462                         drive-strength = <10>;
0463                         bias-pull-up;
0464                 };
0465         };
0466 
0467         sdc2_on: sdc-on {
0468                 clk {
0469                         pins = "sdc2_clk";
0470                         drive-strength = <10>;
0471                         bias-disable;
0472                 };
0473 
0474                 cmd-data {
0475                         pins = "sdc2_cmd", "sdc2_data";
0476                         drive-strength = <6>;
0477                         bias-pull-up;
0478                 };
0479 
0480                 cd {
0481                         pins = "gpio62";
0482                         function = "gpio";
0483                         drive-strength = <2>;
0484                         bias-disable;
0485                 };
0486         };
0487 };