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