1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2020 Stephan Gerhold
8 #include "msm8916-pm8916.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
14 model = "Xiaomi Redmi 2 (Wingtech WT88047)";
15 compatible = "wingtech,wt88047", "qcom,msm8916";
16 chassis-type = "handset";
19 serial0 = &blsp1_uart2;
23 stdout-path = "serial0";
26 flash-led-controller {
27 compatible = "ocs,ocp8110";
28 enable-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>;
29 flash-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
31 pinctrl-names = "default";
32 pinctrl-0 = <&camera_flash_default>;
35 function = LED_FUNCTION_FLASH;
36 color = <LED_COLOR_ID_WHITE>;
41 compatible = "gpio-keys";
43 pinctrl-names = "default";
44 pinctrl-0 = <&gpio_keys_default>;
46 label = "GPIO Buttons";
50 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_VOLUMEUP>;
56 compatible = "linux,extcon-usb-gpio";
57 id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
58 pinctrl-names = "default";
59 pinctrl-0 = <&usb_id_default>;
67 compatible = "invensense,mpu6880";
70 interrupt-parent = <&msmgpio>;
71 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
73 vdd-supply = <&pm8916_l17>;
74 vddio-supply = <&pm8916_l6>;
76 pinctrl-names = "default";
77 pinctrl-0 = <&imu_default>;
79 mount-matrix = "1", "0", "0",
89 /* Likely some other model but works just fine with this one */
90 compatible = "edt,edt-ft5506";
93 interrupt-parent = <&msmgpio>;
94 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
96 reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
98 vcc-supply = <&pm8916_l17>;
99 iovcc-supply = <&pm8916_l6>;
101 touchscreen-size-x = <720>;
102 touchscreen-size-y = <1280>;
104 pinctrl-names = "default";
105 pinctrl-0 = <&touchscreen_default>;
113 compatible = "awinic,aw2013";
115 #address-cells = <1>;
118 vcc-supply = <&pm8916_l16>;
122 led-max-microamp = <15000>;
123 function = LED_FUNCTION_INDICATOR;
124 color = <LED_COLOR_ID_RED>;
129 led-max-microamp = <15000>;
130 function = LED_FUNCTION_INDICATOR;
131 color = <LED_COLOR_ID_GREEN>;
136 led-max-microamp = <15000>;
137 function = LED_FUNCTION_INDICATOR;
138 color = <LED_COLOR_ID_BLUE>;
149 linux,code = <KEY_VOLUMEDOWN>;
163 pinctrl-names = "default", "sleep";
164 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
165 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
171 pinctrl-names = "default", "sleep";
172 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
173 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
180 extcon = <&usb_id>, <&usb_id>;
187 &smd_rpm_regulators {
188 vdd_l1_l2_l3-supply = <&pm8916_s3>;
189 vdd_l4_l5_l6-supply = <&pm8916_s4>;
190 vdd_l7-supply = <&pm8916_s4>;
193 regulator-min-microvolt = <1200000>;
194 regulator-max-microvolt = <1300000>;
198 regulator-min-microvolt = <1800000>;
199 regulator-max-microvolt = <2100000>;
203 regulator-min-microvolt = <1225000>;
204 regulator-max-microvolt = <1225000>;
208 regulator-min-microvolt = <1200000>;
209 regulator-max-microvolt = <1200000>;
213 regulator-min-microvolt = <2050000>;
214 regulator-max-microvolt = <2050000>;
218 regulator-min-microvolt = <1800000>;
219 regulator-max-microvolt = <1800000>;
223 regulator-min-microvolt = <1800000>;
224 regulator-max-microvolt = <1800000>;
228 regulator-min-microvolt = <1800000>;
229 regulator-max-microvolt = <1800000>;
233 regulator-min-microvolt = <2850000>;
234 regulator-max-microvolt = <2900000>;
238 regulator-min-microvolt = <3300000>;
239 regulator-max-microvolt = <3300000>;
243 regulator-min-microvolt = <2700000>;
244 regulator-max-microvolt = <2800000>;
248 regulator-min-microvolt = <2950000>;
249 regulator-max-microvolt = <2950000>;
250 regulator-allow-set-load;
251 regulator-system-load = <200000>;
255 regulator-min-microvolt = <1800000>;
256 regulator-max-microvolt = <2950000>;
260 regulator-min-microvolt = <3075000>;
261 regulator-max-microvolt = <3075000>;
265 regulator-min-microvolt = <1800000>;
266 regulator-max-microvolt = <3300000>;
270 regulator-min-microvolt = <1800000>;
271 regulator-max-microvolt = <3300000>;
275 regulator-min-microvolt = <2800000>;
276 regulator-max-microvolt = <3300000>;
280 regulator-min-microvolt = <2850000>;
281 regulator-max-microvolt = <2850000>;
285 regulator-min-microvolt = <2700000>;
286 regulator-max-microvolt = <2700000>;
291 camera_flash_default: camera-flash-default-state {
292 pins = "gpio31", "gpio32";
295 drive-strength = <2>;
299 gpio_keys_default: gpio-keys-default-state {
303 drive-strength = <2>;
307 imu_default: imu-default-state {
311 drive-strength = <2>;
315 touchscreen_default: touchscreen-default-state {
320 drive-strength = <2>;
327 drive-strength = <2>;
332 usb_id_default: usb-id-default-state {
336 drive-strength = <8>;