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 mmc0 = &sdhc_1; /* eMMC */
20 mmc1 = &sdhc_2; /* SD card */
21 serial0 = &blsp_uart2;
25 stdout-path = "serial0";
28 flash-led-controller {
29 compatible = "ocs,ocp8110";
30 enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
31 flash-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
33 pinctrl-names = "default";
34 pinctrl-0 = <&camera_flash_default>;
37 function = LED_FUNCTION_FLASH;
38 color = <LED_COLOR_ID_WHITE>;
43 compatible = "gpio-keys";
45 pinctrl-names = "default";
46 pinctrl-0 = <&gpio_keys_default>;
48 label = "GPIO Buttons";
52 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_VOLUMEUP>;
58 compatible = "linux,extcon-usb-gpio";
59 id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&usb_id_default>;
69 compatible = "invensense,mpu6880";
72 interrupt-parent = <&tlmm>;
73 interrupts = <115 IRQ_TYPE_EDGE_RISING>;
75 vdd-supply = <&pm8916_l17>;
76 vddio-supply = <&pm8916_l6>;
78 pinctrl-names = "default";
79 pinctrl-0 = <&imu_default>;
81 mount-matrix = "1", "0", "0",
91 /* Likely some other model but works just fine with this one */
92 compatible = "edt,edt-ft5506";
95 interrupt-parent = <&tlmm>;
96 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
98 reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
100 vcc-supply = <&pm8916_l17>;
101 iovcc-supply = <&pm8916_l6>;
103 touchscreen-size-x = <720>;
104 touchscreen-size-y = <1280>;
106 pinctrl-names = "default";
107 pinctrl-0 = <&touchscreen_default>;
115 compatible = "awinic,aw2013";
117 #address-cells = <1>;
120 vcc-supply = <&pm8916_l16>;
124 led-max-microamp = <15000>;
125 function = LED_FUNCTION_INDICATOR;
126 color = <LED_COLOR_ID_RED>;
131 led-max-microamp = <15000>;
132 function = LED_FUNCTION_INDICATOR;
133 color = <LED_COLOR_ID_GREEN>;
138 led-max-microamp = <15000>;
139 function = LED_FUNCTION_INDICATOR;
140 color = <LED_COLOR_ID_BLUE>;
151 linux,code = <KEY_VOLUMEDOWN>;
154 &pm8916_rpm_regulators {
157 * L16 is only used for AW2013 which is fine with 2.5-3.3V.
158 * Use the recommended typical voltage of 2.8V as minimum.
160 regulator-min-microvolt = <2800000>;
161 regulator-max-microvolt = <3300000>;
165 regulator-min-microvolt = <2850000>;
166 regulator-max-microvolt = <2850000>;
185 extcon = <&usb_id>, <&usb_id>;
197 compatible = "qcom,wcn3620";
201 camera_flash_default: camera-flash-default-state {
202 pins = "gpio31", "gpio32";
205 drive-strength = <2>;
209 gpio_keys_default: gpio-keys-default-state {
213 drive-strength = <2>;
217 imu_default: imu-default-state {
221 drive-strength = <2>;
225 touchscreen_default: touchscreen-default-state {
230 drive-strength = <2>;
237 drive-strength = <2>;
242 usb_id_default: usb-id-default-state {
246 drive-strength = <8>;