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		mmc0 = &sdhc_1; /* eMMC */
26		mmc1 = &sdhc_2; /* SD card */
27		serial0 = &blsp_uart2;
28	};
29
30	chosen {
31		stdout-path = "serial0";
32	};
33
34	gpio-keys {
35		compatible = "gpio-keys";
36
37		pinctrl-names = "default";
38		pinctrl-0 = <&gpio_keys_default>;
39
40		label = "GPIO Buttons";
41
42		button-volume-up {
43			label = "Volume Up";
44			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
45			linux,code = <KEY_VOLUMEUP>;
46		};
47	};
48
49	usb_id: usb-id {
50		compatible = "linux,extcon-usb-gpio";
51		id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
52		pinctrl-names = "default";
53		pinctrl-0 = <&usb_id_default>;
54	};
55};
56
57&blsp_i2c2 {
58	status = "okay";
59
60	accelerometer@10 {
61		compatible = "bosch,bmc150_accel";
62		reg = <0x10>;
63		interrupt-parent = <&tlmm>;
64		interrupts = <115 IRQ_TYPE_EDGE_RISING>;
65
66		vdd-supply = <&pm8916_l17>;
67		vddio-supply = <&pm8916_l6>;
68
69		pinctrl-names = "default";
70		pinctrl-0 = <&accel_int_default>;
71
72		mount-matrix = "0", "-1", "0",
73			       "-1", "0", "0",
74			       "0", "0", "1";
75	};
76
77	magnetometer@12 {
78		compatible = "bosch,bmc150_magn";
79		reg = <0x12>;
80
81		vdd-supply = <&pm8916_l17>;
82		vddio-supply = <&pm8916_l6>;
83	};
84};
85
86&blsp_i2c5 {
87	status = "okay";
88
89	touchscreen@38 {
90		/* Actually ft5446 */
91		compatible = "edt,edt-ft5406";
92		reg = <0x38>;
93
94		interrupt-parent = <&tlmm>;
95		interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
96
97		reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
98
99		vcc-supply = <&pm8916_l16>;
100		iovcc-supply = <&pm8916_l6>;
101
102		touchscreen-size-x = <720>;
103		touchscreen-size-y = <1280>;
104
105		pinctrl-names = "default";
106		pinctrl-0 = <&touchscreen_default>;
107	};
108};
109
110&blsp_uart2 {
111	status = "okay";
112};
113
114&pm8916_resin {
115	linux,code = <KEY_VOLUMEDOWN>;
116	status = "okay";
117};
118
119&pm8916_rpm_regulators {
120	pm8916_l16: l16 {
121		regulator-min-microvolt = <2900000>;
122		regulator-max-microvolt = <2900000>;
123	};
124
125	pm8916_l17: l17 {
126		regulator-min-microvolt = <2850000>;
127		regulator-max-microvolt = <2850000>;
128	};
129};
130
131&pm8916_vib {
132	status = "okay";
133};
134
135&sdhc_1 {
136	pinctrl-names = "default", "sleep";
137	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
138	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
139
140	status = "okay";
141};
142
143&sdhc_2 {
144	pinctrl-names = "default", "sleep";
145	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
146	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
147
148	cd-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
149
150	status = "okay";
151};
152
153&usb {
154	extcon = <&usb_id>, <&usb_id>;
155	status = "okay";
156};
157
158&usb_hs_phy {
159	extcon = <&usb_id>;
160};
161
162&wcnss {
163	status = "okay";
164};
165
166&wcnss_iris {
167	compatible = "qcom,wcn3620";
168};
169
170&tlmm {
171	accel_int_default: accel-int-default-state {
172		pins = "gpio115";
173		function = "gpio";
174
175		drive-strength = <2>;
176		bias-disable;
177	};
178
179	gpio_keys_default: gpio-keys-default-state {
180		pins = "gpio107";
181		function = "gpio";
182
183		drive-strength = <2>;
184		bias-pull-up;
185	};
186
187	touchscreen_default: touchscreen-default-state {
188		reset-pins {
189			pins = "gpio12";
190			function = "gpio";
191			drive-strength = <2>;
192			bias-disable;
193		};
194
195		touchscreen-pins {
196			pins = "gpio13";
197			function = "gpio";
198			drive-strength = <2>;
199			bias-pull-up;
200		};
201	};
202
203	usb_id_default: usb-id-default-state {
204		pins = "gpio110";
205		function = "gpio";
206
207		drive-strength = <8>;
208		bias-pull-up;
209	};
210};
211