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/leds/common.h>
10
11/ {
12	model = "GPLUS FL8005A";
13	compatible = "gplus,fl8005a", "qcom,msm8916";
14	chassis-type = "tablet";
15
16	aliases {
17		serial0 = &blsp1_uart2;
18	};
19
20	chosen {
21		stdout-path = "serial0";
22	};
23
24	flash-led-controller {
25		/* Actually qcom,leds-gpio-flash */
26		compatible = "sgmicro,sgm3140";
27		enable-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>;
28		flash-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;
29
30		pinctrl-0 = <&camera_flash_default>;
31		pinctrl-names = "default";
32
33		flash_led: led {
34			function = LED_FUNCTION_FLASH;
35			color = <LED_COLOR_ID_WHITE>;
36			flash-max-timeout-us = <250000>;
37		};
38	};
39
40	gpio-keys {
41		compatible = "gpio-keys";
42
43		pinctrl-0 = <&gpio_keys_default>;
44		pinctrl-names = "default";
45
46		button-volume-up {
47			label = "Volume Up";
48			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
49			linux,code = <KEY_VOLUMEUP>;
50		};
51	};
52
53	gpio-leds {
54		compatible = "gpio-leds";
55
56		pinctrl-0 = <&gpio_leds_default>;
57		pinctrl-names = "default";
58
59		led-red {
60			function = LED_FUNCTION_CHARGING;
61			color = <LED_COLOR_ID_RED>;
62			gpios = <&msmgpio 117 GPIO_ACTIVE_HIGH>;
63			retain-state-suspended;
64		};
65
66		led-green {
67			function = LED_FUNCTION_CHARGING;
68			color = <LED_COLOR_ID_GREEN>;
69			gpios = <&msmgpio 118 GPIO_ACTIVE_HIGH>;
70			retain-state-suspended;
71		};
72	};
73
74	usb_id: usb-id {
75		compatible = "linux,extcon-usb-gpio";
76		id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>;
77		pinctrl-0 = <&usb_id_default>;
78		pinctrl-names = "default";
79	};
80};
81
82&blsp_i2c5 {
83	status = "okay";
84
85	touchscreen@38 {
86		/* Actually ft5402 */
87		compatible = "edt,edt-ft5406";
88		reg = <0x38>;
89
90		interrupt-parent = <&msmgpio>;
91		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
92
93		reset-gpios = <&msmgpio 12 GPIO_ACTIVE_LOW>;
94
95		vcc-supply = <&pm8916_l17>;
96		iovcc-supply = <&pm8916_l6>;
97
98		touchscreen-size-x = <800>;
99		touchscreen-size-y = <500>;
100		touchscreen-inverted-x;
101		touchscreen-swapped-x-y;
102
103		pinctrl-0 = <&touchscreen_default>;
104		pinctrl-names = "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-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
127	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
128	pinctrl-names = "default", "sleep";
129
130	status = "okay";
131};
132
133&sdhc_2 {
134	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
135	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
136	pinctrl-names = "default", "sleep";
137
138	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
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 = <1800000>;
241		regulator-max-microvolt = <3300000>;
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	camera_flash_default: camera-flash-default-state {
257		pins = "gpio31", "gpio32";
258		function = "gpio";
259		drive-strength = <2>;
260		bias-disable;
261	};
262
263	gpio_keys_default: gpio-keys-default-state {
264		pins = "gpio107";
265		function = "gpio";
266		drive-strength = <2>;
267		bias-pull-up;
268	};
269
270	gpio_leds_default: gpio-led-default-state {
271		pins = "gpio117", "gpio118";
272		function = "gpio";
273		drive-strength = <2>;
274		bias-disable;
275	};
276
277	touchscreen_default: touchscreen-default-state {
278		reset-pins {
279			pins = "gpio12";
280			function = "gpio";
281			drive-strength = <2>;
282			bias-disable;
283		};
284
285		touchscreen-pins {
286			pins = "gpio13";
287			function = "gpio";
288			drive-strength = <2>;
289			bias-pull-up;
290		};
291	};
292
293	usb_id_default: usb-id-default-state {
294		pins = "gpio110";
295		function = "gpio";
296		drive-strength = <8>;
297		bias-pull-up;
298	};
299};
300