xref: /linux/arch/arm64/boot/dts/qcom/msm8939-wingtech-wt82918.dtsi (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
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	pinctrl-0 = <&blsp_uart2_console_default>;
130	pinctrl-1 = <&blsp_uart2_console_sleep>;
131	pinctrl-names = "default", "sleep";
132	status = "okay";
133};
134
135&mpss_mem {
136	reg = <0x0 0x86800000 0x0 0x5500000>;
137};
138
139&pm8916_pwm {
140	pinctrl-0 = <&pwm_out>;
141	pinctrl-names = "default";
142	status = "okay";
143};
144
145&pm8916_resin {
146	linux,code = <KEY_VOLUMEDOWN>;
147	status = "okay";
148};
149
150&pm8916_rpm_regulators {
151	pm8916_l17: l17 {
152		regulator-min-microvolt = <2850000>;
153		regulator-max-microvolt = <2850000>;
154	};
155};
156
157&pm8916_vib {
158	status = "okay";
159};
160
161&sdhc_1 {
162	status = "okay";
163};
164
165&sdhc_2 {
166	pinctrl-0 = <&sdc2_default>;
167	pinctrl-1 = <&sdc2_sleep>;
168	pinctrl-names = "default", "sleep";
169	non-removable;
170	status = "okay";
171};
172
173&usb {
174	extcon = <&usb_id>, <&usb_id>;
175	status = "okay";
176};
177
178&usb_hs_phy {
179	extcon = <&usb_id>;
180};
181
182&wcnss {
183	status = "okay";
184};
185
186&wcnss_iris {
187	compatible = "qcom,wcn3620";
188};
189
190&wcnss_mem {
191	status = "okay";
192};
193
194&tlmm {
195	accelerometer_default: accelerometer-default-state {
196		pins = "gpio115";
197		function = "gpio";
198		drive-strength = <6>;
199		bias-pull-up;
200	};
201
202	camera_front_flash_default: camera-front-flash-default-state {
203		pins = "gpio31", "gpio32";
204		function = "gpio";
205		drive-strength = <2>;
206		bias-disable;
207	};
208
209	gpio_keys_default: gpio-keys-default-state {
210		pins = "gpio107";
211		function = "gpio";
212		drive-strength = <2>;
213		bias-pull-up;
214	};
215
216	gpio_leds_default: gpio-leds-default-state {
217		pins = "gpio36", "gpio69";
218		function = "gpio";
219		drive-strength = <2>;
220		bias-disable;
221	};
222
223	touchscreen_default: touchscreen-default-state {
224		reset-pins {
225			pins = "gpio12";
226			function = "gpio";
227			drive-strength = <2>;
228			bias-disable;
229		};
230
231		touchscreen-pins {
232			pins = "gpio13";
233			function = "gpio";
234			drive-strength = <2>;
235			bias-pull-up;
236		};
237	};
238
239	usb_id_default: usb-id-default-state {
240		pins = "gpio110";
241		function = "gpio";
242		drive-strength = <8>;
243		bias-pull-up;
244	};
245};
246
247&pm8916_mpps {
248	pwm_out: mpp4-state {
249		pins = "mpp4";
250		function = "digital";
251		power-source = <PM8916_MPP_VPH>;
252		output-low;
253		qcom,dtest = <1>;
254	};
255};
256