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