Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 // Copyright (C) 2020 Stephan Gerhold
0003 
0004 /dts-v1/;
0005 
0006 #include "msm8916-pm8916.dtsi"
0007 #include <dt-bindings/gpio/gpio.h>
0008 #include <dt-bindings/input/input.h>
0009 #include <dt-bindings/leds/common.h>
0010 
0011 / {
0012         model = "Xiaomi Redmi 2 (Wingtech WT88047)";
0013         compatible = "wingtech,wt88047", "qcom,msm8916";
0014         chassis-type = "handset";
0015 
0016         aliases {
0017                 serial0 = &blsp1_uart2;
0018         };
0019 
0020         chosen {
0021                 stdout-path = "serial0";
0022         };
0023 
0024         gpio-keys {
0025                 compatible = "gpio-keys";
0026 
0027                 pinctrl-names = "default";
0028                 pinctrl-0 = <&gpio_keys_default>;
0029 
0030                 label = "GPIO Buttons";
0031 
0032                 button-volume-up {
0033                         label = "Volume Up";
0034                         gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
0035                         linux,code = <KEY_VOLUMEUP>;
0036                 };
0037         };
0038 
0039         usb_id: usb-id {
0040                 compatible = "linux,extcon-usb-gpio";
0041                 id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
0042                 pinctrl-names = "default";
0043                 pinctrl-0 = <&usb_id_default>;
0044         };
0045 };
0046 
0047 &blsp_i2c2 {
0048         status = "okay";
0049 
0050         imu@68 {
0051                 compatible = "invensense,mpu6880";
0052                 reg = <0x68>;
0053 
0054                 interrupt-parent = <&msmgpio>;
0055                 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
0056 
0057                 vdd-supply = <&pm8916_l17>;
0058                 vddio-supply = <&pm8916_l6>;
0059 
0060                 pinctrl-names = "default";
0061                 pinctrl-0 = <&imu_default>;
0062 
0063                 mount-matrix = "1",  "0", "0",
0064                                "0", "-1", "0",
0065                                "0",  "0", "1";
0066         };
0067 };
0068 
0069 &blsp_i2c5 {
0070         status = "okay";
0071 
0072         touchscreen@38 {
0073                 /* Likely some other model but works just fine with this one */
0074                 compatible = "edt,edt-ft5506";
0075                 reg = <0x38>;
0076 
0077                 interrupt-parent = <&msmgpio>;
0078                 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
0079 
0080                 reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
0081 
0082                 vcc-supply = <&pm8916_l17>;
0083                 iovcc-supply = <&pm8916_l6>;
0084 
0085                 touchscreen-size-x = <720>;
0086                 touchscreen-size-y = <1280>;
0087 
0088                 pinctrl-names = "default";
0089                 pinctrl-0 = <&touchscreen_default>;
0090         };
0091 };
0092 
0093 &blsp_i2c6 {
0094         status = "okay";
0095 
0096         led-controller@45 {
0097                 compatible = "awinic,aw2013";
0098                 reg = <0x45>;
0099                 #address-cells = <1>;
0100                 #size-cells = <0>;
0101 
0102                 vcc-supply = <&pm8916_l16>;
0103 
0104                 led@0 {
0105                         reg = <0>;
0106                         led-max-microamp = <15000>;
0107                         function = LED_FUNCTION_INDICATOR;
0108                         color = <LED_COLOR_ID_RED>;
0109                 };
0110 
0111                 led@1 {
0112                         reg = <1>;
0113                         led-max-microamp = <15000>;
0114                         function = LED_FUNCTION_INDICATOR;
0115                         color = <LED_COLOR_ID_GREEN>;
0116                 };
0117 
0118                 led@2 {
0119                         reg = <2>;
0120                         led-max-microamp = <15000>;
0121                         function = LED_FUNCTION_INDICATOR;
0122                         color = <LED_COLOR_ID_BLUE>;
0123                 };
0124         };
0125 };
0126 
0127 &blsp1_uart2 {
0128         status = "okay";
0129 };
0130 
0131 &pm8916_resin {
0132         status = "okay";
0133         linux,code = <KEY_VOLUMEDOWN>;
0134 };
0135 
0136 &pm8916_vib {
0137         status = "okay";
0138 };
0139 
0140 &pronto {
0141         status = "okay";
0142 };
0143 
0144 &sdhc_1 {
0145         status = "okay";
0146 
0147         pinctrl-names = "default", "sleep";
0148         pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
0149         pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
0150 };
0151 
0152 &sdhc_2 {
0153         status = "okay";
0154 
0155         pinctrl-names = "default", "sleep";
0156         pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
0157         pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
0158 
0159         non-removable;
0160 };
0161 
0162 &usb {
0163         status = "okay";
0164         extcon = <&usb_id>, <&usb_id>;
0165 };
0166 
0167 &usb_hs_phy {
0168         extcon = <&usb_id>;
0169 };
0170 
0171 &smd_rpm_regulators {
0172         vdd_l1_l2_l3-supply = <&pm8916_s3>;
0173         vdd_l4_l5_l6-supply = <&pm8916_s4>;
0174         vdd_l7-supply = <&pm8916_s4>;
0175 
0176         s3 {
0177                 regulator-min-microvolt = <1200000>;
0178                 regulator-max-microvolt = <1300000>;
0179         };
0180 
0181         s4 {
0182                 regulator-min-microvolt = <1800000>;
0183                 regulator-max-microvolt = <2100000>;
0184         };
0185 
0186         l1 {
0187                 regulator-min-microvolt = <1225000>;
0188                 regulator-max-microvolt = <1225000>;
0189         };
0190 
0191         l2 {
0192                 regulator-min-microvolt = <1200000>;
0193                 regulator-max-microvolt = <1200000>;
0194         };
0195 
0196         l4 {
0197                 regulator-min-microvolt = <2050000>;
0198                 regulator-max-microvolt = <2050000>;
0199         };
0200 
0201         l5 {
0202                 regulator-min-microvolt = <1800000>;
0203                 regulator-max-microvolt = <1800000>;
0204         };
0205 
0206         l6 {
0207                 regulator-min-microvolt = <1800000>;
0208                 regulator-max-microvolt = <1800000>;
0209         };
0210 
0211         l7 {
0212                 regulator-min-microvolt = <1800000>;
0213                 regulator-max-microvolt = <1800000>;
0214         };
0215 
0216         l8 {
0217                 regulator-min-microvolt = <2850000>;
0218                 regulator-max-microvolt = <2900000>;
0219         };
0220 
0221         l9 {
0222                 regulator-min-microvolt = <3300000>;
0223                 regulator-max-microvolt = <3300000>;
0224         };
0225 
0226         l10 {
0227                 regulator-min-microvolt = <2700000>;
0228                 regulator-max-microvolt = <2800000>;
0229         };
0230 
0231         l11 {
0232                 regulator-min-microvolt = <2950000>;
0233                 regulator-max-microvolt = <2950000>;
0234                 regulator-allow-set-load;
0235                 regulator-system-load = <200000>;
0236         };
0237 
0238         l12 {
0239                 regulator-min-microvolt = <1800000>;
0240                 regulator-max-microvolt = <2950000>;
0241         };
0242 
0243         l13 {
0244                 regulator-min-microvolt = <3075000>;
0245                 regulator-max-microvolt = <3075000>;
0246         };
0247 
0248         l14 {
0249                 regulator-min-microvolt = <1800000>;
0250                 regulator-max-microvolt = <3300000>;
0251         };
0252 
0253         l15 {
0254                 regulator-min-microvolt = <1800000>;
0255                 regulator-max-microvolt = <3300000>;
0256         };
0257 
0258         l16 {
0259                 regulator-min-microvolt = <2800000>;
0260                 regulator-max-microvolt = <3300000>;
0261         };
0262 
0263         l17 {
0264                 regulator-min-microvolt = <2850000>;
0265                 regulator-max-microvolt = <2850000>;
0266         };
0267 
0268         l18 {
0269                 regulator-min-microvolt = <2700000>;
0270                 regulator-max-microvolt = <2700000>;
0271         };
0272 };
0273 
0274 &msmgpio {
0275         gpio_keys_default: gpio-keys-default {
0276                 pins = "gpio107";
0277                 function = "gpio";
0278 
0279                 drive-strength = <2>;
0280                 bias-pull-up;
0281         };
0282 
0283         imu_default: imu-default {
0284                 pins = "gpio115";
0285                 function = "gpio";
0286 
0287                 drive-strength = <2>;
0288                 bias-disable;
0289         };
0290 
0291         touchscreen_default: touchscreen-default {
0292                 pins = "gpio13";
0293                 function = "gpio";
0294 
0295                 drive-strength = <2>;
0296                 bias-pull-up;
0297 
0298                 reset {
0299                         pins = "gpio12";
0300                         function = "gpio";
0301 
0302                         drive-strength = <2>;
0303                         bias-disable;
0304                 };
0305         };
0306 
0307         usb_id_default: usb-id-default {
0308                 pins = "gpio110";
0309                 function = "gpio";
0310 
0311                 drive-strength = <8>;
0312                 bias-pull-up;
0313         };
0314 };