1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (C) 2020 Stephan Gerhold
6 #include "msm8916-pm8916.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/leds/common.h>
12 model = "Xiaomi Redmi 2 (Wingtech WT88047)";
13 compatible = "wingtech,wt88047", "qcom,msm8916";
16 serial0 = &blsp1_uart2;
20 stdout-path = "serial0";
24 compatible = "gpio-keys";
26 pinctrl-names = "default";
27 pinctrl-0 = <&gpio_keys_default>;
29 label = "GPIO Buttons";
33 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_VOLUMEUP>;
39 compatible = "linux,extcon-usb-gpio";
40 id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
41 pinctrl-names = "default";
42 pinctrl-0 = <&usb_id_default>;
50 compatible = "invensense,mpu6880";
53 interrupt-parent = <&msmgpio>;
54 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
56 vdd-supply = <&pm8916_l17>;
57 vddio-supply = <&pm8916_l6>;
59 pinctrl-names = "default";
60 pinctrl-0 = <&imu_default>;
62 mount-matrix = "1", "0", "0",
72 /* Likely some other model but works just fine with this one */
73 compatible = "edt,edt-ft5506";
76 interrupt-parent = <&msmgpio>;
77 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
79 reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
81 vcc-supply = <&pm8916_l17>;
82 iovcc-supply = <&pm8916_l6>;
84 touchscreen-size-x = <720>;
85 touchscreen-size-y = <1280>;
87 pinctrl-names = "default";
88 pinctrl-0 = <&touchscreen_default>;
96 compatible = "awinic,aw2013";
101 vcc-supply = <&pm8916_l16>;
105 led-max-microamp = <15000>;
106 function = LED_FUNCTION_INDICATOR;
107 color = <LED_COLOR_ID_RED>;
112 led-max-microamp = <15000>;
113 function = LED_FUNCTION_INDICATOR;
114 color = <LED_COLOR_ID_GREEN>;
119 led-max-microamp = <15000>;
120 function = LED_FUNCTION_INDICATOR;
121 color = <LED_COLOR_ID_BLUE>;
132 linux,code = <KEY_VOLUMEDOWN>;
146 pinctrl-names = "default", "sleep";
147 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
148 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
154 pinctrl-names = "default", "sleep";
155 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
156 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
163 extcon = <&usb_id>, <&usb_id>;
170 &smd_rpm_regulators {
171 vdd_l1_l2_l3-supply = <&pm8916_s3>;
172 vdd_l4_l5_l6-supply = <&pm8916_s4>;
173 vdd_l7-supply = <&pm8916_s4>;
176 regulator-min-microvolt = <1200000>;
177 regulator-max-microvolt = <1300000>;
181 regulator-min-microvolt = <1800000>;
182 regulator-max-microvolt = <2100000>;
186 regulator-min-microvolt = <1225000>;
187 regulator-max-microvolt = <1225000>;
191 regulator-min-microvolt = <1200000>;
192 regulator-max-microvolt = <1200000>;
196 regulator-min-microvolt = <2050000>;
197 regulator-max-microvolt = <2050000>;
201 regulator-min-microvolt = <1800000>;
202 regulator-max-microvolt = <1800000>;
206 regulator-min-microvolt = <1800000>;
207 regulator-max-microvolt = <1800000>;
211 regulator-min-microvolt = <1800000>;
212 regulator-max-microvolt = <1800000>;
216 regulator-min-microvolt = <2850000>;
217 regulator-max-microvolt = <2900000>;
221 regulator-min-microvolt = <3300000>;
222 regulator-max-microvolt = <3300000>;
226 regulator-min-microvolt = <2700000>;
227 regulator-max-microvolt = <2800000>;
231 regulator-min-microvolt = <2950000>;
232 regulator-max-microvolt = <2950000>;
233 regulator-allow-set-load;
234 regulator-system-load = <200000>;
238 regulator-min-microvolt = <1800000>;
239 regulator-max-microvolt = <2950000>;
243 regulator-min-microvolt = <3075000>;
244 regulator-max-microvolt = <3075000>;
248 regulator-min-microvolt = <1800000>;
249 regulator-max-microvolt = <3300000>;
253 regulator-min-microvolt = <1800000>;
254 regulator-max-microvolt = <3300000>;
258 regulator-min-microvolt = <2800000>;
259 regulator-max-microvolt = <3300000>;
263 regulator-min-microvolt = <2850000>;
264 regulator-max-microvolt = <2850000>;
268 regulator-min-microvolt = <2700000>;
269 regulator-max-microvolt = <2700000>;
274 gpio_keys_default: gpio-keys-default {
278 drive-strength = <2>;
282 imu_default: imu-default {
286 drive-strength = <2>;
290 touchscreen_default: touchscreen-default {
294 drive-strength = <2>;
301 drive-strength = <2>;
306 usb_id_default: usb-id-default {
310 drive-strength = <8>;