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		mmc0 = &sdhc_1; /* eMMC */
18		mmc1 = &sdhc_2; /* SD card */
19		serial0 = &blsp_uart2;
20	};
21
22	chosen {
23		stdout-path = "serial0";
24	};
25
26	flash-led-controller {
27		/* Actually qcom,leds-gpio-flash */
28		compatible = "sgmicro,sgm3140";
29		enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
30		flash-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
31
32		pinctrl-0 = <&camera_flash_default>;
33		pinctrl-names = "default";
34
35		flash_led: led {
36			function = LED_FUNCTION_FLASH;
37			color = <LED_COLOR_ID_WHITE>;
38			flash-max-timeout-us = <250000>;
39		};
40	};
41
42	gpio-keys {
43		compatible = "gpio-keys";
44
45		pinctrl-0 = <&gpio_keys_default>;
46		pinctrl-names = "default";
47
48		button-volume-up {
49			label = "Volume Up";
50			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
51			linux,code = <KEY_VOLUMEUP>;
52		};
53	};
54
55	gpio-leds {
56		compatible = "gpio-leds";
57
58		pinctrl-0 = <&gpio_leds_default>;
59		pinctrl-names = "default";
60
61		led-red {
62			function = LED_FUNCTION_CHARGING;
63			color = <LED_COLOR_ID_RED>;
64			gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;
65			retain-state-suspended;
66		};
67
68		led-green {
69			function = LED_FUNCTION_CHARGING;
70			color = <LED_COLOR_ID_GREEN>;
71			gpios = <&tlmm 118 GPIO_ACTIVE_HIGH>;
72			retain-state-suspended;
73		};
74	};
75
76	usb_id: usb-id {
77		compatible = "linux,extcon-usb-gpio";
78		id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
79		pinctrl-0 = <&usb_id_default>;
80		pinctrl-names = "default";
81	};
82};
83
84&blsp_i2c5 {
85	status = "okay";
86
87	touchscreen@38 {
88		/* Actually ft5402 */
89		compatible = "edt,edt-ft5406";
90		reg = <0x38>;
91
92		interrupt-parent = <&tlmm>;
93		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
94
95		reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
96
97		vcc-supply = <&pm8916_l17>;
98		iovcc-supply = <&pm8916_l6>;
99
100		touchscreen-size-x = <800>;
101		touchscreen-size-y = <500>;
102		touchscreen-inverted-x;
103		touchscreen-swapped-x-y;
104
105		pinctrl-0 = <&touchscreen_default>;
106		pinctrl-names = "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_l17: l17 {
121		regulator-min-microvolt = <2850000>;
122		regulator-max-microvolt = <2850000>;
123	};
124};
125
126&pm8916_vib {
127	status = "okay";
128};
129
130&sdhc_1 {
131	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
132	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
133	pinctrl-names = "default", "sleep";
134
135	status = "okay";
136};
137
138&sdhc_2 {
139	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
140	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
141	pinctrl-names = "default", "sleep";
142
143	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
144
145	status = "okay";
146};
147
148&usb {
149	extcon = <&usb_id>, <&usb_id>;
150	status = "okay";
151};
152
153&usb_hs_phy {
154	extcon = <&usb_id>;
155};
156
157&wcnss {
158	status = "okay";
159};
160
161&wcnss_iris {
162	compatible = "qcom,wcn3620";
163};
164
165&tlmm {
166	camera_flash_default: camera-flash-default-state {
167		pins = "gpio31", "gpio32";
168		function = "gpio";
169		drive-strength = <2>;
170		bias-disable;
171	};
172
173	gpio_keys_default: gpio-keys-default-state {
174		pins = "gpio107";
175		function = "gpio";
176		drive-strength = <2>;
177		bias-pull-up;
178	};
179
180	gpio_leds_default: gpio-led-default-state {
181		pins = "gpio117", "gpio118";
182		function = "gpio";
183		drive-strength = <2>;
184		bias-disable;
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		drive-strength = <8>;
207		bias-pull-up;
208	};
209};
210