1// SPDX-License-Identifier: GPL-2.0-only 2 3/dts-v1/; 4 5#include "msm8916-pm8916.dtsi" 6#include <dt-bindings/gpio/gpio.h> 7#include <dt-bindings/input/input.h> 8#include <dt-bindings/leds/common.h> 9 10/ { 11 model = "Alcatel OneTouch Idol 3 (4.7)"; 12 compatible = "alcatel,idol347", "qcom,msm8916"; 13 chassis-type = "handset"; 14 15 aliases { 16 mmc0 = &sdhc_1; /* eMMC */ 17 mmc1 = &sdhc_2; /* SD card */ 18 serial0 = &blsp_uart2; 19 }; 20 21 chosen { 22 stdout-path = "serial0"; 23 }; 24 25 gpio-keys { 26 compatible = "gpio-keys"; 27 28 pinctrl-names = "default"; 29 pinctrl-0 = <&gpio_keys_default>; 30 31 label = "GPIO Buttons"; 32 33 button-volume-up { 34 label = "Volume Up"; 35 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; 36 linux,code = <KEY_VOLUMEUP>; 37 }; 38 }; 39 40 gpio-leds { 41 compatible = "gpio-leds"; 42 43 pinctrl-names = "default"; 44 pinctrl-0 = <&gpio_leds_default>; 45 46 led-0 { 47 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; 48 linux,default-trigger = "torch"; 49 function = LED_FUNCTION_TORCH; 50 }; 51 }; 52 53 usb_id: usb-id { 54 compatible = "linux,extcon-usb-gpio"; 55 id-gpio = <&tlmm 69 GPIO_ACTIVE_HIGH>; 56 pinctrl-names = "default"; 57 pinctrl-0 = <&usb_id_default>; 58 }; 59}; 60 61&blsp_uart2 { 62 status = "okay"; 63}; 64 65&blsp_i2c4 { 66 status = "okay"; 67 68 touchscreen@26 { 69 compatible = "mstar,msg2638"; 70 reg = <0x26>; 71 interrupt-parent = <&tlmm>; 72 interrupts = <13 IRQ_TYPE_EDGE_FALLING>; 73 reset-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; 74 pinctrl-names = "default"; 75 pinctrl-0 = <&ts_int_reset_default>; 76 vdd-supply = <&pm8916_l17>; 77 vddio-supply = <&pm8916_l5>; 78 touchscreen-size-x = <2048>; 79 touchscreen-size-y = <2048>; 80 }; 81}; 82 83&blsp_i2c5 { 84 status = "okay"; 85 86 magnetometer@c { 87 compatible = "asahi-kasei,ak09911"; 88 reg = <0x0c>; 89 vdd-supply = <&pm8916_l17>; 90 vid-supply = <&pm8916_l6>; 91 reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>; 92 pinctrl-names = "default"; 93 pinctrl-0 = <&mag_reset_default>; 94 mount-matrix = "0", "1", "0", 95 "-1", "0", "0", 96 "0", "0", "1"; 97 }; 98 99 accelerometer@f { 100 compatible = "kionix,kxtj21009"; 101 reg = <0x0f>; 102 vdd-supply = <&pm8916_l17>; 103 vddio-supply = <&pm8916_l6>; 104 interrupt-parent = <&tlmm>; 105 interrupts = <31 IRQ_TYPE_EDGE_RISING>; 106 pinctrl-names = "default"; 107 pinctrl-0 = <&accel_int_default>; 108 mount-matrix = "-1", "0", "0", 109 "0", "1", "0", 110 "0", "0", "-1"; 111 }; 112 113 proximity@48 { 114 compatible = "sensortek,stk3310"; 115 reg = <0x48>; 116 interrupt-parent = <&tlmm>; 117 interrupts = <12 IRQ_TYPE_EDGE_FALLING>; 118 pinctrl-names = "default"; 119 pinctrl-0 = <&proximity_int_default>; 120 }; 121 122 gyroscope@68 { 123 compatible = "bosch,bmg160"; 124 reg = <0x68>; 125 vdd-supply = <&pm8916_l17>; 126 vddio-supply = <&pm8916_l6>; 127 interrupt-parent = <&tlmm>; 128 interrupts = <97 IRQ_TYPE_EDGE_RISING>, 129 <98 IRQ_TYPE_EDGE_RISING>; 130 pinctrl-names = "default"; 131 pinctrl-0 = <&gyro_int_default>; 132 }; 133}; 134 135&blsp_i2c6 { 136 status = "okay"; 137 138 led-controller@68 { 139 compatible = "si-en,sn3190"; 140 reg = <0x68>; 141 shutdown-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; 142 pinctrl-names = "default"; 143 pinctrl-0 = <&led_enable_default &led_shutdown_default>; 144 #address-cells = <1>; 145 #size-cells = <0>; 146 147 led@1 { 148 reg = <1>; 149 led-max-microamp = <5000>; 150 function = LED_FUNCTION_INDICATOR; 151 color = <LED_COLOR_ID_WHITE>; 152 }; 153 }; 154}; 155 156&pm8916_resin { 157 status = "okay"; 158 linux,code = <KEY_VOLUMEDOWN>; 159}; 160 161&pm8916_rpm_regulators { 162 pm8916_l17: l17 { 163 regulator-min-microvolt = <2850000>; 164 regulator-max-microvolt = <2850000>; 165 }; 166}; 167 168&pm8916_vib { 169 status = "okay"; 170}; 171 172&sdhc_1 { 173 status = "okay"; 174 175 pinctrl-names = "default", "sleep"; 176 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; 177 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; 178}; 179 180&sdhc_2 { 181 status = "okay"; 182 183 pinctrl-names = "default", "sleep"; 184 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; 185 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 186 187 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; 188}; 189 190&usb { 191 status = "okay"; 192 extcon = <&usb_id>, <&usb_id>; 193}; 194 195&usb_hs_phy { 196 extcon = <&usb_id>; 197}; 198 199&wcnss { 200 status = "okay"; 201}; 202 203&wcnss_iris { 204 compatible = "qcom,wcn3620"; 205}; 206 207&tlmm { 208 accel_int_default: accel-int-default-state { 209 pins = "gpio31"; 210 function = "gpio"; 211 212 drive-strength = <2>; 213 bias-disable; 214 }; 215 216 gpio_keys_default: gpio-keys-default-state { 217 pins = "gpio107"; 218 function = "gpio"; 219 220 drive-strength = <2>; 221 bias-pull-up; 222 }; 223 224 gpio_leds_default: gpio-leds-default-state { 225 pins = "gpio32"; 226 function = "gpio"; 227 228 drive-strength = <2>; 229 bias-disable; 230 }; 231 232 gyro_int_default: gyro-int-default-state { 233 pins = "gpio97", "gpio98"; 234 function = "gpio"; 235 236 drive-strength = <2>; 237 bias-disable; 238 }; 239 240 /* 241 * The OEM wired an additional GPIO to be asserted so that 242 * the si-en,sn3190 LED IC works. Since this GPIO is not 243 * part of the IC datasheet nor supported by the driver, 244 * force it asserted here. 245 */ 246 led_enable_default: led-enable-default-state { 247 pins = "gpio102"; 248 function = "gpio"; 249 250 drive-strength = <2>; 251 bias-disable; 252 output-high; 253 }; 254 255 led_shutdown_default: led-shutdown-default-state { 256 pins = "gpio89"; 257 function = "gpio"; 258 259 drive-strength = <2>; 260 bias-disable; 261 }; 262 263 mag_reset_default: mag-reset-default-state { 264 pins = "gpio8"; 265 function = "gpio"; 266 267 drive-strength = <2>; 268 bias-disable; 269 }; 270 271 proximity_int_default: proximity-int-default-state { 272 pins = "gpio12"; 273 function = "gpio"; 274 275 drive-strength = <6>; 276 bias-pull-up; 277 }; 278 279 ts_int_reset_default: ts-int-reset-default-state { 280 pins = "gpio13", "gpio100"; 281 function = "gpio"; 282 283 drive-strength = <2>; 284 bias-disable; 285 }; 286 287 usb_id_default: usb-id-default-state { 288 pins = "gpio69"; 289 function = "gpio"; 290 291 drive-strength = <8>; 292 bias-pull-up; 293 }; 294}; 295