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-gpios = <&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 176&sdhc_2 { 177 status = "okay"; 178 179 pinctrl-names = "default", "sleep"; 180 pinctrl-0 = <&sdc2_default &sdc2_cd_default>; 181 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; 182 183 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; 184}; 185 186&usb { 187 status = "okay"; 188 extcon = <&usb_id>, <&usb_id>; 189}; 190 191&usb_hs_phy { 192 extcon = <&usb_id>; 193}; 194 195&venus { 196 status = "okay"; 197}; 198 199&venus_mem { 200 status = "okay"; 201}; 202 203&wcnss { 204 status = "okay"; 205}; 206 207&wcnss_iris { 208 compatible = "qcom,wcn3620"; 209}; 210 211&wcnss_mem { 212 status = "okay"; 213}; 214 215&tlmm { 216 accel_int_default: accel-int-default-state { 217 pins = "gpio31"; 218 function = "gpio"; 219 220 drive-strength = <2>; 221 bias-disable; 222 }; 223 224 gpio_keys_default: gpio-keys-default-state { 225 pins = "gpio107"; 226 function = "gpio"; 227 228 drive-strength = <2>; 229 bias-pull-up; 230 }; 231 232 gpio_leds_default: gpio-leds-default-state { 233 pins = "gpio32"; 234 function = "gpio"; 235 236 drive-strength = <2>; 237 bias-disable; 238 }; 239 240 gyro_int_default: gyro-int-default-state { 241 pins = "gpio97", "gpio98"; 242 function = "gpio"; 243 244 drive-strength = <2>; 245 bias-disable; 246 }; 247 248 /* 249 * The OEM wired an additional GPIO to be asserted so that 250 * the si-en,sn3190 LED IC works. Since this GPIO is not 251 * part of the IC datasheet nor supported by the driver, 252 * force it asserted here. 253 */ 254 led_enable_default: led-enable-default-state { 255 pins = "gpio102"; 256 function = "gpio"; 257 258 drive-strength = <2>; 259 bias-disable; 260 output-high; 261 }; 262 263 led_shutdown_default: led-shutdown-default-state { 264 pins = "gpio89"; 265 function = "gpio"; 266 267 drive-strength = <2>; 268 bias-disable; 269 }; 270 271 mag_reset_default: mag-reset-default-state { 272 pins = "gpio8"; 273 function = "gpio"; 274 275 drive-strength = <2>; 276 bias-disable; 277 }; 278 279 proximity_int_default: proximity-int-default-state { 280 pins = "gpio12"; 281 function = "gpio"; 282 283 drive-strength = <6>; 284 bias-pull-up; 285 }; 286 287 sdc2_cd_default: sdc2-cd-default-state { 288 pins = "gpio38"; 289 function = "gpio"; 290 drive-strength = <2>; 291 bias-disable; 292 }; 293 294 ts_int_reset_default: ts-int-reset-default-state { 295 pins = "gpio13", "gpio100"; 296 function = "gpio"; 297 298 drive-strength = <2>; 299 bias-disable; 300 }; 301 302 usb_id_default: usb-id-default-state { 303 pins = "gpio69"; 304 function = "gpio"; 305 306 drive-strength = <8>; 307 bias-pull-up; 308 }; 309}; 310