xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/msm8916-longcheer-l8910.dts (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
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/leds/common.h>
11#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
12
13/ {
14	model = "BQ Aquaris X5 (Longcheer L8910)";
15	compatible = "longcheer,l8910", "qcom,msm8916";
16	chassis-type = "handset";
17
18	aliases {
19		mmc0 = &sdhc_1; /* eMMC */
20		mmc1 = &sdhc_2; /* SD card */
21		serial0 = &blsp_uart2;
22	};
23
24	chosen {
25		stdout-path = "serial0";
26	};
27
28	speaker_amp: audio-amplifier {
29		compatible = "awinic,aw8738";
30		mode-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>;
31		awinic,mode = <5>;
32		sound-name-prefix = "Speaker Amp";
33
34		pinctrl-0 = <&spk_ext_pa_default>;
35		pinctrl-names = "default";
36	};
37
38	flash-led-controller {
39		compatible = "ocs,ocp8110";
40		enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
41		flash-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
42
43		pinctrl-0 = <&camera_front_flash_default>;
44		pinctrl-names = "default";
45
46		flash_led: led {
47			function = LED_FUNCTION_FLASH;
48			color = <LED_COLOR_ID_WHITE>;
49			flash-max-timeout-us = <250000>;
50		};
51	};
52
53	gpio-keys {
54		compatible = "gpio-keys";
55
56		pinctrl-names = "default";
57		pinctrl-0 = <&gpio_keys_default>;
58
59		label = "GPIO Buttons";
60
61		button-volume-up {
62			label = "Volume Up";
63			gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
64			linux,code = <KEY_VOLUMEUP>;
65		};
66	};
67
68	leds {
69		compatible = "gpio-leds";
70
71		led-0 {
72			gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
73			color = <LED_COLOR_ID_WHITE>;
74			default-state = "off";
75			function = LED_FUNCTION_KBD_BACKLIGHT;
76
77			pinctrl-names = "default";
78			pinctrl-0 = <&button_backlight_default>;
79		};
80	};
81
82	usb_id: usb-id {
83		compatible = "linux,extcon-usb-gpio";
84		id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
85		pinctrl-names = "default";
86		pinctrl-0 = <&usb_id_default>;
87	};
88};
89
90&blsp_i2c2 {
91	status = "okay";
92
93	led-controller@30 {
94		compatible = "kinetic,ktd2026";
95		reg = <0x30>;
96		#address-cells = <1>;
97		#size-cells = <0>;
98
99		vin-supply = <&pm8916_l17>;
100		vio-supply = <&pm8916_l6>;
101
102		pinctrl-0 = <&status_led_default>;
103		pinctrl-names = "default";
104
105		multi-led {
106			color = <LED_COLOR_ID_RGB>;
107			function = LED_FUNCTION_STATUS;
108
109			#address-cells = <1>;
110			#size-cells = <0>;
111
112			led@0 {
113				reg = <0>;
114				color = <LED_COLOR_ID_RED>;
115			};
116
117			led@1 {
118				reg = <1>;
119				color = <LED_COLOR_ID_GREEN>;
120			};
121
122			led@2 {
123				reg = <2>;
124				color = <LED_COLOR_ID_BLUE>;
125			};
126		};
127	};
128
129	flash-led-controller@53 {
130		compatible = "silergy,sy7802";
131		reg = <0x53>;
132
133		enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
134
135		pinctrl-0 = <&camera_rear_flash_default>;
136		pinctrl-names = "default";
137
138		#address-cells = <1>;
139		#size-cells = <0>;
140
141		led@0 {
142			reg = <0>;
143			function = LED_FUNCTION_FLASH;
144			color = <LED_COLOR_ID_WHITE>;
145			led-sources = <0>, <1>;
146		};
147	};
148};
149
150&blsp_i2c3 {
151	status = "okay";
152
153	magnetometer@d {
154		compatible = "asahi-kasei,ak09911";
155		reg = <0x0d>;
156
157		vdd-supply = <&pm8916_l17>;
158		vid-supply = <&pm8916_l6>;
159
160		reset-gpios = <&tlmm 111 GPIO_ACTIVE_LOW>;
161
162		pinctrl-names = "default";
163		pinctrl-0 = <&mag_reset_default>;
164	};
165
166	imu@68 {
167		compatible = "bosch,bmi160";
168		reg = <0x68>;
169
170		vdd-supply = <&pm8916_l17>;
171		vddio-supply = <&pm8916_l6>;
172
173		mount-matrix = "0", "1", "0",
174			      "-1", "0", "0",
175			       "0", "0", "1";
176	};
177};
178
179&blsp_uart2 {
180	status = "okay";
181	pinctrl-0 = <&blsp_uart2_console_default>;
182	pinctrl-1 = <&blsp_uart2_console_sleep>;
183	pinctrl-names = "default", "sleep";
184};
185
186&mpss_mem {
187	reg = <0x0 0x86800000 0x0 0x5000000>;
188};
189
190&pm8916_codec {
191	qcom,micbias-lvl = <2800>;
192	qcom,mbhc-vthreshold-low = <75 100 120 180 500>;
193	qcom,mbhc-vthreshold-high = <75 100 120 180 500>;
194	qcom,hphl-jack-type-normally-open;
195};
196
197&pm8916_gpios {
198	status_led_default: status-led-default-state {
199		pins = "gpio3";
200		function = PMIC_GPIO_FUNC_NORMAL;
201		power-source = <PM8916_GPIO_VPH>;
202		bias-disable;
203		output-high;
204	};
205};
206
207&pm8916_resin {
208	status = "okay";
209	linux,code = <KEY_VOLUMEDOWN>;
210};
211
212&pm8916_rpm_regulators {
213	pm8916_l17: l17 {
214		regulator-min-microvolt = <2850000>;
215		regulator-max-microvolt = <2850000>;
216	};
217};
218
219&pm8916_vib {
220	status = "okay";
221};
222
223&sdhc_1 {
224	status = "okay";
225};
226
227&sdhc_2 {
228	status = "okay";
229
230	pinctrl-names = "default", "sleep";
231	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
232	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
233
234	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
235};
236
237&sound {
238	/*
239	 * Provide widgets/pin-switches to allow enabling speaker separately.
240	 * The hardware does not provide a way to disable the output via the
241	 * headphone jack when the speaker is enabled.
242	 */
243	model = "bq-paella";
244	widgets =
245		"Speaker", "Speaker",
246		"Headphone", "Headphones";
247	pin-switches = "Speaker";
248	audio-routing =
249		"Speaker", "Speaker Amp OUT",
250		"Speaker Amp IN", "HPH_R",
251		"Headphones", "HPH_L",
252		"Headphones", "HPH_R",
253		"AMIC1", "MIC BIAS External1",
254		"AMIC2", "MIC BIAS Internal2",
255		"AMIC3", "MIC BIAS External1";
256	aux-devs = <&speaker_amp>;
257};
258
259&usb {
260	status = "okay";
261	extcon = <&usb_id>, <&usb_id>;
262};
263
264&usb_hs_phy {
265	extcon = <&usb_id>;
266};
267
268&venus {
269	status = "okay";
270};
271
272&venus_mem {
273	status = "okay";
274};
275
276&wcnss {
277	status = "okay";
278};
279
280&wcnss_iris {
281	compatible = "qcom,wcn3620";
282};
283
284&wcnss_mem {
285	status = "okay";
286};
287
288&tlmm {
289	button_backlight_default: button-backlight-default-state {
290		pins = "gpio17";
291		function = "gpio";
292
293		drive-strength = <2>;
294		bias-disable;
295	};
296
297	camera_front_flash_default: camera-front-flash-default-state {
298		pins = "gpio49", "gpio119";
299		function = "gpio";
300		drive-strength = <2>;
301		bias-disable;
302	};
303
304	camera_rear_flash_default: camera-rear-flash-default-state {
305		pins = "gpio9", "gpio16", "gpio117";
306		function = "gpio";
307		drive-strength = <2>;
308		bias-disable;
309	};
310
311	gpio_keys_default: gpio-keys-default-state {
312		pins = "gpio107";
313		function = "gpio";
314
315		drive-strength = <2>;
316		bias-pull-up;
317	};
318
319	mag_reset_default: mag-reset-default-state {
320		pins = "gpio111";
321		function = "gpio";
322
323		drive-strength = <2>;
324		bias-disable;
325	};
326
327	sdc2_cd_default: sdc2-cd-default-state {
328		pins = "gpio38";
329		function = "gpio";
330		drive-strength = <2>;
331		bias-disable;
332	};
333
334	spk_ext_pa_default: spk-ext-pa-default-state {
335		pins = "gpio114";
336		function = "gpio";
337		drive-strength = <2>;
338		bias-disable;
339	};
340
341	usb_id_default: usb-id-default-state {
342		pins = "gpio110";
343		function = "gpio";
344
345		drive-strength = <8>;
346		bias-pull-up;
347	};
348};
349