xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/apq8096-db820c.dts (revision a8089ea5aee578e08acab2438e82fc9a9ae50ed8)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
4 */
5
6/dts-v1/;
7
8#include "msm8996.dtsi"
9#include "pm8994.dtsi"
10#include "pmi8994.dtsi"
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/leds/common.h>
14#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
15#include <dt-bindings/sound/qcom,q6afe.h>
16#include <dt-bindings/sound/qcom,q6asm.h>
17#include <dt-bindings/sound/qcom,wcd9335.h>
18
19/*
20 * GPIO name legend: proper name = the GPIO line is used as GPIO
21 *         NC      = not connected (pin out but not routed from the chip to
22 *                   anything the board)
23 *         "[PER]" = pin is muxed for [peripheral] (not GPIO)
24 *         LSEC    = Low Speed External Connector
25 *         P HSEC  = Primary High Speed External Connector
26 *         S HSEC  = Secondary High Speed External Connector
27 *         J14     = Camera Connector
28 *         TP      = Test Points
29 *
30 * Line names are taken from the schematic "DragonBoard 820c",
31 * drawing no: LM25-P2751-1
32 *
33 * For the lines routed to the external connectors the
34 * lines are named after the 96Boards CE Specification 1.0,
35 * Appendix "Expansion Connector Signal Description".
36 *
37 * When the 96Board naming of a line and the schematic name of
38 * the same line are in conflict, the 96Board specification
39 * takes precedence, which means that the external UART on the
40 * LSEC is named UART0 while the schematic and SoC names this
41 * UART3. This is only for the informational lines i.e. "[FOO]",
42 * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
43 * ones actually used for GPIO.
44 */
45
46/ {
47	model = "Qualcomm Technologies, Inc. DB820c";
48	compatible = "arrow,apq8096-db820c", "qcom,apq8096-sbc", "qcom,apq8096";
49
50	aliases {
51		serial0 = &blsp2_uart2;
52		serial1 = &blsp2_uart3;
53		serial2 = &blsp1_uart2;
54		i2c0 = &blsp1_i2c3;
55		i2c1 = &blsp2_i2c1;
56		i2c2 = &blsp2_i2c1;
57		spi0 = &blsp1_spi1;
58		spi1 = &blsp2_spi6;
59	};
60
61	chosen {
62		stdout-path = "serial0:115200n8";
63	};
64
65	clocks {
66		divclk4: divclk4 {
67			compatible = "fixed-clock";
68			#clock-cells = <0>;
69			clock-frequency = <32768>;
70			clock-output-names = "divclk4";
71
72			pinctrl-names = "default";
73			pinctrl-0 = <&divclk4_pin_a>;
74		};
75
76		div1_mclk: divclk1 {
77			compatible = "gpio-gate-clock";
78			pinctrl-0 = <&audio_mclk>;
79			pinctrl-names = "default";
80			clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
81			#clock-cells = <0>;
82			enable-gpios = <&pm8994_gpios 15 0>;
83		};
84	};
85
86	gpio-keys {
87		compatible = "gpio-keys";
88		autorepeat;
89
90		pinctrl-names = "default";
91		pinctrl-0 = <&volume_up_gpio>;
92
93		button {
94			label = "Volume Up";
95			linux,code = <KEY_VOLUMEUP>;
96			gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
97		};
98	};
99
100	usb2_id: usb2-id {
101		compatible = "linux,extcon-usb-gpio";
102		id-gpio = <&pmi8994_gpios 6 GPIO_ACTIVE_HIGH>;
103		pinctrl-names = "default";
104		pinctrl-0 = <&usb2_vbus_det_gpio>;
105	};
106
107	usb3_id: usb3-id {
108		compatible = "linux,extcon-usb-gpio";
109		id-gpio = <&pm8994_gpios 22 GPIO_ACTIVE_HIGH>;
110		pinctrl-names = "default";
111		pinctrl-0 = <&usb3_vbus_det_gpio>;
112	};
113
114	vph_pwr: vph-pwr-regulator {
115		compatible = "regulator-fixed";
116		regulator-name = "vph_pwr";
117		regulator-always-on;
118		regulator-boot-on;
119
120		regulator-min-microvolt = <3700000>;
121		regulator-max-microvolt = <3700000>;
122	};
123
124	wlan_en: wlan-en-1-8v {
125		pinctrl-names = "default";
126		pinctrl-0 = <&wlan_en_gpios>;
127		compatible = "regulator-fixed";
128		regulator-name = "wlan-en-regulator";
129		regulator-min-microvolt = <1800000>;
130		regulator-max-microvolt = <1800000>;
131
132		gpio = <&pm8994_gpios 8 0>;
133
134		/* WLAN card specific delay */
135		startup-delay-us = <70000>;
136		enable-active-high;
137	};
138};
139
140&blsp1_i2c3 {
141	/* On Low speed expansion */
142	label = "LS-I2C0";
143	status = "okay";
144};
145
146&blsp1_spi1 {
147	/* On Low speed expansion */
148	status = "okay";
149};
150
151&blsp1_uart2 {
152	label = "BT-UART";
153	status = "okay";
154
155	bluetooth {
156		compatible = "qcom,qca6174-bt";
157
158		/* bt_disable_n gpio */
159		enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
160
161		clocks = <&divclk4>;
162	};
163};
164
165&adsp_pil {
166	status = "okay";
167	firmware-name = "qcom/apq8096/adsp.mbn";
168};
169
170&blsp2_i2c1 {
171	/* On High speed expansion */
172	label = "HS-I2C2";
173	status = "okay";
174};
175
176&blsp2_i2c1 {
177	/* On Low speed expansion */
178	label = "LS-I2C1";
179	status = "okay";
180};
181
182&blsp2_spi6 {
183	/* On High speed expansion */
184	status = "okay";
185};
186
187&blsp2_uart2 {
188	label = "LS-UART1";
189	status = "okay";
190	pinctrl-names = "default", "sleep";
191	pinctrl-0 = <&blsp2_uart2_2pins_default>;
192	pinctrl-1 = <&blsp2_uart2_2pins_sleep>;
193};
194
195&blsp2_uart3 {
196	label = "LS-UART0";
197	status = "disabled";
198	pinctrl-names = "default", "sleep";
199	pinctrl-0 = <&blsp2_uart3_4pins_default>;
200	pinctrl-1 = <&blsp2_uart3_4pins_sleep>;
201};
202
203&camss {
204	vdda-supply = <&vreg_l2a_1p25>;
205};
206
207&gpu {
208	status = "okay";
209};
210
211&hsusb_phy1 {
212	status = "okay";
213
214	vdd-supply = <&vreg_l28a_0p925>;
215	vdda-pll-supply = <&vreg_l12a_1p8>;
216	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
217};
218
219&hsusb_phy2 {
220	status = "okay";
221
222	vdd-supply = <&vreg_l28a_0p925>;
223	vdda-pll-supply = <&vreg_l12a_1p8>;
224	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
225};
226
227&mdp {
228	status = "okay";
229};
230
231&mdss {
232	status = "okay";
233};
234
235&mdss_hdmi {
236	status = "okay";
237
238	pinctrl-names = "default", "sleep";
239	pinctrl-0 = <&mdss_hdmi_hpd_active &mdss_hdmi_ddc_active>;
240	pinctrl-1 = <&mdss_hdmi_hpd_suspend &mdss_hdmi_ddc_suspend>;
241
242	core-vdda-supply = <&vreg_l12a_1p8>;
243	core-vcc-supply = <&vreg_s4a_1p8>;
244};
245
246&mdss_hdmi_phy {
247	status = "okay";
248
249	vddio-supply = <&vreg_l12a_1p8>;
250	vcca-supply = <&vreg_l28a_0p925>;
251	#phy-cells = <0>;
252};
253
254&mmcc {
255	vdd-gfx-supply = <&vdd_gfx>;
256};
257
258&mss_pil {
259	status = "okay";
260	pll-supply = <&vreg_l12a_1p8>;
261	firmware-name = "qcom/apq8096/mba.mbn", "qcom/apq8096/modem.mbn";
262};
263
264&pm8994_resin {
265	status = "okay";
266	linux,code = <KEY_VOLUMEDOWN>;
267};
268
269&tlmm {
270	gpio-line-names =
271		"[SPI0_DOUT]", /* GPIO_0, BLSP1_SPI_MOSI, LSEC pin 14 */
272		"[SPI0_DIN]", /* GPIO_1, BLSP1_SPI_MISO, LSEC pin 10 */
273		"[SPI0_CS]", /* GPIO_2, BLSP1_SPI_CS_N, LSEC pin 12 */
274		"[SPI0_SCLK]", /* GPIO_3, BLSP1_SPI_CLK, LSEC pin 8 */
275		"[UART1_TxD]", /* GPIO_4, BLSP8_UART_TX, LSEC pin 11 */
276		"[UART1_RxD]", /* GPIO_5, BLSP8_UART_RX, LSEC pin 13 */
277		"[I2C1_SDA]", /* GPIO_6, BLSP8_I2C_SDA, LSEC pin 21 */
278		"[I2C1_SCL]", /* GPIO_7, BLSP8_I2C_SCL, LSEC pin 19 */
279		"GPIO-H", /* GPIO_8, LCD0_RESET_N, LSEC pin 30 */
280		"TP93", /* GPIO_9 */
281		"GPIO-G", /* GPIO_10, MDP_VSYNC_P, LSEC pin 29 */
282		"[MDP_VSYNC_S]", /* GPIO_11, S HSEC pin 55 */
283		"NC", /* GPIO_12 */
284		"[CSI0_MCLK]", /* GPIO_13, CAM_MCLK0, P HSEC pin 15 */
285		"[CAM_MCLK1]", /* GPIO_14, J14 pin 11 */
286		"[CSI1_MCLK]", /* GPIO_15, CAM_MCLK2, P HSEC pin 17 */
287		"TP99", /* GPIO_16 */
288		"[I2C2_SDA]", /* GPIO_17, CCI_I2C_SDA0, P HSEC pin 34 */
289		"[I2C2_SCL]", /* GPIO_18, CCI_I2C_SCL0, P HSEC pin 32 */
290		"[CCI_I2C_SDA1]", /* GPIO_19, S HSEC pin 38 */
291		"[CCI_I2C_SCL1]", /* GPIO_20, S HSEC pin 36 */
292		"FLASH_STROBE_EN", /* GPIO_21, S HSEC pin 5 */
293		"FLASH_STROBE_TRIG", /* GPIO_22, S HSEC pin 1 */
294		"GPIO-K", /* GPIO_23, CAM2_RST_N, LSEC pin 33 */
295		"GPIO-D", /* GPIO_24, LSEC pin 26 */
296		"GPIO-I", /* GPIO_25, CAM0_RST_N, LSEC pin 31 */
297		"GPIO-J", /* GPIO_26, CAM0_STANDBY_N, LSEC pin 32 */
298		"BLSP6_I2C_SDA", /* GPIO_27 */
299		"BLSP6_I2C_SCL", /* GPIO_28 */
300		"GPIO-B", /* GPIO_29, TS0_RESET_N, LSEC pin 24 */
301		"GPIO30", /* GPIO_30, S HSEC pin 4 */
302		"HDMI_CEC", /* GPIO_31 */
303		"HDMI_DDC_CLOCK", /* GPIO_32 */
304		"HDMI_DDC_DATA", /* GPIO_33 */
305		"HDMI_HOT_PLUG_DETECT", /* GPIO_34 */
306		"PCIE0_RST_N", /* GPIO_35 */
307		"PCIE0_CLKREQ_N", /* GPIO_36 */
308		"PCIE0_WAKE", /* GPIO_37 */
309		"SD_CARD_DET_N", /* GPIO_38 */
310		"TSIF1_SYNC", /* GPIO_39, S HSEC pin 48 */
311		"W_DISABLE_N", /* GPIO_40 */
312		"[BLSP9_UART_TX]", /* GPIO_41 */
313		"[BLSP9_UART_RX]", /* GPIO_42 */
314		"[BLSP2_UART_CTS_N]", /* GPIO_43 */
315		"[BLSP2_UART_RFR_N]", /* GPIO_44 */
316		"[BLSP3_UART_TX]", /* GPIO_45 */
317		"[BLSP3_UART_RX]", /* GPIO_46 */
318		"[I2C0_SDA]", /* GPIO_47, LS_I2C0_SDA, LSEC pin 17 */
319		"[I2C0_SCL]", /* GPIO_48, LS_I2C0_SCL, LSEC pin 15 */
320		"[UART0_TxD]", /* GPIO_49, BLSP9_UART_TX, LSEC pin 5 */
321		"[UART0_RxD]", /* GPIO_50, BLSP9_UART_RX, LSEC pin 7 */
322		"[UART0_CTS]", /* GPIO_51, BLSP9_UART_CTS_N, LSEC pin 3 */
323		"[UART0_RTS]", /* GPIO_52, BLSP9_UART_RFR_N, LSEC pin 9 */
324		"[CODEC_INT1_N]", /* GPIO_53 */
325		"[CODEC_INT2_N]", /* GPIO_54 */
326		"[BLSP7_I2C_SDA]", /* GPIO_55 */
327		"[BLSP7_I2C_SCL]", /* GPIO_56 */
328		"MI2S_MCLK", /* GPIO_57, S HSEC pin 3 */
329		"[PCM_CLK]", /* GPIO_58, QUA_MI2S_SCK, LSEC pin 18 */
330		"[PCM_FS]", /* GPIO_59, QUA_MI2S_WS, LSEC pin 16 */
331		"[PCM_DO]", /* GPIO_60, QUA_MI2S_DATA0, LSEC pin 20 */
332		"[PCM_DI]", /* GPIO_61, QUA_MI2S_DATA1, LSEC pin 22 */
333		"GPIO-E", /* GPIO_62, LSEC pin 27 */
334		"TP87", /* GPIO_63 */
335		"[CODEC_RST_N]", /* GPIO_64 */
336		"[PCM1_CLK]", /* GPIO_65 */
337		"[PCM1_SYNC]", /* GPIO_66 */
338		"[PCM1_DIN]", /* GPIO_67 */
339		"[PCM1_DOUT]", /* GPIO_68 */
340		"AUDIO_REF_CLK", /* GPIO_69 */
341		"SLIMBUS_CLK", /* GPIO_70 */
342		"SLIMBUS_DATA0", /* GPIO_71 */
343		"SLIMBUS_DATA1", /* GPIO_72 */
344		"NC", /* GPIO_73 */
345		"NC", /* GPIO_74 */
346		"NC", /* GPIO_75 */
347		"NC", /* GPIO_76 */
348		"TP94", /* GPIO_77 */
349		"NC", /* GPIO_78 */
350		"TP95", /* GPIO_79 */
351		"GPIO-A", /* GPIO_80, MEMS_RESET_N, LSEC pin 23 */
352		"TP88", /* GPIO_81 */
353		"TP89", /* GPIO_82 */
354		"TP90", /* GPIO_83 */
355		"TP91", /* GPIO_84 */
356		"[SD_DAT0]", /* GPIO_85, BLSP12_SPI_MOSI, P HSEC pin 1 */
357		"[SD_CMD]", /* GPIO_86, BLSP12_SPI_MISO, P HSEC pin 11 */
358		"[SD_DAT3]", /* GPIO_87, BLSP12_SPI_CS_N, P HSEC pin 7 */
359		"[SD_SCLK]", /* GPIO_88, BLSP12_SPI_CLK, P HSEC pin 9 */
360		"TSIF1_CLK", /* GPIO_89, S HSEC pin 42 */
361		"TSIF1_EN", /* GPIO_90, S HSEC pin 46 */
362		"TSIF1_DATA", /* GPIO_91, S HSEC pin 44 */
363		"NC", /* GPIO_92 */
364		"TSIF2_CLK", /* GPIO_93, S HSEC pin 52 */
365		"TSIF2_EN", /* GPIO_94, S HSEC pin 56 */
366		"TSIF2_DATA", /* GPIO_95, S HSEC pin 54 */
367		"TSIF2_SYNC", /* GPIO_96, S HSEC pin 58 */
368		"NC", /* GPIO_97 */
369		"CAM1_STANDBY_N", /* GPIO_98 */
370		"NC", /* GPIO_99 */
371		"NC", /* GPIO_100 */
372		"[LCD1_RESET_N]", /* GPIO_101, S HSEC pin 51 */
373		"BOOT_CONFIG1", /* GPIO_102 */
374		"USB_HUB_RESET", /* GPIO_103 */
375		"CAM1_RST_N", /* GPIO_104 */
376		"NC", /* GPIO_105 */
377		"NC", /* GPIO_106 */
378		"NC", /* GPIO_107 */
379		"NC", /* GPIO_108 */
380		"NC", /* GPIO_109 */
381		"NC", /* GPIO_110 */
382		"NC", /* GPIO_111 */
383		"NC", /* GPIO_112 */
384		"PMI8994_BUA", /* GPIO_113 */
385		"PCIE2_RST_N", /* GPIO_114 */
386		"PCIE2_CLKREQ_N", /* GPIO_115 */
387		"PCIE2_WAKE", /* GPIO_116 */
388		"SSC_IRQ_0", /* GPIO_117 */
389		"SSC_IRQ_1", /* GPIO_118 */
390		"SSC_IRQ_2", /* GPIO_119 */
391		"NC", /* GPIO_120 */
392		"GPIO121", /* GPIO_121, S HSEC pin 2 */
393		"NC", /* GPIO_122 */
394		"SSC_IRQ_6", /* GPIO_123 */
395		"SSC_IRQ_7", /* GPIO_124 */
396		"GPIO-C", /* GPIO_125, TS_INT0, LSEC pin 25 */
397		"BOOT_CONFIG5", /* GPIO_126 */
398		"NC", /* GPIO_127 */
399		"NC", /* GPIO_128 */
400		"BOOT_CONFIG7", /* GPIO_129 */
401		"PCIE1_RST_N", /* GPIO_130 */
402		"PCIE1_CLKREQ_N", /* GPIO_131 */
403		"PCIE1_WAKE", /* GPIO_132 */
404		"GPIO-L", /* GPIO_133, CAM2_STANDBY_N, LSEC pin 34 */
405		"NC", /* GPIO_134 */
406		"NC", /* GPIO_135 */
407		"BOOT_CONFIG8", /* GPIO_136 */
408		"NC", /* GPIO_137 */
409		"NC", /* GPIO_138 */
410		"GPS_SSBI2", /* GPIO_139 */
411		"GPS_SSBI1", /* GPIO_140 */
412		"NC", /* GPIO_141 */
413		"NC", /* GPIO_142 */
414		"NC", /* GPIO_143 */
415		"BOOT_CONFIG6", /* GPIO_144 */
416		"NC", /* GPIO_145 */
417		"NC", /* GPIO_146 */
418		"NC", /* GPIO_147 */
419		"NC", /* GPIO_148 */
420		"NC"; /* GPIO_149 */
421
422	sdc2_cd_on: sdc2-cd-on-state {
423		pins = "gpio38";
424		function = "gpio";
425		bias-pull-up;
426		drive-strength = <16>;
427	};
428
429	sdc2_cd_off: sdc2-cd-off-state {
430		pins = "gpio38";
431		function = "gpio";
432		bias-pull-up;
433		drive-strength = <2>;
434	};
435
436	mdss_hdmi_hpd_active: mdss_hdmi-hpd-active-state {
437		pins = "gpio34";
438		function = "hdmi_hot";
439		bias-pull-down;
440		drive-strength = <16>;
441	};
442
443	mdss_hdmi_hpd_suspend: mdss_hdmi-hpd-suspend-state {
444		pins = "gpio34";
445		function = "hdmi_hot";
446		bias-pull-down;
447		drive-strength = <2>;
448	};
449
450	mdss_hdmi_ddc_active: mdss_hdmi-ddc-active-state {
451		pins = "gpio32", "gpio33";
452		function = "hdmi_ddc";
453		drive-strength = <2>;
454		bias-pull-up;
455	};
456
457	mdss_hdmi_ddc_suspend: mdss_hdmi-ddc-suspend-state {
458		pins = "gpio32", "gpio33";
459		function = "hdmi_ddc";
460		drive-strength = <2>;
461		bias-pull-down;
462	};
463};
464
465&pcie0 {
466	status = "okay";
467	perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
468	vddpe-3v3-supply = <&wlan_en>;
469	vdda-supply = <&vreg_l28a_0p925>;
470};
471
472&pcie1 {
473	status = "okay";
474	perst-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>;
475	vdda-supply = <&vreg_l28a_0p925>;
476};
477
478&pcie2 {
479	status = "okay";
480	perst-gpios = <&tlmm 114 GPIO_ACTIVE_LOW>;
481	vdda-supply = <&vreg_l28a_0p925>;
482};
483
484&pcie_phy {
485	status = "okay";
486
487	vdda-phy-supply = <&vreg_l28a_0p925>;
488	vdda-pll-supply = <&vreg_l12a_1p8>;
489};
490
491&pm8994_gpios {
492	gpio-line-names =
493		"NC",
494		"KEY_VOLP_N",
495		"NC",
496		"BL1_PWM",
497		"GPIO-F", /* BL0_PWM, LSEC pin 28 */
498		"BL1_EN",
499		"NC",
500		"WLAN_EN",
501		"NC",
502		"NC",
503		"NC",
504		"NC",
505		"NC",
506		"NC",
507		"DIVCLK1",
508		"DIVCLK2",
509		"DIVCLK3",
510		"DIVCLK4",
511		"BT_EN",
512		"PMIC_SLB",
513		"PMIC_BUA",
514		"USB_VBUS_DET";
515
516	pinctrl-names = "default";
517	pinctrl-0 = <&ls_exp_gpio_f &bt_en_gpios>;
518
519	ls_exp_gpio_f: pm8994-gpio5-state {
520		pinconf {
521			pins = "gpio5";
522			function = PMIC_GPIO_FUNC_NORMAL;
523			output-low;
524			power-source = <PM8994_GPIO_S4>; /* 1.8V */
525		};
526	};
527
528	bt_en_gpios: bt-en-pios-state {
529		pinconf {
530			pins = "gpio19";
531			function = PMIC_GPIO_FUNC_NORMAL;
532			output-low;
533			power-source = <PM8994_GPIO_S4>; /* 1.8V */
534			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
535			bias-pull-down;
536		};
537	};
538
539	wlan_en_gpios: wlan-en-gpios-state {
540		pinconf {
541			pins = "gpio8";
542			function = PMIC_GPIO_FUNC_NORMAL;
543			output-low;
544			power-source = <PM8994_GPIO_S4>; /* 1.8V */
545			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
546			bias-pull-down;
547		};
548	};
549
550	audio_mclk: clk-div1-state {
551		pinconf {
552			pins = "gpio15";
553			function = "func1";
554			power-source = <PM8994_GPIO_S4>; /* 1.8V */
555		};
556	};
557
558	volume_up_gpio: pm8996-gpio2-state {
559		pinconf {
560			pins = "gpio2";
561			function = "normal";
562			input-enable;
563			drive-push-pull;
564			bias-pull-up;
565			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
566			power-source = <PM8994_GPIO_S4>; /* 1.8V */
567		};
568	};
569
570	divclk4_pin_a: divclk4-state {
571		pinconf {
572			pins = "gpio18";
573			function = PMIC_GPIO_FUNC_FUNC2;
574
575			bias-disable;
576			power-source = <PM8994_GPIO_S4>;
577		};
578	};
579
580	usb3_vbus_det_gpio: pm8996-gpio22-state {
581		pinconf {
582			pins = "gpio22";
583			function = PMIC_GPIO_FUNC_NORMAL;
584			input-enable;
585			bias-pull-down;
586			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
587			power-source = <PM8994_GPIO_S4>; /* 1.8V */
588		};
589	};
590};
591
592&pm8994_mpps {
593	gpio-line-names =
594		"VDDPX_BIAS",
595		"WIFI_LED",
596		"NC",
597		"BT_LED",
598		"PM_MPP05",
599		"PM_MPP06",
600		"PM_MPP07",
601		"NC";
602};
603
604&pm8994_spmi_regulators {
605	qcom,saw-reg = <&saw3>;
606	vdd_s11-supply = <&vph_pwr>;
607
608	s9 {
609		qcom,saw-slave;
610	};
611	s10 {
612		qcom,saw-slave;
613	};
614	s11 {
615		qcom,saw-leader;
616		regulator-name = "VDD_APCC";
617		regulator-always-on;
618		regulator-min-microvolt = <980000>;
619		regulator-max-microvolt = <980000>;
620	};
621};
622
623&pmi8994_gpios {
624	gpio-line-names =
625		"NC",
626		"SPKR_AMP_EN1",
627		"SPKR_AMP_EN2",
628		"TP61",
629		"NC",
630		"USB2_VBUS_DET",
631		"NC",
632		"NC",
633		"NC",
634		"NC";
635
636	usb2_vbus_det_gpio: pmi8996-gpio6-state {
637		pinconf {
638			pins = "gpio6";
639			function = PMIC_GPIO_FUNC_NORMAL;
640			input-enable;
641			bias-pull-down;
642			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
643			power-source = <PM8994_GPIO_S4>; /* 1.8V */
644		};
645	};
646};
647
648&pmi8994_lpg {
649	qcom,power-source = <1>;
650
651	pinctrl-names = "default";
652	pinctrl-0 = <&pmi8994_mpp2_userled4>;
653
654	qcom,dtest = <0 0>,
655		     <0 0>,
656		     <0 0>,
657		     <4 1>;
658
659	status = "okay";
660
661	led@1 {
662		reg = <1>;
663		color = <LED_COLOR_ID_GREEN>;
664		function = LED_FUNCTION_HEARTBEAT;
665		function-enumerator = <1>;
666
667		linux,default-trigger = "heartbeat";
668		default-state = "on";
669	};
670
671	led@2 {
672		reg = <2>;
673		color = <LED_COLOR_ID_GREEN>;
674		function = LED_FUNCTION_HEARTBEAT;
675		function-enumerator = <0>;
676	};
677
678	led@3 {
679		reg = <3>;
680		color = <LED_COLOR_ID_GREEN>;
681		function = LED_FUNCTION_HEARTBEAT;
682		function-enumerator = <2>;
683	};
684
685	led@4 {
686		reg = <4>;
687		color = <LED_COLOR_ID_GREEN>;
688		function = LED_FUNCTION_HEARTBEAT;
689		function-enumerator = <3>;
690	};
691};
692
693&pmi8994_mpps {
694	pmi8994_mpp2_userled4: mpp2-userled4-state {
695		pins = "mpp2";
696		function = "sink";
697
698		output-low;
699		qcom,dtest = <4>;
700	};
701};
702
703&pmi8994_spmi_regulators {
704	vdd_s2-supply = <&vph_pwr>;
705
706	vdd_gfx: s2 {
707		regulator-name = "VDD_GFX";
708		regulator-min-microvolt = <980000>;
709		regulator-max-microvolt = <980000>;
710	};
711};
712
713&rpm_requests {
714	regulators-0 {
715		compatible = "qcom,rpm-pm8994-regulators";
716
717		vdd_s1-supply = <&vph_pwr>;
718		vdd_s2-supply = <&vph_pwr>;
719		vdd_s3-supply = <&vph_pwr>;
720		vdd_s4-supply = <&vph_pwr>;
721		vdd_s5-supply = <&vph_pwr>;
722		vdd_s6-supply = <&vph_pwr>;
723		vdd_s7-supply = <&vph_pwr>;
724		vdd_s8-supply = <&vph_pwr>;
725		vdd_s9-supply = <&vph_pwr>;
726		vdd_s10-supply = <&vph_pwr>;
727		vdd_s11-supply = <&vph_pwr>;
728		vdd_s12-supply = <&vph_pwr>;
729		vdd_l1-supply = <&vreg_s1b_1p025>;
730		vdd_l2_l26_l28-supply = <&vreg_s3a_1p3>;
731		vdd_l3_l11-supply = <&vreg_s3a_1p3>;
732		vdd_l4_l27_l31-supply = <&vreg_s3a_1p3>;
733		vdd_l5_l7-supply = <&vreg_s5a_2p15>;
734		vdd_l6_l12_l32-supply = <&vreg_s5a_2p15>;
735		vdd_l8_l16_l30-supply = <&vph_pwr>;
736		vdd_l9_l10_l18_l22-supply = <&vph_pwr_bbyp>;
737		vdd_l13_l19_l23_l24-supply = <&vph_pwr_bbyp>;
738		vdd_l14_l15-supply = <&vreg_s5a_2p15>;
739		vdd_l17_l29-supply = <&vph_pwr_bbyp>;
740		vdd_l20_l21-supply = <&vph_pwr_bbyp>;
741		vdd_l25-supply = <&vreg_s3a_1p3>;
742		vdd_lvs1_2-supply = <&vreg_s4a_1p8>;
743
744		vreg_s3a_1p3: s3 {
745			regulator-name = "vreg_s3a_1p3";
746			regulator-min-microvolt = <1300000>;
747			regulator-max-microvolt = <1300000>;
748		};
749
750		/**
751		 * 1.8v required on LS expansion
752		 * for mezzanine boards
753		 */
754		vreg_s4a_1p8: s4 {
755			regulator-name = "vreg_s4a_1p8";
756			regulator-min-microvolt = <1800000>;
757			regulator-max-microvolt = <1800000>;
758			regulator-always-on;
759		};
760		vreg_s5a_2p15: s5 {
761			regulator-name = "vreg_s5a_2p15";
762			regulator-min-microvolt = <2150000>;
763			regulator-max-microvolt = <2150000>;
764		};
765		vreg_s7a_1p0: s7 {
766			regulator-name = "vreg_s7a_1p0";
767			regulator-min-microvolt = <800000>;
768			regulator-max-microvolt = <800000>;
769		};
770
771		vreg_l1a_1p0: l1 {
772			regulator-name = "vreg_l1a_1p0";
773			regulator-min-microvolt = <1000000>;
774			regulator-max-microvolt = <1000000>;
775		};
776		vreg_l2a_1p25: l2 {
777			regulator-name = "vreg_l2a_1p25";
778			regulator-min-microvolt = <1250000>;
779			regulator-max-microvolt = <1250000>;
780		};
781		vreg_l3a_0p875: l3 {
782			regulator-name = "vreg_l3a_0p875";
783			regulator-min-microvolt = <850000>;
784			regulator-max-microvolt = <850000>;
785		};
786		vreg_l4a_1p225: l4 {
787			regulator-name = "vreg_l4a_1p225";
788			regulator-min-microvolt = <1225000>;
789			regulator-max-microvolt = <1225000>;
790		};
791		vreg_l6a_1p2: l6 {
792			regulator-name = "vreg_l6a_1p2";
793			regulator-min-microvolt = <1200000>;
794			regulator-max-microvolt = <1200000>;
795		};
796		vreg_l8a_1p8: l8 {
797			regulator-name = "vreg_l8a_1p8";
798			regulator-min-microvolt = <1800000>;
799			regulator-max-microvolt = <1800000>;
800		};
801		vreg_l9a_1p8: l9 {
802			regulator-name = "vreg_l9a_1p8";
803			regulator-min-microvolt = <1800000>;
804			regulator-max-microvolt = <1800000>;
805		};
806		vreg_l10a_1p8: l10 {
807			regulator-name = "vreg_l10a_1p8";
808			regulator-min-microvolt = <1800000>;
809			regulator-max-microvolt = <1800000>;
810		};
811		vreg_l11a_1p15: l11 {
812			regulator-name = "vreg_l11a_1p15";
813			regulator-min-microvolt = <1150000>;
814			regulator-max-microvolt = <1150000>;
815		};
816		vreg_l12a_1p8: l12 {
817			regulator-name = "vreg_l12a_1p8";
818			regulator-min-microvolt = <1800000>;
819			regulator-max-microvolt = <1800000>;
820		};
821		vreg_l13a_2p95: l13 {
822			regulator-name = "vreg_l13a_2p95";
823			regulator-min-microvolt = <1800000>;
824			regulator-max-microvolt = <2950000>;
825		};
826		vreg_l14a_1p8: l14 {
827			regulator-name = "vreg_l14a_1p8";
828			regulator-min-microvolt = <1800000>;
829			regulator-max-microvolt = <1800000>;
830		};
831		vreg_l15a_1p8: l15 {
832			regulator-name = "vreg_l15a_1p8";
833			regulator-min-microvolt = <1800000>;
834			regulator-max-microvolt = <1800000>;
835		};
836		vreg_l16a_2p7: l16 {
837			regulator-name = "vreg_l16a_2p7";
838			regulator-min-microvolt = <2700000>;
839			regulator-max-microvolt = <2700000>;
840		};
841		vreg_l17a_2p8: l17 {
842			regulator-name = "vreg_l17a_2p8";
843			regulator-min-microvolt = <2500000>;
844			regulator-max-microvolt = <2500000>;
845		};
846		vreg_l18a_2p85: l18 {
847			regulator-name = "vreg_l18a_2p85";
848			regulator-min-microvolt = <2700000>;
849			regulator-max-microvolt = <2900000>;
850		};
851		vreg_l19a_2p8: l19 {
852			regulator-name = "vreg_l19a_2p8";
853			regulator-min-microvolt = <3000000>;
854			regulator-max-microvolt = <3000000>;
855		};
856		vreg_l20a_2p95: l20 {
857			regulator-name = "vreg_l20a_2p95";
858			regulator-min-microvolt = <2950000>;
859			regulator-max-microvolt = <2950000>;
860			regulator-allow-set-load;
861		};
862		vreg_l21a_2p95: l21 {
863			regulator-name = "vreg_l21a_2p95";
864			regulator-min-microvolt = <2950000>;
865			regulator-max-microvolt = <2950000>;
866			regulator-allow-set-load;
867			regulator-system-load = <200000>;
868		};
869		vreg_l22a_3p0: l22 {
870			regulator-name = "vreg_l22a_3p0";
871			regulator-min-microvolt = <3300000>;
872			regulator-max-microvolt = <3300000>;
873		};
874		vreg_l23a_2p8: l23 {
875			regulator-name = "vreg_l23a_2p8";
876			regulator-min-microvolt = <2800000>;
877			regulator-max-microvolt = <2800000>;
878		};
879		vreg_l24a_3p075: l24 {
880			regulator-name = "vreg_l24a_3p075";
881			regulator-min-microvolt = <3075000>;
882			regulator-max-microvolt = <3075000>;
883		};
884		vreg_l25a_1p2: l25 {
885			regulator-name = "vreg_l25a_1p2";
886			regulator-min-microvolt = <1200000>;
887			regulator-max-microvolt = <1200000>;
888			regulator-allow-set-load;
889		};
890		vreg_l26a_0p8: l27 {
891			regulator-name = "vreg_l26a_0p8";
892			regulator-min-microvolt = <1000000>;
893			regulator-max-microvolt = <1000000>;
894		};
895		vreg_l28a_0p925: l28 {
896			regulator-name = "vreg_l28a_0p925";
897			regulator-min-microvolt = <925000>;
898			regulator-max-microvolt = <925000>;
899			regulator-allow-set-load;
900		};
901		vreg_l29a_2p8: l29 {
902			regulator-name = "vreg_l29a_2p8";
903			regulator-min-microvolt = <2800000>;
904			regulator-max-microvolt = <2800000>;
905		};
906		vreg_l30a_1p8: l30 {
907			regulator-name = "vreg_l30a_1p8";
908			regulator-min-microvolt = <1800000>;
909			regulator-max-microvolt = <1800000>;
910		};
911		vreg_l32a_1p8: l32 {
912			regulator-name = "vreg_l32a_1p8";
913			regulator-min-microvolt = <1800000>;
914			regulator-max-microvolt = <1800000>;
915		};
916
917		vreg_lvs1a_1p8: lvs1 {
918			regulator-name = "vreg_lvs1a_1p8";
919		};
920
921		vreg_lvs2a_1p8: lvs2 {
922			regulator-name = "vreg_lvs2a_1p8";
923		};
924	};
925
926	regulators-1 {
927		compatible = "qcom,rpm-pmi8994-regulators";
928
929		vdd_s1-supply = <&vph_pwr>;
930		vdd_s2-supply = <&vph_pwr>;
931		vdd_s3-supply = <&vph_pwr>;
932		vdd_bst_byp-supply = <&vph_pwr>;
933
934		vph_pwr_bbyp: boost-bypass {
935			regulator-name = "vph_pwr_bbyp";
936			regulator-min-microvolt = <3300000>;
937			regulator-max-microvolt = <3300000>;
938		};
939
940		vreg_s1b_1p025: s1 {
941			regulator-name = "vreg_s1b_1p025";
942			regulator-min-microvolt = <1025000>;
943			regulator-max-microvolt = <1025000>;
944		};
945	};
946};
947
948&sdhc2 {
949	/* External SD card */
950	pinctrl-names = "default", "sleep";
951	pinctrl-0 = <&sdc2_state_on &sdc2_cd_on>;
952	pinctrl-1 = <&sdc2_state_off &sdc2_cd_off>;
953	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
954	vmmc-supply = <&vreg_l21a_2p95>;
955	vqmmc-supply = <&vreg_l13a_2p95>;
956	status = "okay";
957};
958
959&q6asmdai {
960	dai@0 {
961		reg = <0>;
962	};
963
964	dai@1 {
965		reg = <1>;
966	};
967
968	dai@2 {
969		reg = <2>;
970	};
971};
972
973&slim_msm {
974	status = "okay";
975
976	slim@1 {
977		reg = <1>;
978		#address-cells = <2>;
979		#size-cells = <0>;
980
981		tasha_ifd: tas-ifd@0,0 {
982			compatible = "slim217,1a0";
983			reg = <0 0>;
984		};
985
986		wcd9335: codec@1,0 {
987			compatible = "slim217,1a0";
988			reg = <1 0>;
989
990			clock-names = "mclk", "slimbus";
991			clocks = <&div1_mclk>,
992				 <&rpmcc RPM_SMD_BB_CLK1>;
993			interrupt-parent = <&tlmm>;
994			interrupts = <54 IRQ_TYPE_LEVEL_HIGH>,
995				     <53 IRQ_TYPE_LEVEL_HIGH>;
996			interrupt-names = "intr1", "intr2";
997			interrupt-controller;
998			#interrupt-cells = <1>;
999
1000			pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
1001			pinctrl-names = "default";
1002
1003			reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
1004			slim-ifc-dev = <&tasha_ifd>;
1005
1006			#sound-dai-cells = <1>;
1007
1008			vdd-buck-supply = <&vreg_s4a_1p8>;
1009			vdd-buck-sido-supply = <&vreg_s4a_1p8>;
1010			vdd-tx-supply = <&vreg_s4a_1p8>;
1011			vdd-rx-supply = <&vreg_s4a_1p8>;
1012			vdd-io-supply = <&vreg_s4a_1p8>;
1013		};
1014	};
1015};
1016
1017&sound {
1018	compatible = "qcom,apq8096-sndcard";
1019	model = "DB820c";
1020	audio-routing = "RX_BIAS", "MCLK",
1021		"MM_DL1",  "MultiMedia1 Playback",
1022		"MM_DL2",  "MultiMedia2 Playback",
1023		"MultiMedia3 Capture", "MM_UL3";
1024
1025	mm1-dai-link {
1026		link-name = "MultiMedia1";
1027		cpu {
1028			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
1029		};
1030	};
1031
1032	mm2-dai-link {
1033		link-name = "MultiMedia2";
1034		cpu {
1035			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
1036		};
1037	};
1038
1039	mm3-dai-link {
1040		link-name = "MultiMedia3";
1041		cpu {
1042			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
1043		};
1044	};
1045
1046	mdss_hdmi-dai-link {
1047		link-name = "HDMI";
1048		cpu {
1049			sound-dai = <&q6afedai HDMI_RX>;
1050		};
1051
1052		platform {
1053			sound-dai = <&q6routing>;
1054		};
1055
1056		codec {
1057			sound-dai = <&mdss_hdmi 0>;
1058		};
1059	};
1060
1061	slim-dai-link {
1062		link-name = "SLIM Playback";
1063		cpu {
1064			sound-dai = <&q6afedai SLIMBUS_6_RX>;
1065		};
1066
1067		platform {
1068			sound-dai = <&q6routing>;
1069		};
1070
1071		codec {
1072			sound-dai = <&wcd9335 AIF4_PB>;
1073		};
1074	};
1075
1076	slimcap-dai-link {
1077		link-name = "SLIM Capture";
1078		cpu {
1079			sound-dai = <&q6afedai SLIMBUS_0_TX>;
1080		};
1081
1082		platform {
1083			sound-dai = <&q6routing>;
1084		};
1085
1086		codec {
1087			sound-dai = <&wcd9335 AIF1_CAP>;
1088		};
1089	};
1090};
1091
1092&ufsphy {
1093	status = "okay";
1094
1095	vdda-phy-supply = <&vreg_l28a_0p925>;
1096	vdda-pll-supply = <&vreg_l12a_1p8>;
1097	vddp-ref-clk-supply = <&vreg_l25a_1p2>;
1098};
1099
1100&ufshc {
1101	status = "okay";
1102
1103	vcc-supply = <&vreg_l20a_2p95>;
1104	vccq-supply = <&vreg_l25a_1p2>;
1105	vccq2-supply = <&vreg_s4a_1p8>;
1106
1107	vcc-max-microamp = <600000>;
1108	vccq-max-microamp = <450000>;
1109	vccq2-max-microamp = <450000>;
1110};
1111
1112&usb2 {
1113	status = "okay";
1114	extcon = <&usb2_id>;
1115};
1116
1117&usb2_dwc3 {
1118	extcon = <&usb2_id>;
1119	dr_mode = "otg";
1120	maximum-speed = "high-speed";
1121};
1122
1123&usb3 {
1124	status = "okay";
1125	extcon = <&usb3_id>;
1126};
1127
1128&usb3_dwc3 {
1129	extcon = <&usb3_id>;
1130	dr_mode = "otg";
1131};
1132
1133&usb3phy {
1134	status = "okay";
1135
1136	vdda-phy-supply = <&vreg_l28a_0p925>;
1137	vdda-pll-supply = <&vreg_l12a_1p8>;
1138};
1139
1140&venus {
1141	status = "okay";
1142};
1143