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-gpio = <&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 122 led@0 { 123 reg = <0>; 124 led-max-microamp = <15000>; 125 function = LED_FUNCTION_INDICATOR; 126 color = <LED_COLOR_ID_RED>; 127 }; 128 129 led@1 { 130 reg = <1>; 131 led-max-microamp = <15000>; 132 function = LED_FUNCTION_INDICATOR; 133 color = <LED_COLOR_ID_GREEN>; 134 }; 135 136 led@2 { 137 reg = <2>; 138 led-max-microamp = <15000>; 139 function = LED_FUNCTION_INDICATOR; 140 color = <LED_COLOR_ID_BLUE>; 141 }; 142 }; 143}; 144 145&blsp_uart2 { 146 status = "okay"; 147}; 148 149&pm8916_resin { 150 status = "okay"; 151 linux,code = <KEY_VOLUMEDOWN>; 152}; 153 154&pm8916_rpm_regulators { 155 pm8916_l16: l16 { 156 /* 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. 159 */ 160 regulator-min-microvolt = <2800000>; 161 regulator-max-microvolt = <3300000>; 162 }; 163 164 pm8916_l17: l17 { 165 regulator-min-microvolt = <2850000>; 166 regulator-max-microvolt = <2850000>; 167 }; 168}; 169 170&pm8916_vib { 171 status = "okay"; 172}; 173 174&sdhc_1 { 175 status = "okay"; 176 177 pinctrl-names = "default", "sleep"; 178 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; 179 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; 180}; 181 182&sdhc_2 { 183 status = "okay"; 184 185 pinctrl-names = "default", "sleep"; 186 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>; 187 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>; 188 189 non-removable; 190}; 191 192&usb { 193 status = "okay"; 194 extcon = <&usb_id>, <&usb_id>; 195}; 196 197&usb_hs_phy { 198 extcon = <&usb_id>; 199}; 200 201&wcnss { 202 status = "okay"; 203}; 204 205&wcnss_iris { 206 compatible = "qcom,wcn3620"; 207}; 208 209&tlmm { 210 camera_flash_default: camera-flash-default-state { 211 pins = "gpio31", "gpio32"; 212 function = "gpio"; 213 214 drive-strength = <2>; 215 bias-disable; 216 }; 217 218 gpio_keys_default: gpio-keys-default-state { 219 pins = "gpio107"; 220 function = "gpio"; 221 222 drive-strength = <2>; 223 bias-pull-up; 224 }; 225 226 imu_default: imu-default-state { 227 pins = "gpio115"; 228 function = "gpio"; 229 230 drive-strength = <2>; 231 bias-disable; 232 }; 233 234 touchscreen_default: touchscreen-default-state { 235 touchscreen-pins { 236 pins = "gpio13"; 237 function = "gpio"; 238 239 drive-strength = <2>; 240 bias-pull-up; 241 }; 242 reset-pins { 243 pins = "gpio12"; 244 function = "gpio"; 245 246 drive-strength = <2>; 247 bias-disable; 248 }; 249 }; 250 251 usb_id_default: usb-id-default-state { 252 pins = "gpio110"; 253 function = "gpio"; 254 255 drive-strength = <8>; 256 bias-pull-up; 257 }; 258}; 259