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