1// SPDX-License-Identifier: GPL-2.0-only
2
3/dts-v1/;
4
5#include "msm8916-pm8916.dtsi"
6
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/interrupt-controller/irq.h>
10
11/*
12 * NOTE: The original firmware from Acer can only boot 32-bit kernels.
13 * To boot this device tree using arm64 it is necessary to flash 64-bit
14 * TZ/HYP firmware (e.g. taken from the DragonBoard 410c).
15 * See https://wiki.postmarketos.org/wiki/Acer_Iconia_Talk_S_(acer-a1-724)
16 * for suggested installation instructions.
17 */
18
19/ {
20	model = "Acer Iconia Talk S A1-724";
21	compatible = "acer,a1-724", "qcom,msm8916";
22	chassis-type = "tablet";
23
24	aliases {
25		serial0 = &blsp1_uart2;
26	};
27
28	chosen {
29		stdout-path = "serial0";
30	};
31
32	gpio-keys {
33		compatible = "gpio-keys";
34
35		pinctrl-names = "default";
36		pinctrl-0 = <&gpio_keys_default>;
37
38		label = "GPIO Buttons";
39
40		button-volume-up {
41			label = "Volume Up";
42			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
43			linux,code = <KEY_VOLUMEUP>;
44		};
45	};
46
47	usb_id: usb-id {
48		compatible = "linux,extcon-usb-gpio";
49		id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
50		pinctrl-names = "default";
51		pinctrl-0 = <&usb_id_default>;
52	};
53};
54
55&blsp_i2c2 {
56	status = "okay";
57
58	accelerometer@10 {
59		compatible = "bosch,bmc150_accel";
60		reg = <0x10>;
61		interrupt-parent = <&msmgpio>;
62		interrupts = <115 IRQ_TYPE_EDGE_RISING>;
63
64		vdd-supply = <&pm8916_l17>;
65		vddio-supply = <&pm8916_l6>;
66
67		pinctrl-names = "default";
68		pinctrl-0 = <&accel_int_default>;
69
70		mount-matrix = "0", "-1", "0",
71			       "-1", "0", "0",
72			       "0", "0", "1";
73	};
74
75	magnetometer@12 {
76		compatible = "bosch,bmc150_magn";
77		reg = <0x12>;
78
79		vdd-supply = <&pm8916_l17>;
80		vddio-supply = <&pm8916_l6>;
81	};
82};
83
84&blsp_i2c5 {
85	status = "okay";
86
87	touchscreen@38 {
88		/* Actually ft5446 */
89		compatible = "edt,edt-ft5406";
90		reg = <0x38>;
91
92		interrupt-parent = <&msmgpio>;
93		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
94
95		reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
96
97		vcc-supply = <&pm8916_l16>;
98		iovcc-supply = <&pm8916_l6>;
99
100		touchscreen-size-x = <720>;
101		touchscreen-size-y = <1280>;
102
103		pinctrl-names = "default";
104		pinctrl-0 = <&touchscreen_default>;
105	};
106};
107
108&blsp1_uart2 {
109	status = "okay";
110};
111
112&pm8916_resin {
113	linux,code = <KEY_VOLUMEDOWN>;
114	status = "okay";
115};
116
117&pm8916_vib {
118	status = "okay";
119};
120
121&pronto {
122	status = "okay";
123};
124
125&sdhc_1 {
126	pinctrl-names = "default", "sleep";
127	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
128	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
129
130	status = "okay";
131};
132
133&sdhc_2 {
134	pinctrl-names = "default", "sleep";
135	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
136	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
137
138	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_HIGH>;
139
140	status = "okay";
141};
142
143&usb {
144	extcon = <&usb_id>, <&usb_id>;
145	status = "okay";
146};
147
148&usb_hs_phy {
149	extcon = <&usb_id>;
150};
151
152&smd_rpm_regulators {
153	vdd_l1_l2_l3-supply = <&pm8916_s3>;
154	vdd_l4_l5_l6-supply = <&pm8916_s4>;
155	vdd_l7-supply = <&pm8916_s4>;
156
157	s3 {
158		regulator-min-microvolt = <1200000>;
159		regulator-max-microvolt = <1300000>;
160	};
161
162	s4 {
163		regulator-min-microvolt = <1800000>;
164		regulator-max-microvolt = <2100000>;
165	};
166
167	l1 {
168		regulator-min-microvolt = <1225000>;
169		regulator-max-microvolt = <1225000>;
170	};
171
172	l2 {
173		regulator-min-microvolt = <1200000>;
174		regulator-max-microvolt = <1200000>;
175	};
176
177	l4 {
178		regulator-min-microvolt = <2050000>;
179		regulator-max-microvolt = <2050000>;
180	};
181
182	l5 {
183		regulator-min-microvolt = <1800000>;
184		regulator-max-microvolt = <1800000>;
185	};
186
187	l6 {
188		regulator-min-microvolt = <1800000>;
189		regulator-max-microvolt = <1800000>;
190	};
191
192	l7 {
193		regulator-min-microvolt = <1800000>;
194		regulator-max-microvolt = <1800000>;
195	};
196
197	l8 {
198		regulator-min-microvolt = <2850000>;
199		regulator-max-microvolt = <2900000>;
200	};
201
202	l9 {
203		regulator-min-microvolt = <3300000>;
204		regulator-max-microvolt = <3300000>;
205	};
206
207	l10 {
208		regulator-min-microvolt = <2700000>;
209		regulator-max-microvolt = <2800000>;
210	};
211
212	l11 {
213		regulator-min-microvolt = <1800000>;
214		regulator-max-microvolt = <2950000>;
215		regulator-system-load = <200000>;
216		regulator-allow-set-load;
217	};
218
219	l12 {
220		regulator-min-microvolt = <1800000>;
221		regulator-max-microvolt = <2950000>;
222	};
223
224	l13 {
225		regulator-min-microvolt = <3075000>;
226		regulator-max-microvolt = <3075000>;
227	};
228
229	l14 {
230		regulator-min-microvolt = <1800000>;
231		regulator-max-microvolt = <3300000>;
232	};
233
234	l15 {
235		regulator-min-microvolt = <1800000>;
236		regulator-max-microvolt = <3300000>;
237	};
238
239	l16 {
240		regulator-min-microvolt = <2900000>;
241		regulator-max-microvolt = <2900000>;
242	};
243
244	l17 {
245		regulator-min-microvolt = <2850000>;
246		regulator-max-microvolt = <2850000>;
247	};
248
249	l18 {
250		regulator-min-microvolt = <2700000>;
251		regulator-max-microvolt = <2700000>;
252	};
253};
254
255&msmgpio {
256	accel_int_default: accel-int-default-state {
257		pins = "gpio115";
258		function = "gpio";
259
260		drive-strength = <2>;
261		bias-disable;
262	};
263
264	gpio_keys_default: gpio-keys-default-state {
265		pins = "gpio107";
266		function = "gpio";
267
268		drive-strength = <2>;
269		bias-pull-up;
270	};
271
272	touchscreen_default: touchscreen-default-state {
273		reset-pins {
274			pins = "gpio12";
275			function = "gpio";
276			drive-strength = <2>;
277			bias-disable;
278		};
279
280		touchscreen-pins {
281			pins = "gpio13";
282			function = "gpio";
283			drive-strength = <2>;
284			bias-pull-up;
285		};
286	};
287
288	usb_id_default: usb-id-default-state {
289		pins = "gpio110";
290		function = "gpio";
291
292		drive-strength = <8>;
293		bias-pull-up;
294	};
295};
296