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";
14 chassis-type = "handset";
17 serial0 = &blsp1_uart2;
21 stdout-path = "serial0";
25 compatible = "gpio-keys";
27 pinctrl-names = "default";
28 pinctrl-0 = <&gpio_keys_default>;
30 label = "GPIO Buttons";
34 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_VOLUMEUP>;
40 compatible = "linux,extcon-usb-gpio";
41 id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
42 pinctrl-names = "default";
43 pinctrl-0 = <&usb_id_default>;
51 compatible = "invensense,mpu6880";
54 interrupt-parent = <&msmgpio>;
55 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
57 vdd-supply = <&pm8916_l17>;
58 vddio-supply = <&pm8916_l6>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&imu_default>;
63 mount-matrix = "1", "0", "0",
73 /* Likely some other model but works just fine with this one */
74 compatible = "edt,edt-ft5506";
77 interrupt-parent = <&msmgpio>;
78 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
80 reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
82 vcc-supply = <&pm8916_l17>;
83 iovcc-supply = <&pm8916_l6>;
85 touchscreen-size-x = <720>;
86 touchscreen-size-y = <1280>;
88 pinctrl-names = "default";
89 pinctrl-0 = <&touchscreen_default>;
97 compatible = "awinic,aw2013";
102 vcc-supply = <&pm8916_l16>;
106 led-max-microamp = <15000>;
107 function = LED_FUNCTION_INDICATOR;
108 color = <LED_COLOR_ID_RED>;
113 led-max-microamp = <15000>;
114 function = LED_FUNCTION_INDICATOR;
115 color = <LED_COLOR_ID_GREEN>;
120 led-max-microamp = <15000>;
121 function = LED_FUNCTION_INDICATOR;
122 color = <LED_COLOR_ID_BLUE>;
133 linux,code = <KEY_VOLUMEDOWN>;
147 pinctrl-names = "default", "sleep";
148 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
149 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
155 pinctrl-names = "default", "sleep";
156 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
157 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
164 extcon = <&usb_id>, <&usb_id>;
171 &smd_rpm_regulators {
172 vdd_l1_l2_l3-supply = <&pm8916_s3>;
173 vdd_l4_l5_l6-supply = <&pm8916_s4>;
174 vdd_l7-supply = <&pm8916_s4>;
177 regulator-min-microvolt = <1200000>;
178 regulator-max-microvolt = <1300000>;
182 regulator-min-microvolt = <1800000>;
183 regulator-max-microvolt = <2100000>;
187 regulator-min-microvolt = <1225000>;
188 regulator-max-microvolt = <1225000>;
192 regulator-min-microvolt = <1200000>;
193 regulator-max-microvolt = <1200000>;
197 regulator-min-microvolt = <2050000>;
198 regulator-max-microvolt = <2050000>;
202 regulator-min-microvolt = <1800000>;
203 regulator-max-microvolt = <1800000>;
207 regulator-min-microvolt = <1800000>;
208 regulator-max-microvolt = <1800000>;
212 regulator-min-microvolt = <1800000>;
213 regulator-max-microvolt = <1800000>;
217 regulator-min-microvolt = <2850000>;
218 regulator-max-microvolt = <2900000>;
222 regulator-min-microvolt = <3300000>;
223 regulator-max-microvolt = <3300000>;
227 regulator-min-microvolt = <2700000>;
228 regulator-max-microvolt = <2800000>;
232 regulator-min-microvolt = <2950000>;
233 regulator-max-microvolt = <2950000>;
234 regulator-allow-set-load;
235 regulator-system-load = <200000>;
239 regulator-min-microvolt = <1800000>;
240 regulator-max-microvolt = <2950000>;
244 regulator-min-microvolt = <3075000>;
245 regulator-max-microvolt = <3075000>;
249 regulator-min-microvolt = <1800000>;
250 regulator-max-microvolt = <3300000>;
254 regulator-min-microvolt = <1800000>;
255 regulator-max-microvolt = <3300000>;
259 regulator-min-microvolt = <2800000>;
260 regulator-max-microvolt = <3300000>;
264 regulator-min-microvolt = <2850000>;
265 regulator-max-microvolt = <2850000>;
269 regulator-min-microvolt = <2700000>;
270 regulator-max-microvolt = <2700000>;
275 gpio_keys_default: gpio-keys-default {
279 drive-strength = <2>;
283 imu_default: imu-default {
287 drive-strength = <2>;
291 touchscreen_default: touchscreen-default {
295 drive-strength = <2>;
302 drive-strength = <2>;
307 usb_id_default: usb-id-default {
311 drive-strength = <8>;