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 serial0 = &blsp1_uart2; 17 }; 18 19 chosen { 20 stdout-path = "serial0"; 21 }; 22 23 gpio-keys { 24 compatible = "gpio-keys"; 25 26 pinctrl-names = "default"; 27 pinctrl-0 = <&gpio_keys_default>; 28 29 label = "GPIO Buttons"; 30 31 button-volume-up { 32 label = "Volume Up"; 33 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; 34 linux,code = <KEY_VOLUMEUP>; 35 }; 36 }; 37 38 gpio-leds { 39 compatible = "gpio-leds"; 40 41 pinctrl-names = "default"; 42 pinctrl-0 = <&gpio_leds_default>; 43 44 led-0 { 45 gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>; 46 linux,default-trigger = "torch"; 47 function = LED_FUNCTION_TORCH; 48 }; 49 }; 50 51 usb_id: usb-id { 52 compatible = "linux,extcon-usb-gpio"; 53 id-gpio = <&msmgpio 69 GPIO_ACTIVE_HIGH>; 54 pinctrl-names = "default"; 55 pinctrl-0 = <&usb_id_default>; 56 }; 57}; 58 59&blsp1_uart2 { 60 status = "okay"; 61}; 62 63&blsp_i2c4 { 64 status = "okay"; 65 66 touchscreen@26 { 67 compatible = "mstar,msg2638"; 68 reg = <0x26>; 69 interrupt-parent = <&msmgpio>; 70 interrupts = <13 IRQ_TYPE_EDGE_FALLING>; 71 reset-gpios = <&msmgpio 100 GPIO_ACTIVE_LOW>; 72 pinctrl-names = "default"; 73 pinctrl-0 = <&ts_int_reset_default>; 74 vdd-supply = <&pm8916_l17>; 75 vddio-supply = <&pm8916_l5>; 76 touchscreen-size-x = <2048>; 77 touchscreen-size-y = <2048>; 78 }; 79}; 80 81&blsp_i2c5 { 82 status = "okay"; 83 84 magnetometer@c { 85 compatible = "asahi-kasei,ak09911"; 86 reg = <0x0c>; 87 vdd-supply = <&pm8916_l17>; 88 vid-supply = <&pm8916_l6>; 89 reset-gpios = <&msmgpio 8 GPIO_ACTIVE_LOW>; 90 pinctrl-names = "default"; 91 pinctrl-0 = <&mag_reset_default>; 92 mount-matrix = "0", "1", "0", 93 "-1", "0", "0", 94 "0", "0", "1"; 95 }; 96 97 accelerometer@f { 98 compatible = "kionix,kxtj21009"; 99 reg = <0x0f>; 100 vdd-supply = <&pm8916_l17>; 101 vddio-supply = <&pm8916_l6>; 102 interrupt-parent = <&msmgpio>; 103 interrupts = <31 IRQ_TYPE_EDGE_RISING>; 104 pinctrl-names = "default"; 105 pinctrl-0 = <&accel_int_default>; 106 mount-matrix = "-1", "0", "0", 107 "0", "1", "0", 108 "0", "0", "-1"; 109 }; 110 111 proximity@48 { 112 compatible = "sensortek,stk3310"; 113 reg = <0x48>; 114 interrupt-parent = <&msmgpio>; 115 interrupts = <12 IRQ_TYPE_EDGE_FALLING>; 116 pinctrl-names = "default"; 117 pinctrl-0 = <&proximity_int_default>; 118 }; 119 120 gyroscope@68 { 121 compatible = "bosch,bmg160"; 122 reg = <0x68>; 123 vdd-supply = <&pm8916_l17>; 124 vddio-supply = <&pm8916_l6>; 125 interrupt-parent = <&msmgpio>; 126 interrupts = <97 IRQ_TYPE_EDGE_RISING>, 127 <98 IRQ_TYPE_EDGE_RISING>; 128 pinctrl-names = "default"; 129 pinctrl-0 = <&gyro_int_default>; 130 }; 131}; 132 133&blsp_i2c6 { 134 status = "okay"; 135 136 led-controller@68 { 137 compatible = "si-en,sn3190"; 138 reg = <0x68>; 139 shutdown-gpios = <&msmgpio 89 GPIO_ACTIVE_HIGH>; 140 pinctrl-names = "default"; 141 pinctrl-0 = <&led_enable_default &led_shutdown_default>; 142 #address-cells = <1>; 143 #size-cells = <0>; 144 145 led@1 { 146 reg = <1>; 147 led-max-microamp = <5000>; 148 function = LED_FUNCTION_INDICATOR; 149 color = <LED_COLOR_ID_WHITE>; 150 }; 151 }; 152}; 153 154&pm8916_resin { 155 status = "okay"; 156 linux,code = <KEY_VOLUMEDOWN>; 157}; 158 159&pm8916_vib { 160 status = "okay"; 161}; 162 163&pronto { 164 status = "okay"; 165}; 166 167&sdhc_1 { 168 status = "okay"; 169 170 pinctrl-names = "default", "sleep"; 171 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; 172 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; 173}; 174 175&sdhc_2 { 176 status = "okay"; 177 178 pinctrl-names = "default", "sleep"; 179 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; 180 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 181 182 cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>; 183}; 184 185&usb { 186 status = "okay"; 187 extcon = <&usb_id>, <&usb_id>; 188}; 189 190&usb_hs_phy { 191 extcon = <&usb_id>; 192}; 193 194&smd_rpm_regulators { 195 vdd_l1_l2_l3-supply = <&pm8916_s3>; 196 vdd_l4_l5_l6-supply = <&pm8916_s4>; 197 vdd_l7-supply = <&pm8916_s4>; 198 199 s3 { 200 regulator-min-microvolt = <1200000>; 201 regulator-max-microvolt = <1300000>; 202 }; 203 204 s4 { 205 regulator-min-microvolt = <1800000>; 206 regulator-max-microvolt = <2100000>; 207 }; 208 209 l1 { 210 regulator-min-microvolt = <1225000>; 211 regulator-max-microvolt = <1225000>; 212 }; 213 214 l2 { 215 regulator-min-microvolt = <1200000>; 216 regulator-max-microvolt = <1200000>; 217 }; 218 219 l4 { 220 regulator-min-microvolt = <2050000>; 221 regulator-max-microvolt = <2050000>; 222 }; 223 224 l5 { 225 regulator-min-microvolt = <1800000>; 226 regulator-max-microvolt = <1800000>; 227 }; 228 229 l6 { 230 regulator-min-microvolt = <1800000>; 231 regulator-max-microvolt = <1800000>; 232 }; 233 234 l7 { 235 regulator-min-microvolt = <1800000>; 236 regulator-max-microvolt = <1800000>; 237 }; 238 239 l8 { 240 regulator-min-microvolt = <2850000>; 241 regulator-max-microvolt = <2900000>; 242 }; 243 244 l9 { 245 regulator-min-microvolt = <3300000>; 246 regulator-max-microvolt = <3300000>; 247 }; 248 249 l10 { 250 regulator-min-microvolt = <2700000>; 251 regulator-max-microvolt = <2800000>; 252 }; 253 254 l11 { 255 regulator-min-microvolt = <1800000>; 256 regulator-max-microvolt = <2950000>; 257 regulator-allow-set-load; 258 regulator-system-load = <200000>; 259 }; 260 261 l12 { 262 regulator-min-microvolt = <1800000>; 263 regulator-max-microvolt = <2950000>; 264 }; 265 266 l13 { 267 regulator-min-microvolt = <3075000>; 268 regulator-max-microvolt = <3075000>; 269 }; 270 271 l14 { 272 regulator-min-microvolt = <1800000>; 273 regulator-max-microvolt = <3300000>; 274 }; 275 276 l15 { 277 regulator-min-microvolt = <1800000>; 278 regulator-max-microvolt = <3300000>; 279 }; 280 281 l16 { 282 regulator-min-microvolt = <1800000>; 283 regulator-max-microvolt = <3300000>; 284 }; 285 286 l17 { 287 regulator-min-microvolt = <2850000>; 288 regulator-max-microvolt = <2850000>; 289 }; 290 291 l18 { 292 regulator-min-microvolt = <2700000>; 293 regulator-max-microvolt = <2700000>; 294 }; 295}; 296 297&msmgpio { 298 accel_int_default: accel-int-default-state { 299 pins = "gpio31"; 300 function = "gpio"; 301 302 drive-strength = <2>; 303 bias-disable; 304 }; 305 306 gpio_keys_default: gpio-keys-default-state { 307 pins = "gpio107"; 308 function = "gpio"; 309 310 drive-strength = <2>; 311 bias-pull-up; 312 }; 313 314 gpio_leds_default: gpio-leds-default-state { 315 pins = "gpio32"; 316 function = "gpio"; 317 318 drive-strength = <2>; 319 bias-disable; 320 }; 321 322 gyro_int_default: gyro-int-default-state { 323 pins = "gpio97", "gpio98"; 324 function = "gpio"; 325 326 drive-strength = <2>; 327 bias-disable; 328 }; 329 330 /* 331 * The OEM wired an additional GPIO to be asserted so that 332 * the si-en,sn3190 LED IC works. Since this GPIO is not 333 * part of the IC datasheet nor supported by the driver, 334 * force it asserted here. 335 */ 336 led_enable_default: led-enable-default-state { 337 pins = "gpio102"; 338 function = "gpio"; 339 340 drive-strength = <2>; 341 bias-disable; 342 output-high; 343 }; 344 345 led_shutdown_default: led-shutdown-default-state { 346 pins = "gpio89"; 347 function = "gpio"; 348 349 drive-strength = <2>; 350 bias-disable; 351 }; 352 353 mag_reset_default: mag-reset-default-state { 354 pins = "gpio8"; 355 function = "gpio"; 356 357 drive-strength = <2>; 358 bias-disable; 359 }; 360 361 proximity_int_default: proximity-int-default-state { 362 pins = "gpio12"; 363 function = "gpio"; 364 365 drive-strength = <6>; 366 bias-pull-up; 367 }; 368 369 ts_int_reset_default: ts-int-reset-default-state { 370 pins = "gpio13", "gpio100"; 371 function = "gpio"; 372 373 drive-strength = <2>; 374 bias-disable; 375 }; 376 377 usb_id_default: usb-id-default-state { 378 pins = "gpio69"; 379 function = "gpio"; 380 381 drive-strength = <8>; 382 bias-pull-up; 383 }; 384}; 385