1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2020 Stephan Gerhold 4 */ 5 6/dts-v1/; 7 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> 12 13/ { 14 model = "Xiaomi Redmi 2 (Wingtech WT88047)"; 15 compatible = "wingtech,wt88047", "qcom,msm8916"; 16 chassis-type = "handset"; 17 18 aliases { 19 mmc0 = &sdhc_1; /* eMMC */ 20 mmc1 = &sdhc_2; /* SD card */ 21 serial0 = &blsp_uart2; 22 }; 23 24 chosen { 25 stdout-path = "serial0"; 26 }; 27 28 flash-led-controller { 29 compatible = "ocs,ocp8110"; 30 enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; 31 flash-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; 32 33 pinctrl-names = "default"; 34 pinctrl-0 = <&camera_flash_default>; 35 36 flash_led: led { 37 function = LED_FUNCTION_FLASH; 38 color = <LED_COLOR_ID_WHITE>; 39 }; 40 }; 41 42 gpio-keys { 43 compatible = "gpio-keys"; 44 45 pinctrl-names = "default"; 46 pinctrl-0 = <&gpio_keys_default>; 47 48 label = "GPIO Buttons"; 49 50 button-volume-up { 51 label = "Volume Up"; 52 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; 53 linux,code = <KEY_VOLUMEUP>; 54 }; 55 }; 56 57 usb_id: usb-id { 58 compatible = "linux,extcon-usb-gpio"; 59 id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; 60 pinctrl-names = "default"; 61 pinctrl-0 = <&usb_id_default>; 62 }; 63}; 64 65&blsp_i2c2 { 66 status = "okay"; 67 68 imu@68 { 69 compatible = "invensense,mpu6880"; 70 reg = <0x68>; 71 72 interrupt-parent = <&tlmm>; 73 interrupts = <115 IRQ_TYPE_EDGE_RISING>; 74 75 vdd-supply = <&pm8916_l17>; 76 vddio-supply = <&pm8916_l6>; 77 78 pinctrl-names = "default"; 79 pinctrl-0 = <&imu_default>; 80 81 mount-matrix = "1", "0", "0", 82 "0", "-1", "0", 83 "0", "0", "1"; 84 }; 85}; 86 87&blsp_i2c5 { 88 status = "okay"; 89 90 touchscreen@38 { 91 /* Likely some other model but works just fine with this one */ 92 compatible = "edt,edt-ft5506"; 93 reg = <0x38>; 94 95 interrupt-parent = <&tlmm>; 96 interrupts = <13 IRQ_TYPE_EDGE_FALLING>; 97 98 reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; 99 100 vcc-supply = <&pm8916_l17>; 101 iovcc-supply = <&pm8916_l6>; 102 103 touchscreen-size-x = <720>; 104 touchscreen-size-y = <1280>; 105 106 pinctrl-names = "default"; 107 pinctrl-0 = <&touchscreen_default>; 108 }; 109}; 110 111&blsp_i2c6 { 112 status = "okay"; 113 114 led-controller@45 { 115 compatible = "awinic,aw2013"; 116 reg = <0x45>; 117 #address-cells = <1>; 118 #size-cells = <0>; 119 120 vcc-supply = <&pm8916_l16>; 121 vio-supply = <&pm8916_l5>; 122 123 led@0 { 124 reg = <0>; 125 led-max-microamp = <15000>; 126 function = LED_FUNCTION_INDICATOR; 127 color = <LED_COLOR_ID_RED>; 128 }; 129 130 led@1 { 131 reg = <1>; 132 led-max-microamp = <15000>; 133 function = LED_FUNCTION_INDICATOR; 134 color = <LED_COLOR_ID_GREEN>; 135 }; 136 137 led@2 { 138 reg = <2>; 139 led-max-microamp = <15000>; 140 function = LED_FUNCTION_INDICATOR; 141 color = <LED_COLOR_ID_BLUE>; 142 }; 143 }; 144}; 145 146&blsp_uart2 { 147 status = "okay"; 148}; 149 150&pm8916_resin { 151 status = "okay"; 152 linux,code = <KEY_VOLUMEDOWN>; 153}; 154 155&pm8916_rpm_regulators { 156 pm8916_l16: l16 { 157 /* 158 * L16 is only used for AW2013 which is fine with 2.5-3.3V. 159 * Use the recommended typical voltage of 2.8V as minimum. 160 */ 161 regulator-min-microvolt = <2800000>; 162 regulator-max-microvolt = <3300000>; 163 }; 164 165 pm8916_l17: l17 { 166 regulator-min-microvolt = <2850000>; 167 regulator-max-microvolt = <2850000>; 168 }; 169}; 170 171&pm8916_vib { 172 status = "okay"; 173}; 174 175&sdhc_1 { 176 status = "okay"; 177}; 178 179&sdhc_2 { 180 status = "okay"; 181 non-removable; 182}; 183 184&usb { 185 status = "okay"; 186 extcon = <&usb_id>, <&usb_id>; 187}; 188 189&usb_hs_phy { 190 extcon = <&usb_id>; 191}; 192 193&wcnss { 194 status = "okay"; 195}; 196 197&wcnss_iris { 198 compatible = "qcom,wcn3620"; 199}; 200 201&tlmm { 202 camera_flash_default: camera-flash-default-state { 203 pins = "gpio31", "gpio32"; 204 function = "gpio"; 205 206 drive-strength = <2>; 207 bias-disable; 208 }; 209 210 gpio_keys_default: gpio-keys-default-state { 211 pins = "gpio107"; 212 function = "gpio"; 213 214 drive-strength = <2>; 215 bias-pull-up; 216 }; 217 218 imu_default: imu-default-state { 219 pins = "gpio115"; 220 function = "gpio"; 221 222 drive-strength = <2>; 223 bias-disable; 224 }; 225 226 touchscreen_default: touchscreen-default-state { 227 touchscreen-pins { 228 pins = "gpio13"; 229 function = "gpio"; 230 231 drive-strength = <2>; 232 bias-pull-up; 233 }; 234 reset-pins { 235 pins = "gpio12"; 236 function = "gpio"; 237 238 drive-strength = <2>; 239 bias-disable; 240 }; 241 }; 242 243 usb_id_default: usb-id-default-state { 244 pins = "gpio110"; 245 function = "gpio"; 246 247 drive-strength = <8>; 248 bias-pull-up; 249 }; 250}; 251