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
9/ {
10	model = "Alcatel OneTouch Idol 3 (4.7)";
11	compatible = "alcatel,idol347", "qcom,msm8916";
12
13	aliases {
14		serial0 = &blsp1_uart2;
15	};
16
17	chosen {
18		stdout-path = "serial0";
19	};
20
21	gpio-keys {
22		compatible = "gpio-keys";
23
24		pinctrl-names = "default";
25		pinctrl-0 = <&gpio_keys_default>;
26
27		label = "GPIO Buttons";
28
29		volume-up {
30			label = "Volume Up";
31			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
32			linux,code = <KEY_VOLUMEUP>;
33		};
34	};
35
36	usb_id: usb-id {
37		compatible = "linux,extcon-usb-gpio";
38		id-gpio = <&msmgpio 69 GPIO_ACTIVE_HIGH>;
39		pinctrl-names = "default";
40		pinctrl-0 = <&usb_id_default>;
41	};
42};
43
44&blsp1_uart2 {
45	status = "okay";
46};
47
48&blsp_i2c4 {
49	status = "okay";
50
51	touchscreen@26 {
52		compatible = "mstar,msg2638";
53		reg = <0x26>;
54		interrupt-parent = <&msmgpio>;
55		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
56		reset-gpios = <&msmgpio 100 GPIO_ACTIVE_LOW>;
57		pinctrl-names = "default";
58		pinctrl-0 = <&ts_int_reset_default>;
59		vdd-supply = <&pm8916_l17>;
60		vddio-supply = <&pm8916_l5>;
61		touchscreen-size-x = <2048>;
62		touchscreen-size-y = <2048>;
63	};
64};
65
66&blsp_i2c5 {
67	status = "okay";
68
69	magnetometer@c {
70		compatible = "asahi-kasei,ak09911";
71		reg = <0x0c>;
72		vdd-supply = <&pm8916_l17>;
73		vid-supply = <&pm8916_l6>;
74		reset-gpios = <&msmgpio 8 GPIO_ACTIVE_LOW>;
75		pinctrl-names = "default";
76		pinctrl-0 = <&mag_reset_default>;
77		mount-matrix = "0", "1", "0",
78			       "-1", "0", "0",
79			       "0", "0", "1";
80	};
81
82	accelerometer@f {
83		compatible = "kionix,kxtj21009";
84		reg = <0x0f>;
85		vdd-supply = <&pm8916_l17>;
86		vddio-supply = <&pm8916_l6>;
87		interrupt-parent = <&msmgpio>;
88		interrupts = <31 IRQ_TYPE_EDGE_RISING>;
89		pinctrl-names = "default";
90		pinctrl-0 = <&accel_int_default>;
91		mount-matrix = "-1", "0", "0",
92			       "0", "1", "0",
93			       "0", "0", "-1";
94	};
95
96	proximity@48 {
97		compatible = "sensortek,stk3310";
98		reg = <0x48>;
99		interrupt-parent = <&msmgpio>;
100		interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
101		pinctrl-names = "default";
102		pinctrl-0 = <&proximity_int_default>;
103	};
104
105	gyroscope@68 {
106		compatible = "bosch,bmg160";
107		reg = <0x68>;
108		vdd-supply = <&pm8916_l17>;
109		vddio-supply = <&pm8916_l6>;
110		interrupt-parent = <&msmgpio>;
111		interrupts = <97 IRQ_TYPE_EDGE_RISING>,
112			     <98 IRQ_TYPE_EDGE_RISING>;
113		pinctrl-names = "default";
114		pinctrl-0 = <&gyro_int_default>;
115	};
116};
117
118&pm8916_resin {
119	status = "okay";
120	linux,code = <KEY_VOLUMEDOWN>;
121};
122
123&pm8916_vib {
124	status = "okay";
125};
126
127&pronto {
128	status = "okay";
129};
130
131&sdhc_1 {
132	status = "okay";
133
134	pinctrl-names = "default", "sleep";
135	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
136	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
137};
138
139&sdhc_2 {
140	status = "okay";
141
142	pinctrl-names = "default", "sleep";
143	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
144	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
145
146	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
147};
148
149&usb {
150	status = "okay";
151	extcon = <&usb_id>, <&usb_id>;
152};
153
154&usb_hs_phy {
155	extcon = <&usb_id>;
156};
157
158&smd_rpm_regulators {
159	vdd_l1_l2_l3-supply = <&pm8916_s3>;
160	vdd_l4_l5_l6-supply = <&pm8916_s4>;
161	vdd_l7-supply = <&pm8916_s4>;
162
163	s3 {
164		regulator-min-microvolt = <1200000>;
165		regulator-max-microvolt = <1300000>;
166	};
167
168	s4 {
169		regulator-min-microvolt = <1800000>;
170		regulator-max-microvolt = <2100000>;
171	};
172
173	l1 {
174		regulator-min-microvolt = <1225000>;
175		regulator-max-microvolt = <1225000>;
176	};
177
178	l2 {
179		regulator-min-microvolt = <1200000>;
180		regulator-max-microvolt = <1200000>;
181	};
182
183	l4 {
184		regulator-min-microvolt = <2050000>;
185		regulator-max-microvolt = <2050000>;
186	};
187
188	l5 {
189		regulator-min-microvolt = <1800000>;
190		regulator-max-microvolt = <1800000>;
191	};
192
193	l6 {
194		regulator-min-microvolt = <1800000>;
195		regulator-max-microvolt = <1800000>;
196	};
197
198	l7 {
199		regulator-min-microvolt = <1800000>;
200		regulator-max-microvolt = <1800000>;
201	};
202
203	l8 {
204		regulator-min-microvolt = <2850000>;
205		regulator-max-microvolt = <2900000>;
206	};
207
208	l9 {
209		regulator-min-microvolt = <3300000>;
210		regulator-max-microvolt = <3300000>;
211	};
212
213	l10 {
214		regulator-min-microvolt = <2700000>;
215		regulator-max-microvolt = <2800000>;
216	};
217
218	l11 {
219		regulator-min-microvolt = <1800000>;
220		regulator-max-microvolt = <2950000>;
221		regulator-allow-set-load;
222		regulator-system-load = <200000>;
223	};
224
225	l12 {
226		regulator-min-microvolt = <1800000>;
227		regulator-max-microvolt = <2950000>;
228	};
229
230	l13 {
231		regulator-min-microvolt = <3075000>;
232		regulator-max-microvolt = <3075000>;
233	};
234
235	l14 {
236		regulator-min-microvolt = <1800000>;
237		regulator-max-microvolt = <3300000>;
238	};
239
240	l15 {
241		regulator-min-microvolt = <1800000>;
242		regulator-max-microvolt = <3300000>;
243	};
244
245	l16 {
246		regulator-min-microvolt = <1800000>;
247		regulator-max-microvolt = <3300000>;
248	};
249
250	l17 {
251		regulator-min-microvolt = <2850000>;
252		regulator-max-microvolt = <2850000>;
253	};
254
255	l18 {
256		regulator-min-microvolt = <2700000>;
257		regulator-max-microvolt = <2700000>;
258	};
259};
260
261&msmgpio {
262	accel_int_default: accel-int-default {
263		pins = "gpio31";
264		function = "gpio";
265
266		drive-strength = <2>;
267		bias-disable;
268	};
269
270	gpio_keys_default: gpio-keys-default {
271		pins = "gpio107";
272		function = "gpio";
273
274		drive-strength = <2>;
275		bias-pull-up;
276	};
277
278	gyro_int_default: gyro-int-default {
279		pins = "gpio97", "gpio98";
280		function = "gpio";
281
282		drive-strength = <2>;
283		bias-disable;
284	};
285
286	mag_reset_default: mag-reset-default {
287		pins = "gpio8";
288		function = "gpio";
289
290		drive-strength = <2>;
291		bias-disable;
292	};
293
294	proximity_int_default: proximity-int-default {
295		pins = "gpio12";
296		function = "gpio";
297
298		drive-strength = <6>;
299		bias-pull-up;
300	};
301
302	ts_int_reset_default: ts-int-reset-default {
303		pins = "gpio13", "gpio100";
304		function = "gpio";
305
306		drive-strength = <2>;
307		bias-disable;
308	};
309
310	usb_id_default: usb-id-default {
311		pins = "gpio69";
312		function = "gpio";
313
314		drive-strength = <8>;
315		bias-pull-up;
316	};
317};
318