xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/sdm845-samsung-starqltechn.dts (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * SDM845 Samsung S9 (SM-G9600) (starqltechn / star2qltechn) common device tree source
4 *
5 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/input/linux-event-codes.h>
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/leds/common.h>
13#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
14#include <dt-bindings/sound/qcom,q6afe.h>
15#include <dt-bindings/sound/qcom,q6asm.h>
16#include <dt-bindings/sound/qcom,wcd934x.h>
17
18#include "sdm845.dtsi"
19#include "pm8998.dtsi"
20#include "sdm845-wcd9340.dtsi"
21
22/delete-node/ &rmtfs_mem;
23/delete-node/ &spss_mem;
24/delete-node/ &adsp_mem;
25/delete-node/ &slpi_mem;
26
27/ {
28	chassis-type = "handset";
29	model = "Samsung Galaxy S9 SM-G9600";
30	compatible = "samsung,starqltechn", "qcom,sdm845";
31
32	battery: battery {
33		compatible = "simple-battery";
34		constant-charge-current-max-microamp = <2150000>;
35		charge-full-design-microamp-hours = <3000000>;
36
37		over-voltage-threshold-microvolt = <4500000>;
38		voltage-min-design-microvolt = <3400000>;
39		voltage-max-design-microvolt = <4350000>;
40	};
41
42	chosen {
43		#address-cells = <2>;
44		#size-cells = <2>;
45		ranges;
46		framebuffer: framebuffer@9d400000 {
47			compatible = "simple-framebuffer";
48			reg = <0 0x9d400000 0 (2960 * 1440 * 4)>;//2400000
49			width = <1440>;
50			height = <2960>;
51			stride = <(1440 * 4)>;
52			format = "a8r8g8b8";
53			vci-supply = <&s2dos05_ldo4>;
54			vddr-supply = <&s2dos05_buck>;
55			vdd3-supply = <&s2dos05_ldo1>;
56		};
57	};
58
59	vib_regulator: gpio-regulator {
60		compatible = "regulator-fixed";
61
62		regulator-name = "haptic";
63		regulator-min-microvolt = <1800000>;
64		regulator-max-microvolt = <1800000>;
65
66		gpio = <&pm8998_gpios 18 GPIO_ACTIVE_HIGH>;
67		enable-active-high;
68
69		regulator-boot-on;
70	};
71
72	vph_pwr: vph-pwr-regulator {
73		compatible = "regulator-fixed";
74		regulator-name = "vph_pwr";
75		regulator-min-microvolt = <3700000>;
76		regulator-max-microvolt = <3700000>;
77	};
78
79	/*
80	 * Apparently RPMh does not provide support for PM8998 S4 because it
81	 * is always-on; model it as a fixed regulator.
82	 */
83	vreg_s4a_1p8: pm8998-smps4 {
84		compatible = "regulator-fixed";
85		regulator-name = "vreg_s4a_1p8";
86
87		regulator-min-microvolt = <1800000>;
88		regulator-max-microvolt = <1800000>;
89
90		regulator-always-on;
91		regulator-boot-on;
92
93		vin-supply = <&vph_pwr>;
94	};
95
96	reserved-memory {
97		memory@9d400000 {
98			reg = <0x0 0x9d400000 0x0 0x02400000>;
99			no-map;
100		};
101
102		memory@a1300000 {
103			compatible = "ramoops";
104			reg = <0x0 0xa1300000 0x0 0x100000>;
105			record-size = <0x40000>;
106			console-size = <0x40000>;
107			ftrace-size = <0x40000>;
108			pmsg-size = <0x40000>;
109		};
110
111		/*
112		 * It seems like reserving the old rmtfs_mem region is also needed to prevent
113		 * random crashes which are most likely modem related, more testing needed.
114		 */
115		removed_region: removed-region@88f00000 {
116			reg = <0 0x88f00000 0 0x1c00000>;
117			no-map;
118		};
119
120		slpi_mem: slpi@96700000 {
121			reg = <0 0x96700000 0 0xf00000>;
122			no-map;
123		};
124
125		spss_mem: spss@97700000 {
126			reg = <0 0x97700000 0 0x100000>;
127			no-map;
128		};
129
130		adsp_mem: memory@97800000 {
131			reg = <0 0x97800000 0 0x2000000>;
132			no-map;
133		};
134
135		rmtfs_mem: rmtfs-mem@fde00000 {
136			compatible = "qcom,rmtfs-mem";
137			reg = <0 0xfde00000 0 0x202000>;
138			qcom,use-guard-pages;
139			no-map;
140
141			qcom,client-id = <1>;
142			qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
143		};
144	};
145
146	i2c21 {
147		compatible = "i2c-gpio";
148		sda-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>;
149		scl-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
150		i2c-gpio,delay-us = <2>;
151		pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>;
152		pinctrl-names = "default";
153		#address-cells = <1>;
154		#size-cells = <0>;
155
156		pmic@60 {
157			compatible = "samsung,s2dos05";
158			reg = <0x60>;
159
160			regulators {
161				s2dos05_ldo1: ldo1 {
162					regulator-active-discharge = <1>;
163					regulator-enable-ramp-delay = <12000>;
164					regulator-min-microvolt = <1500000>;
165					regulator-max-microvolt = <2000000>;
166					regulator-name = "ldo1";
167				};
168
169				s2dos05_ldo2: ldo2 {
170					regulator-active-discharge = <1>;
171					regulator-boot-on;
172					regulator-enable-ramp-delay = <12000>;
173					regulator-min-microvolt = <1800000>;
174					regulator-max-microvolt = <1800000>;
175					regulator-name = "ldo2";
176				};
177
178				s2dos05_ldo3: ldo3 {
179					regulator-active-discharge = <1>;
180					regulator-boot-on;
181					regulator-enable-ramp-delay = <12000>;
182					regulator-min-microvolt = <3000000>;
183					regulator-max-microvolt = <3000000>;
184					regulator-name = "ldo3";
185				};
186
187				s2dos05_ldo4: ldo4 {
188					regulator-active-discharge = <1>;
189					regulator-enable-ramp-delay = <12000>;
190					regulator-min-microvolt = <2700000>;
191					regulator-max-microvolt = <3775000>;
192					regulator-name = "ldo4";
193				};
194
195				s2dos05_buck: buck {
196					regulator-active-discharge = <1>;
197					regulator-enable-ramp-delay = <12000>;
198					regulator-min-microvolt = <850000>;
199					regulator-max-microvolt = <2100000>;
200					regulator-name = "buck";
201				};
202			};
203		};
204	};
205
206	gpio-keys {
207		compatible = "gpio-keys";
208		autorepeat;
209
210		key-vol-up {
211			label = "Volume Up";
212			gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
213			linux,code = <KEY_VOLUMEUP>;
214			debounce-interval = <15>;
215		};
216
217		key-wink {
218			label = "Bixby";
219			gpios = <&pm8998_gpios 19 GPIO_ACTIVE_LOW>;
220			linux,code = <KEY_ENTER>;
221			debounce-interval = <15>;
222		};
223	};
224
225	vib_pwm: pwm {
226		compatible = "clk-pwm";
227		#pwm-cells = <2>;
228		assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>;
229		assigned-clocks = <&gcc GCC_GP1_CLK_SRC>;
230		clocks = <&gcc GCC_GP1_CLK>;
231		pinctrl-0 = <&motor_pwm_default_state>;
232		pinctrl-1 = <&motor_pwm_suspend_state>;
233		pinctrl-names = "default", "suspend";
234	};
235};
236
237&gpu {
238	status = "okay";
239
240	zap-shader {
241		memory-region = <&gpu_mem>;
242		firmware-name = "qcom/sdm845/starqltechn/a630_zap.mbn";
243	};
244};
245
246&mdss {
247	status = "okay";
248};
249
250&mdss_dsi0 {
251	vdda-supply = <&vreg_l26a_1p2>;
252	status = "okay";
253
254	panel@0 {
255		compatible = "samsung,s6e3ha8";
256		reg = <0>;
257		vci-supply = <&s2dos05_ldo4>;
258		vddr-supply = <&s2dos05_buck>;
259		vdd3-supply = <&s2dos05_ldo1>;
260		te-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
261		reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
262		pinctrl-0 = <&dsi_default &dsi_te>;
263		pinctrl-1 = <&dsi_suspend &dsi_te>;
264		pinctrl-names = "default", "suspend";
265
266		port {
267			panel_in: endpoint {
268				remote-endpoint = <&mdss_dsi0_out>;
269			};
270		};
271	};
272};
273
274&mdss_dsi0_out {
275	data-lanes = <0 1 2 3>;
276	remote-endpoint = <&panel_in>;
277};
278
279&mdss_dsi0_phy {
280	vdds-supply = <&vdda_mipi_dsi0_pll>;
281	status = "okay";
282};
283
284&apps_rsc {
285	regulators-0 {
286		compatible = "qcom,pm8998-rpmh-regulators";
287		qcom,pmic-id = "a";
288
289		vdd-s1-supply = <&vph_pwr>;
290		vdd-s2-supply = <&vph_pwr>;
291		vdd-s3-supply = <&vph_pwr>;
292		vdd-s4-supply = <&vph_pwr>;
293		vdd-s5-supply = <&vph_pwr>;
294		vdd-s6-supply = <&vph_pwr>;
295		vdd-s7-supply = <&vph_pwr>;
296		vdd-s8-supply = <&vph_pwr>;
297		vdd-s9-supply = <&vph_pwr>;
298		vdd-s10-supply = <&vph_pwr>;
299		vdd-s11-supply = <&vph_pwr>;
300		vdd-s12-supply = <&vph_pwr>;
301		vdd-s13-supply = <&vph_pwr>;
302		vdd-l1-l27-supply = <&vreg_s7a_1p025>;
303		vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
304		vdd-l3-l11-supply = <&vreg_s7a_1p025>;
305		vdd-l4-l5-supply = <&vreg_s7a_1p025>;
306		vdd-l6-supply = <&vph_pwr>;
307		vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
308		vdd-l26-supply = <&vreg_s3a_1p35>;
309		vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
310
311		vreg_s2a_1p125: smps2 {
312			regulator-min-microvolt = <1100000>;
313			regulator-max-microvolt = <1100000>;
314		};
315
316		vreg_s3a_1p35: smps3 {
317			regulator-min-microvolt = <1352000>;
318			regulator-max-microvolt = <1352000>;
319		};
320
321		vreg_s5a_2p04: smps5 {
322			regulator-min-microvolt = <1904000>;
323			regulator-max-microvolt = <2040000>;
324		};
325
326		vreg_s7a_1p025: smps7 {
327			regulator-min-microvolt = <900000>;
328			regulator-max-microvolt = <1028000>;
329		};
330
331		vdd_qusb_hs0:
332		vdda_hp_pcie_core:
333		vdda_mipi_csi0_0p9:
334		vdda_mipi_csi1_0p9:
335		vdda_mipi_csi2_0p9:
336		vdda_mipi_dsi0_pll:
337		vdda_mipi_dsi1_pll:
338		vdda_qlink_lv:
339		vdda_qlink_lv_ck:
340		vdda_qrefs_0p875:
341		vdda_pcie_core:
342		vdda_pll_cc_ebi01:
343		vdda_pll_cc_ebi23:
344		vdda_sp_sensor:
345		vdda_ufs1_core:
346		vdda_ufs2_core:
347		vreg_l1a_0p875: ldo1 {
348			regulator-min-microvolt = <880000>;
349			regulator-max-microvolt = <880000>;
350			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
351		};
352
353		vddpx_10:
354		vreg_l2a_1p2: ldo2 {
355			regulator-min-microvolt = <1200000>;
356			regulator-max-microvolt = <1200000>;
357			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
358			regulator-always-on;
359		};
360
361		vreg_l3a_1p0: ldo3 {
362			regulator-min-microvolt = <1000000>;
363			regulator-max-microvolt = <1000000>;
364			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
365		};
366
367		vdda_usb1_ss_core:
368		vdd_wcss_cx:
369		vdd_wcss_mx:
370		vdda_wcss_pll:
371		vreg_l5a_0p8: ldo5 {
372			regulator-min-microvolt = <800000>;
373			regulator-max-microvolt = <800000>;
374			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
375		};
376
377		vddpx_13:
378		vreg_l6a_1p8: ldo6 {
379			regulator-min-microvolt = <1856000>;
380			regulator-max-microvolt = <1856000>;
381			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
382		};
383
384		vreg_l7a_1p8: ldo7 {
385			regulator-min-microvolt = <1800000>;
386			regulator-max-microvolt = <1800000>;
387			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
388		};
389
390		vreg_l8a_1p2: ldo8 {
391			regulator-min-microvolt = <1200000>;
392			regulator-max-microvolt = <1248000>;
393			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
394		};
395
396		vreg_l9a_1p8: ldo9 {
397			regulator-min-microvolt = <1704000>;
398			regulator-max-microvolt = <2928000>;
399			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
400		};
401
402		vreg_l10a_1p8: ldo10 {
403			regulator-min-microvolt = <1704000>;
404			regulator-max-microvolt = <2928000>;
405			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
406		};
407
408		vreg_l11a_1p0: ldo11 {
409			regulator-min-microvolt = <1000000>;
410			regulator-max-microvolt = <1048000>;
411			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
412		};
413
414		vdd_qfprom:
415		vdd_qfprom_sp:
416		vdda_apc1_cs_1p8:
417		vdda_gfx_cs_1p8:
418		vdda_qrefs_1p8:
419		vdda_qusb_hs0_1p8:
420		vddpx_11:
421		vreg_l12a_1p8: ldo12 {
422			regulator-min-microvolt = <1800000>;
423			regulator-max-microvolt = <1800000>;
424			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
425		};
426
427		vddpx_2:
428		vreg_l13a_2p95: ldo13 {
429			regulator-min-microvolt = <1800000>;
430			regulator-max-microvolt = <2960000>;
431			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
432		};
433
434		vreg_l14a_1p88: ldo14 {
435			regulator-min-microvolt = <1800000>;
436			regulator-max-microvolt = <1800000>;
437			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
438		};
439
440		vreg_l15a_1p8: ldo15 {
441			regulator-min-microvolt = <1800000>;
442			regulator-max-microvolt = <1800000>;
443			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
444		};
445
446		vreg_l16a_2p7: ldo16 {
447			regulator-min-microvolt = <2704000>;
448			regulator-max-microvolt = <2704000>;
449			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
450		};
451
452		vreg_l17a_1p3: ldo17 {
453			regulator-min-microvolt = <1304000>;
454			regulator-max-microvolt = <1304000>;
455			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
456		};
457
458		vreg_l18a_2p7: ldo18 {
459			regulator-min-microvolt = <2704000>;
460			regulator-max-microvolt = <2960000>;
461			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
462		};
463
464		vreg_l19a_3p0: ldo19 {
465			regulator-min-microvolt = <2856000>;
466			regulator-max-microvolt = <3104000>;
467			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
468		};
469
470		vreg_l20a_2p95: ldo20 {
471			regulator-min-microvolt = <2704000>;
472			regulator-max-microvolt = <2960000>;
473			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
474		};
475
476		vreg_l21a_2p95: ldo21 {
477			regulator-min-microvolt = <2704000>;
478			regulator-max-microvolt = <2960000>;
479			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
480		};
481
482		vreg_l22a_2p85: ldo22 {
483			regulator-min-microvolt = <2864000>;
484			regulator-max-microvolt = <3312000>;
485			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
486		};
487
488		vreg_l23a_3p3: ldo23 {
489			regulator-min-microvolt = <3000000>;
490			regulator-max-microvolt = <3312000>;
491			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
492		};
493
494		vdda_qusb_hs0_3p1:
495		vreg_l24a_3p075: ldo24 {
496			regulator-min-microvolt = <3088000>;
497			regulator-max-microvolt = <3088000>;
498			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
499		};
500
501		vreg_l25a_3p3: ldo25 {
502			regulator-min-microvolt = <3300000>;
503			regulator-max-microvolt = <3312000>;
504			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
505		};
506
507		vdda_hp_pcie_1p2:
508		vdda_hv_ebi0:
509		vdda_hv_ebi1:
510		vdda_hv_ebi2:
511		vdda_hv_ebi3:
512		vdda_mipi_csi_1p25:
513		vdda_mipi_dsi0_1p2:
514		vdda_mipi_dsi1_1p2:
515		vdda_pcie_1p2:
516		vdda_ufs1_1p2:
517		vdda_ufs2_1p2:
518		vdda_usb1_ss_1p2:
519		vdda_usb2_ss_1p2:
520		vreg_l26a_1p2: ldo26 {
521			regulator-min-microvolt = <1200000>;
522			regulator-max-microvolt = <1200000>;
523			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
524		};
525
526		vreg_l28a_3p0: ldo28 {
527			regulator-min-microvolt = <2856000>;
528			regulator-max-microvolt = <3008000>;
529			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
530		};
531
532		vreg_lvs1a_1p8: lvs1 {
533			regulator-min-microvolt = <1800000>;
534			regulator-max-microvolt = <1800000>;
535		};
536
537		vreg_lvs2a_1p8: lvs2 {
538			regulator-min-microvolt = <1800000>;
539			regulator-max-microvolt = <1800000>;
540		};
541	};
542
543	regulators-1 {
544		compatible = "qcom,pm8005-rpmh-regulators";
545		qcom,pmic-id = "c";
546
547		vdd-s1-supply = <&vph_pwr>;
548		vdd-s2-supply = <&vph_pwr>;
549		vdd-s3-supply = <&vph_pwr>;
550		vdd-s4-supply = <&vph_pwr>;
551
552		vreg_s3c_0p6: smps3 {
553			regulator-min-microvolt = <600000>;
554			regulator-max-microvolt = <600000>;
555		};
556	};
557};
558
559&gcc {
560	protected-clocks = <GCC_QSPI_CORE_CLK>,
561				<GCC_QSPI_CORE_CLK_SRC>,
562				<GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
563				<GCC_LPASS_Q6_AXI_CLK>,
564				<GCC_LPASS_SWAY_CLK>;
565};
566
567&i2c10 {
568	clock-frequency = <400000>;
569	status = "okay";
570};
571
572&qupv3_id_1 {
573	status = "okay";
574};
575
576&gpi_dma1 {
577	status = "okay";
578};
579
580&uart9 {
581	status = "okay";
582};
583
584&i2c14 {
585	status = "okay";
586
587	pmic@66 {
588		compatible = "maxim,max77705";
589		reg = <0x66>;
590		interrupt-parent = <&pm8998_gpios>;
591		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
592		pinctrl-0 = <&pmic_int_default>;
593		pinctrl-names = "default";
594		#address-cells = <1>;
595		#size-cells = <0>;
596
597		leds {
598			compatible = "maxim,max77705-rgb";
599
600			multi-led {
601				color = <LED_COLOR_ID_RGB>;
602				function = LED_FUNCTION_STATUS;
603				#address-cells = <1>;
604				#size-cells = <0>;
605
606				led@1 {
607					reg = <1>;
608					color = <LED_COLOR_ID_RED>;
609				};
610
611				led@2 {
612					reg = <2>;
613					color = <LED_COLOR_ID_GREEN>;
614				};
615
616				led@3 {
617					reg = <3>;
618					color = <LED_COLOR_ID_BLUE>;
619				};
620			};
621		};
622
623		haptic {
624			compatible = "maxim,max77705-haptic";
625			haptic-supply = <&vib_regulator>;
626			pwms = <&vib_pwm 0 52084>;
627		};
628	};
629
630	max77705_charger: charger@69 {
631		reg = <0x69>;
632		compatible = "maxim,max77705-charger";
633		monitored-battery = <&battery>;
634		interrupt-parent = <&pm8998_gpios>;
635		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
636
637	};
638
639	fuel-gauge@36 {
640		reg = <0x36>;
641		compatible = "maxim,max77705-battery";
642		power-supplies = <&max77705_charger>;
643		maxim,rsns-microohm = <5000>;
644		interrupt-parent = <&pm8998_gpios>;
645		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
646	};
647};
648
649&ufs_mem_hc {
650	reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
651	vcc-supply = <&vreg_l20a_2p95>;
652	vcc-max-microamp = <600000>;
653	status = "okay";
654};
655
656&ufs_mem_phy {
657	vdda-phy-supply = <&vdda_ufs1_core>;
658	vdda-pll-supply = <&vdda_ufs1_1p2>;
659	status = "okay";
660};
661
662&sdhc_2 {
663	pinctrl-0 = <&sdc2_clk_state &sdc2_cmd_state &sdc2_data_state &sd_card_det_n_state>;
664	pinctrl-names = "default";
665	cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
666	vmmc-supply = <&vreg_l21a_2p95>;
667	vqmmc-supply = <&vddpx_2>;
668	status = "okay";
669};
670
671&i2c11 {
672	clock-frequency = <400000>;
673	status = "okay";
674
675	touchscreen@48 {
676		compatible = "samsung,s6sy761";
677		reg = <0x48>;
678		interrupt-parent = <&tlmm>;
679		interrupts = <120 IRQ_TYPE_LEVEL_HIGH>;
680		vdd-supply = <&s2dos05_ldo2>;
681		avdd-supply = <&s2dos05_ldo3>;
682
683		pinctrl-0 = <&touch_irq_state>;
684		pinctrl-names = "default";
685	};
686};
687
688&adsp_pas {
689	firmware-name = "qcom/sdm845/starqltechn/adsp.mbn";
690	status = "okay";
691};
692
693&lpasscc {
694	status = "okay";
695};
696
697&sound {
698	compatible = "qcom,sdm845-sndcard";
699	model = "Samsung Galaxy S9";
700	pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
701	pinctrl-names = "default";
702	status = "okay";
703
704	audio-routing =	"RX_BIAS", "MCLK",
705			"AMIC2", "MIC BIAS2",	/* Headset Mic */
706			"AMIC3", "MIC BIAS2",	/* FM radio left Tx */
707			"AMIC4", "MIC BIAS2",	/* FM radio right Tx */
708			"DMIC0", "MCLK",	/* Bottom Mic */
709			"DMIC0", "MIC BIAS1",
710			"DMIC2", "MCLK",	/* Top Mic */
711			"DMIC2", "MIC BIAS3";
712
713	mm1-dai-link {
714		link-name = "MultiMedia1";
715
716		cpu {
717			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
718		};
719	};
720
721	mm2-dai-link {
722		link-name = "MultiMedia2";
723
724		cpu {
725			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
726		};
727	};
728
729	mm3-dai-link {
730		link-name = "MultiMedia3";
731
732		cpu {
733			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
734		};
735	};
736
737	mm4-dai-link {
738		link-name = "MultiMedia4";
739
740		cpu {
741			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
742		};
743	};
744
745	mm5-dai-link {
746		link-name = "MultiMedia5";
747
748		cpu {
749			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>;
750		};
751	};
752
753	mm6-dai-link {
754		link-name = "MultiMedia6";
755
756		cpu {
757			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>;
758		};
759	};
760
761	slim-dai-link {
762		link-name = "SLIM Playback 1";
763
764		codec {
765			sound-dai = <&wcd9340 AIF1_PB>;
766		};
767
768		cpu {
769			sound-dai = <&q6afedai SLIMBUS_0_RX>;
770		};
771
772		platform {
773			sound-dai = <&q6routing>;
774		};
775	};
776
777	slimcap-dai-link {
778		link-name = "SLIM Capture 1";
779
780		codec {
781			sound-dai = <&wcd9340 AIF1_CAP>;
782		};
783
784		cpu {
785			sound-dai = <&q6afedai SLIMBUS_0_TX>;
786		};
787
788		platform {
789			sound-dai = <&q6routing>;
790		};
791	};
792
793	slim2-dai-link {
794		link-name = "SLIM Playback 2";
795
796		codec {
797			sound-dai = <&wcd9340 AIF2_PB>;
798		};
799
800		cpu {
801			sound-dai = <&q6afedai SLIMBUS_1_RX>;
802		};
803
804		platform {
805			sound-dai = <&q6routing>;
806		};
807	};
808
809	slimcap2-dai-link {
810		link-name = "SLIM Capture 2";
811
812		codec {
813			sound-dai = <&wcd9340 AIF2_CAP>;
814		};
815
816		cpu {
817			sound-dai = <&q6afedai SLIMBUS_1_TX>;
818		};
819
820		platform {
821			sound-dai = <&q6routing>;
822		};
823	};
824
825	slimcap3-dai-link {
826		link-name = "SLIM Capture 3";
827
828		codec {
829			sound-dai = <&wcd9340 AIF3_CAP>;
830		};
831
832		cpu {
833			sound-dai = <&q6afedai SLIMBUS_2_TX>;
834		};
835
836		platform {
837			sound-dai = <&q6routing>;
838		};
839	};
840};
841
842&q6afedai {
843	dai@22 {
844		reg = <22>;
845		qcom,sd-lines = <1>;
846	};
847
848	dai@23 {
849		reg = <23>;
850		qcom,sd-lines = <0>;
851	};
852};
853
854&q6asmdai {
855	dai@0 {
856		reg = <0>;
857	};
858
859	dai@1 {
860		reg = <1>;
861	};
862
863	dai@2 {
864		reg = <2>;
865	};
866
867	dai@3 {
868		reg = <3>;
869	};
870
871	dai@4 {
872		reg = <4>;
873	};
874
875	dai@5 {
876		reg = <5>;
877	};
878};
879
880&wcd9340 {
881	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
882	vdd-buck-supply = <&vreg_s4a_1p8>;
883	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
884	vdd-tx-supply = <&vreg_s4a_1p8>;
885	vdd-rx-supply = <&vreg_s4a_1p8>;
886	vdd-io-supply = <&vreg_s4a_1p8>;
887	qcom,micbias1-microvolt = <1800000>;
888	qcom,micbias2-microvolt = <2700000>;
889	qcom,micbias3-microvolt = <1800000>;
890	qcom,micbias4-microvolt = <1800000>;
891};
892
893&mss_pil {
894	firmware-name = "qcom/sdm845/starqltechn/mba.mbn",
895			"qcom/sdm845/starqltechn/modem.mbn";
896	status = "okay";
897};
898
899&ipa {
900	qcom,gsi-loader = "self";
901	memory-region = <&ipa_fw_mem>;
902	firmware-name = "qcom/sdm845/starqltechn/ipa_fws.mbn";
903	status = "okay";
904};
905
906&usb_1 {
907	status = "okay";
908};
909
910&usb_1_dwc3 {
911	/* Until we have Type C hooked up we'll force this as peripheral. */
912	dr_mode = "peripheral";
913};
914
915&usb_1_hsphy {
916	vdd-supply = <&vdda_usb1_ss_core>;
917	vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
918	vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
919
920	qcom,imp-res-offset-value = <8>;
921	qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
922	qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
923	qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
924	status = "okay";
925};
926
927&usb_1_qmpphy {
928	vdda-phy-supply = <&vdda_usb1_ss_1p2>;
929	vdda-pll-supply = <&vdda_usb1_ss_core>;
930	status = "okay";
931};
932
933&pm8998_resin {
934	linux,code = <KEY_VOLUMEDOWN>;
935	status = "okay";
936};
937
938&pm8998_gpios {
939	pmic_int_default: pmic-int-default-state {
940		pins = "gpio11";
941		function = "normal";
942		input-enable;
943		bias-disable;
944		power-source = <0>;
945	};
946};
947
948&tlmm {
949	gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */
950			       <85 4>; /* SPI (fingerprint reader) */
951
952	dsi_default: dsi-default-state {
953		pins = "gpio6";
954		function = "gpio";
955		drive-strength = <8>;
956		bias-disable;
957	};
958
959	dsi_suspend: dsi-suspend-state {
960		pins = "gpio6";
961		function = "gpio";
962		drive-strength = <2>;
963		bias-pull-down;
964	};
965
966	dsi_te: dsi-te-state {
967		pins = "gpio10";
968		function = "mdp_vsync";
969		drive-strength = <2>;
970		bias-pull-down;
971	};
972
973	i2c21_sda_state: i2c21-sda-state {
974		pins = "gpio127";
975		function = "gpio";
976		drive-strength = <2>;
977		bias-disable;
978	};
979
980	i2c21_scl_state: i2c21-scl-state {
981		pins = "gpio128";
982		function = "gpio";
983		drive-strength = <2>;
984		bias-disable;
985	};
986
987	motor_pwm_default_state: motor-pwm-active-state {
988		pins = "gpio57";
989		function = "gcc_gp1";
990		drive-strength = <2>;
991		bias-disable;
992		output-high;
993	};
994
995	motor_pwm_suspend_state: motor-pwm-suspend-state {
996		pins = "gpio57";
997		function = "gpio";
998		drive-strength = <2>;
999		bias-disable;
1000		output-low;
1001	};
1002
1003	sdc2_clk_state: sdc2-clk-state {
1004		pins = "sdc2_clk";
1005		bias-disable;
1006
1007		/*
1008		 * It seems that mmc_test reports errors if drive
1009		 * strength is not 16 on clk, cmd, and data pins.
1010		 */
1011		drive-strength = <16>;
1012	};
1013
1014	sdc2_cmd_state: sdc2-cmd-state {
1015		pins = "sdc2_cmd";
1016		bias-pull-up;
1017		drive-strength = <16>;
1018	};
1019
1020	sdc2_data_state: sdc2-data-state {
1021		pins = "sdc2_data";
1022		bias-pull-up;
1023		drive-strength = <16>;
1024	};
1025
1026	sd_card_det_n_state: sd-card-det-n-state {
1027		pins = "gpio126";
1028		function = "gpio";
1029		bias-pull-up;
1030	};
1031
1032	touch_irq_state: touch-irq-state {
1033		pins = "gpio120";
1034		function = "gpio";
1035		bias-disable;
1036	};
1037};
1038
1039&qup_i2c11_default {
1040	drive-strength = <2>;
1041	bias-disable;
1042};
1043