xref: /linux/arch/arm64/boot/dts/qcom/msm8939-wingtech-wt82918.dtsi (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1// SPDX-License-Identifier: GPL-2.0-only
2
3#include "msm8916-modem-qdsp6.dtsi"
4
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/leds/common.h>
7#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
8
9/ {
10	aliases {
11		mmc0 = &sdhc_1; /* eMMC */
12		mmc1 = &sdhc_2; /* SD card */
13		serial0 = &blsp_uart2;
14	};
15
16	chosen {
17		stdout-path = "serial0";
18	};
19
20	backlight: backlight {
21		compatible = "pwm-backlight";
22		pwms = <&pm8916_pwm 0 100000>;
23		brightness-levels = <0 255>;
24		num-interpolated-steps = <255>;
25		default-brightness-level = <128>;
26	};
27
28	flash-led-controller {
29		compatible = "sgmicro,sgm3140";
30		enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
31		flash-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
32
33		pinctrl-0 = <&camera_front_flash_default>;
34		pinctrl-names = "default";
35
36		flash_led: led {
37			function = LED_FUNCTION_FLASH;
38			color = <LED_COLOR_ID_WHITE>;
39		};
40	};
41
42	gpio-keys {
43		compatible = "gpio-keys";
44
45		pinctrl-0 = <&gpio_keys_default>;
46		pinctrl-names = "default";
47
48		label = "GPIO Buttons";
49
50		button-volume-up {
51			label = "Volume Up";
52			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
53			linux,code = <KEY_VOLUMEUP>;
54		};
55	};
56
57	gpio-leds {
58		compatible = "gpio-leds";
59
60		pinctrl-0 = <&gpio_leds_default>;
61		pinctrl-names = "default";
62
63		led-0 {
64			gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
65			function = LED_FUNCTION_CHARGING;
66			color = <LED_COLOR_ID_RED>;
67			default-state = "off";
68			retain-state-suspended;
69		};
70
71		led-1 {
72			gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
73			function = LED_FUNCTION_STATUS;
74			color = <LED_COLOR_ID_GREEN>;
75			default-state = "off";
76			retain-state-suspended;
77		};
78	};
79
80	usb_id: usb-id {
81		compatible = "linux,extcon-usb-gpio";
82		id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
83		pinctrl-0 = <&usb_id_default>;
84		pinctrl-names = "default";
85	};
86};
87
88&blsp_i2c2 {
89	status = "okay";
90
91	accelerometer@68 {
92		compatible = "invensense,icm20608";
93		reg = <0x68>;
94
95		interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_FALLING>;
96
97		pinctrl-0 = <&accelerometer_default>;
98		pinctrl-names = "default";
99
100		vdd-supply = <&pm8916_l17>;
101		vddio-supply = <&pm8916_l6>;
102
103		mount-matrix = "-1", "0", "0",
104				"0", "1", "0",
105				"0", "0", "1";
106	};
107};
108
109&blsp_i2c5 {
110	status = "okay";
111
112	touchscreen: touchscreen@38 {
113		compatible = "edt,edt-ft5306";
114		reg = <0x38>;
115
116		interrupts-extended = <&tlmm 13 IRQ_TYPE_LEVEL_LOW>;
117
118		pinctrl-0 = <&touchscreen_default>;
119		pinctrl-names = "default";
120
121		vcc-supply = <&pm8916_l17>;
122		iovcc-supply = <&pm8916_l6>;
123
124		reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
125	};
126};
127
128&blsp_uart2 {
129	status = "okay";
130};
131
132&mpss_mem {
133	reg = <0x0 0x86800000 0x0 0x5500000>;
134};
135
136&pm8916_pwm {
137	pinctrl-0 = <&pwm_out>;
138	pinctrl-names = "default";
139	status = "okay";
140};
141
142&pm8916_resin {
143	linux,code = <KEY_VOLUMEDOWN>;
144	status = "okay";
145};
146
147&pm8916_rpm_regulators {
148	pm8916_l17: l17 {
149		regulator-min-microvolt = <2850000>;
150		regulator-max-microvolt = <2850000>;
151	};
152};
153
154&pm8916_vib {
155	status = "okay";
156};
157
158&sdhc_1 {
159	status = "okay";
160};
161
162&sdhc_2 {
163	pinctrl-0 = <&sdc2_default>;
164	pinctrl-1 = <&sdc2_sleep>;
165	pinctrl-names = "default", "sleep";
166	non-removable;
167	status = "okay";
168};
169
170&usb {
171	extcon = <&usb_id>, <&usb_id>;
172	status = "okay";
173};
174
175&usb_hs_phy {
176	extcon = <&usb_id>;
177};
178
179&wcnss {
180	status = "okay";
181};
182
183&wcnss_iris {
184	compatible = "qcom,wcn3620";
185};
186
187&wcnss_mem {
188	status = "okay";
189};
190
191&tlmm {
192	accelerometer_default: accelerometer-default-state {
193		pins = "gpio115";
194		function = "gpio";
195		drive-strength = <6>;
196		bias-pull-up;
197	};
198
199	camera_front_flash_default: camera-front-flash-default-state {
200		pins = "gpio31", "gpio32";
201		function = "gpio";
202		drive-strength = <2>;
203		bias-disable;
204	};
205
206	gpio_keys_default: gpio-keys-default-state {
207		pins = "gpio107";
208		function = "gpio";
209		drive-strength = <2>;
210		bias-pull-up;
211	};
212
213	gpio_leds_default: gpio-leds-default-state {
214		pins = "gpio36", "gpio69";
215		function = "gpio";
216		drive-strength = <2>;
217		bias-disable;
218	};
219
220	touchscreen_default: touchscreen-default-state {
221		reset-pins {
222			pins = "gpio12";
223			function = "gpio";
224			drive-strength = <2>;
225			bias-disable;
226		};
227
228		touchscreen-pins {
229			pins = "gpio13";
230			function = "gpio";
231			drive-strength = <2>;
232			bias-pull-up;
233		};
234	};
235
236	usb_id_default: usb-id-default-state {
237		pins = "gpio110";
238		function = "gpio";
239		drive-strength = <8>;
240		bias-pull-up;
241	};
242};
243
244&pm8916_mpps {
245	pwm_out: mpp4-state {
246		pins = "mpp4";
247		function = "digital";
248		power-source = <PM8916_MPP_VPH>;
249		output-low;
250		qcom,dtest = <1>;
251	};
252};
253