xref: /linux/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts (revision fa79e55d467366a2c52c68a261a0d6ea5f8a6534)
1// SPDX-License-Identifier: GPL-2.0-only
2
3/dts-v1/;
4
5#include "msm8916-pm8916.dtsi"
6#include "msm8916-modem-qdsp6.dtsi"
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/input/input.h>
10#include <dt-bindings/interrupt-controller/irq.h>
11
12/ {
13	model = "Asus Zenfone 2 Laser";
14	compatible = "asus,z00l", "qcom,msm8916";
15	chassis-type = "handset";
16
17	aliases {
18		mmc0 = &sdhc_1; /* eMMC */
19		mmc1 = &sdhc_2; /* SD card */
20		serial0 = &blsp_uart2;
21	};
22
23	chosen {
24		stdout-path = "serial0";
25	};
26
27	gpio-keys {
28		compatible = "gpio-keys";
29
30		pinctrl-names = "default";
31		pinctrl-0 = <&gpio_keys_default>;
32
33		label = "GPIO Buttons";
34
35		button-volume-up {
36			label = "Volume Up";
37			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
38			linux,code = <KEY_VOLUMEUP>;
39			debounce-interval = <15>;
40		};
41
42		button-volume-down {
43			label = "Volume Down";
44			gpios = <&tlmm 117 GPIO_ACTIVE_LOW>;
45			linux,code = <KEY_VOLUMEDOWN>;
46			debounce-interval = <15>;
47		};
48	};
49
50	reg_sd_vmmc: regulator-sdcard-vmmc {
51		compatible = "regulator-fixed";
52		regulator-name = "sdcard-vmmc";
53		regulator-min-microvolt = <2950000>;
54		regulator-max-microvolt = <2950000>;
55
56		gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
57		enable-active-high;
58
59		startup-delay-us = <200>;
60
61		pinctrl-names = "default";
62		pinctrl-0 = <&sd_vmmc_en_default>;
63	};
64
65	usb_id: usb-id {
66		compatible = "linux,extcon-usb-gpio";
67		id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
68		pinctrl-names = "default";
69		pinctrl-0 = <&usb_id_default>;
70	};
71};
72
73&blsp_i2c2 {
74	status = "okay";
75
76	magnetometer@c {
77		compatible = "asahi-kasei,ak09911";
78		reg = <0x0c>;
79
80		vdd-supply = <&pm8916_l8>;
81		vid-supply = <&pm8916_l6>;
82
83		reset-gpios = <&tlmm 112 GPIO_ACTIVE_LOW>;
84
85		pinctrl-names = "default";
86		pinctrl-0 = <&mag_reset_default>;
87	};
88
89	imu@68 {
90		compatible = "invensense,mpu6515";
91		reg = <0x68>;
92
93		interrupt-parent = <&tlmm>;
94		interrupts = <36 IRQ_TYPE_EDGE_RISING>;
95
96		vdd-supply = <&pm8916_l17>;
97		vddio-supply = <&pm8916_l6>;
98
99		pinctrl-names = "default";
100		pinctrl-0 = <&imu_default>;
101
102		mount-matrix = "1",  "0", "0",
103			       "0", "-1", "0",
104			       "0",  "0", "1";
105	};
106};
107
108&blsp_i2c5 {
109	status = "okay";
110
111	touchscreen@38 {
112		compatible = "edt,edt-ft5306";
113		reg = <0x38>;
114
115		interrupt-parent = <&tlmm>;
116		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
117
118		reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
119
120		vcc-supply = <&pm8916_l11>;
121		iovcc-supply = <&pm8916_l6>;
122
123		touchscreen-size-x = <720>;
124		touchscreen-size-y = <1280>;
125
126		pinctrl-names = "default";
127		pinctrl-0 = <&touchscreen_default>;
128	};
129};
130
131&blsp_uart2 {
132	status = "okay";
133	pinctrl-0 = <&blsp_uart2_console_default>;
134	pinctrl-1 = <&blsp_uart2_console_sleep>;
135	pinctrl-names = "default", "sleep";
136};
137
138&mpss_mem {
139	reg = <0x0 0x86800000 0x0 0x5500000>;
140};
141
142&pm8916_codec {
143	qcom,micbias-lvl = <2800>;
144	qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
145	qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
146	qcom,micbias1-ext-cap;
147	qcom,hphl-jack-type-normally-open;
148};
149
150&pm8916_rpm_regulators {
151	pm8916_l17: l17 {
152		regulator-min-microvolt = <2850000>;
153		regulator-max-microvolt = <2850000>;
154	};
155};
156
157&sdhc_1 {
158	status = "okay";
159};
160
161&sdhc_2 {
162	status = "okay";
163	vmmc-supply = <&reg_sd_vmmc>;
164
165	pinctrl-names = "default", "sleep";
166	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
167	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
168	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
169};
170
171&sound {
172	audio-routing =
173		"AMIC1", "MIC BIAS External1",
174		"AMIC2", "MIC BIAS Internal2",
175		"AMIC3", "MIC BIAS External1";
176};
177
178&usb {
179	status = "okay";
180	extcon = <&usb_id>, <&usb_id>;
181};
182
183&usb_hs_phy {
184	extcon = <&usb_id>;
185};
186
187&venus {
188	status = "okay";
189};
190
191&venus_mem {
192	status = "okay";
193};
194
195&wcnss {
196	status = "okay";
197};
198
199&wcnss_iris {
200	compatible = "qcom,wcn3620";
201};
202
203&wcnss_mem {
204	status = "okay";
205};
206
207&tlmm {
208	gpio_keys_default: gpio-keys-default-state {
209		pins = "gpio107", "gpio117";
210		function = "gpio";
211
212		drive-strength = <2>;
213		bias-pull-up;
214	};
215
216	imu_default: imu-default-state {
217		pins = "gpio36";
218		function = "gpio";
219
220		drive-strength = <2>;
221		bias-disable;
222	};
223
224	mag_reset_default: mag-reset-default-state {
225		pins = "gpio112";
226		function = "gpio";
227
228		drive-strength = <2>;
229		bias-disable;
230	};
231
232	sd_vmmc_en_default: sd-vmmc-en-default-state {
233		pins = "gpio87";
234		function = "gpio";
235
236		drive-strength = <2>;
237		bias-disable;
238	};
239
240	sdc2_cd_default: sdc2-cd-default-state {
241		pins = "gpio38";
242		function = "gpio";
243		drive-strength = <2>;
244		bias-disable;
245	};
246
247	touchscreen_default: touchscreen-default-state {
248		touch-pins {
249			pins = "gpio13";
250			function = "gpio";
251
252			drive-strength = <2>;
253			bias-pull-up;
254		};
255
256		reset-pins {
257			pins = "gpio12";
258			function = "gpio";
259
260			drive-strength = <2>;
261			bias-disable;
262		};
263	};
264
265	usb_id_default: usb-id-default-state {
266		pins = "gpio110";
267		function = "gpio";
268
269		drive-strength = <8>;
270		bias-pull-up;
271	};
272};
273