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_i2c5 {
49	status = "okay";
50
51	magnetometer@c {
52		compatible = "asahi-kasei,ak09911";
53		reg = <0x0c>;
54		vdd-supply = <&pm8916_l17>;
55		vid-supply = <&pm8916_l6>;
56		reset-gpios = <&msmgpio 8 GPIO_ACTIVE_LOW>;
57		pinctrl-names = "default";
58		pinctrl-0 = <&mag_reset_default>;
59		mount-matrix = "0", "1", "0",
60			       "-1", "0", "0",
61			       "0", "0", "1";
62	};
63
64	accelerometer@f {
65		compatible = "kionix,kxtj21009";
66		reg = <0x0f>;
67		vdd-supply = <&pm8916_l17>;
68		vddio-supply = <&pm8916_l6>;
69		interrupt-parent = <&msmgpio>;
70		interrupts = <31 IRQ_TYPE_EDGE_RISING>;
71		pinctrl-names = "default";
72		pinctrl-0 = <&accel_int_default>;
73		mount-matrix = "-1", "0", "0",
74			       "0", "1", "0",
75			       "0", "0", "-1";
76	};
77
78	proximity@48 {
79		compatible = "sensortek,stk3310";
80		reg = <0x48>;
81		interrupt-parent = <&msmgpio>;
82		interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
83		pinctrl-names = "default";
84		pinctrl-0 = <&proximity_int_default>;
85	};
86
87	gyroscope@68 {
88		compatible = "bosch,bmg160";
89		reg = <0x68>;
90		vdd-supply = <&pm8916_l17>;
91		vddio-supply = <&pm8916_l6>;
92		interrupt-parent = <&msmgpio>;
93		interrupts = <97 IRQ_TYPE_EDGE_RISING>,
94			     <98 IRQ_TYPE_EDGE_RISING>;
95		pinctrl-names = "default";
96		pinctrl-0 = <&gyro_int_default>;
97	};
98};
99
100&pm8916_resin {
101	status = "okay";
102	linux,code = <KEY_VOLUMEDOWN>;
103};
104
105&pm8916_vib {
106	status = "okay";
107};
108
109&pronto {
110	status = "okay";
111};
112
113&sdhc_1 {
114	status = "okay";
115
116	pinctrl-names = "default", "sleep";
117	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
118	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
119};
120
121&sdhc_2 {
122	status = "okay";
123
124	pinctrl-names = "default", "sleep";
125	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
126	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
127
128	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
129};
130
131&usb {
132	status = "okay";
133	extcon = <&usb_id>, <&usb_id>;
134};
135
136&usb_hs_phy {
137	extcon = <&usb_id>;
138};
139
140&smd_rpm_regulators {
141	vdd_l1_l2_l3-supply = <&pm8916_s3>;
142	vdd_l4_l5_l6-supply = <&pm8916_s4>;
143	vdd_l7-supply = <&pm8916_s4>;
144
145	s3 {
146		regulator-min-microvolt = <1200000>;
147		regulator-max-microvolt = <1300000>;
148	};
149
150	s4 {
151		regulator-min-microvolt = <1800000>;
152		regulator-max-microvolt = <2100000>;
153	};
154
155	l1 {
156		regulator-min-microvolt = <1225000>;
157		regulator-max-microvolt = <1225000>;
158	};
159
160	l2 {
161		regulator-min-microvolt = <1200000>;
162		regulator-max-microvolt = <1200000>;
163	};
164
165	l4 {
166		regulator-min-microvolt = <2050000>;
167		regulator-max-microvolt = <2050000>;
168	};
169
170	l5 {
171		regulator-min-microvolt = <1800000>;
172		regulator-max-microvolt = <1800000>;
173	};
174
175	l6 {
176		regulator-min-microvolt = <1800000>;
177		regulator-max-microvolt = <1800000>;
178	};
179
180	l7 {
181		regulator-min-microvolt = <1800000>;
182		regulator-max-microvolt = <1800000>;
183	};
184
185	l8 {
186		regulator-min-microvolt = <2850000>;
187		regulator-max-microvolt = <2900000>;
188	};
189
190	l9 {
191		regulator-min-microvolt = <3300000>;
192		regulator-max-microvolt = <3300000>;
193	};
194
195	l10 {
196		regulator-min-microvolt = <2700000>;
197		regulator-max-microvolt = <2800000>;
198	};
199
200	l11 {
201		regulator-min-microvolt = <1800000>;
202		regulator-max-microvolt = <2950000>;
203		regulator-allow-set-load;
204		regulator-system-load = <200000>;
205	};
206
207	l12 {
208		regulator-min-microvolt = <1800000>;
209		regulator-max-microvolt = <2950000>;
210	};
211
212	l13 {
213		regulator-min-microvolt = <3075000>;
214		regulator-max-microvolt = <3075000>;
215	};
216
217	l14 {
218		regulator-min-microvolt = <1800000>;
219		regulator-max-microvolt = <3300000>;
220	};
221
222	l15 {
223		regulator-min-microvolt = <1800000>;
224		regulator-max-microvolt = <3300000>;
225	};
226
227	l16 {
228		regulator-min-microvolt = <1800000>;
229		regulator-max-microvolt = <3300000>;
230	};
231
232	l17 {
233		regulator-min-microvolt = <2850000>;
234		regulator-max-microvolt = <2850000>;
235	};
236
237	l18 {
238		regulator-min-microvolt = <2700000>;
239		regulator-max-microvolt = <2700000>;
240	};
241};
242
243&msmgpio {
244	accel_int_default: accel-int-default {
245		pins = "gpio31";
246		function = "gpio";
247
248		drive-strength = <2>;
249		bias-disable;
250	};
251
252	gpio_keys_default: gpio-keys-default {
253		pins = "gpio107";
254		function = "gpio";
255
256		drive-strength = <2>;
257		bias-pull-up;
258	};
259
260	gyro_int_default: gyro-int-default {
261		pins = "gpio97", "gpio98";
262		function = "gpio";
263
264		drive-strength = <2>;
265		bias-disable;
266	};
267
268	mag_reset_default: mag-reset-default {
269		pins = "gpio8";
270		function = "gpio";
271
272		drive-strength = <2>;
273		bias-disable;
274	};
275
276	proximity_int_default: proximity-int-default {
277		pins = "gpio12";
278		function = "gpio";
279
280		drive-strength = <6>;
281		bias-pull-up;
282	};
283
284	usb_id_default: usb-id-default {
285		pins = "gpio69";
286		function = "gpio";
287
288		drive-strength = <8>;
289		bias-pull-up;
290	};
291};
292