xref: /openbmc/linux/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi (revision 060f35a317ef09101b128f399dce7ed13d019461)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Google Trogdor device tree source (common between revisions)
4 *
5 * Copyright 2019 Google LLC.
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/input/gpio-keys.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/leds/common.h>
12#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
13#include <dt-bindings/sound/sc7180-lpass.h>
14
15#include "sc7180.dtsi"
16#include "sc7180-firmware-tfa.dtsi"
17/* PMICs depend on spmi_bus label and so must come after sc7180.dtsi */
18#include "pm6150.dtsi"
19#include "pm6150l.dtsi"
20
21/ {
22	thermal-zones {
23		charger_thermal: charger-thermal {
24			thermal-sensors = <&pm6150_adc_tm 0>;
25
26			trips {
27				charger-crit {
28					temperature = <125000>;
29					hysteresis = <1000>;
30					type = "critical";
31				};
32			};
33		};
34	};
35};
36
37/*
38 * Reserved memory changes
39 *
40 * Delete all unused memory nodes and define the peripheral memory regions
41 * required by the board dts.
42 */
43
44/delete-node/ &hyp_mem;
45/delete-node/ &ipa_fw_mem;
46/delete-node/ &xbl_mem;
47/delete-node/ &aop_mem;
48/delete-node/ &sec_apps_mem;
49/delete-node/ &tz_mem;
50
51/* Increase the size from 2MB to 8MB */
52&rmtfs_mem {
53	reg = <0x0 0x94600000 0x0 0x800000>;
54};
55
56/ {
57	reserved-memory {
58		atf_mem: memory@80b00000 {
59			reg = <0x0 0x80b00000 0x0 0x100000>;
60			no-map;
61		};
62
63		mpss_mem: memory@86000000 {
64			reg = <0x0 0x86000000 0x0 0x2000000>;
65			no-map;
66		};
67
68		venus_mem: memory@8f600000 {
69			reg = <0 0x8f600000 0 0x500000>;
70			no-map;
71		};
72
73		wlan_mem: memory@94100000 {
74			reg = <0x0 0x94100000 0x0 0x200000>;
75			no-map;
76		};
77
78		mba_mem: memory@94400000 {
79			reg = <0x0 0x94400000 0x0 0x200000>;
80			no-map;
81		};
82
83		mdata_mem: mpss-metadata {
84			alloc-ranges = <0x0 0xa0000000 0x0 0x20000000>;
85			size = <0x0 0x4000>;
86			no-map;
87		};
88	};
89
90	aliases {
91		bluetooth0 = &bluetooth;
92		hsuart0 = &uart3;
93		serial0 = &uart8;
94		wifi0 = &wifi;
95	};
96
97	chosen {
98		stdout-path = "serial0:115200n8";
99	};
100
101	/* FIXED REGULATORS - parents above children */
102
103	/* This is the top level supply and variable voltage */
104	ppvar_sys: ppvar-sys-regulator {
105		compatible = "regulator-fixed";
106		regulator-name = "ppvar_sys";
107		regulator-always-on;
108		regulator-boot-on;
109	};
110
111	/* This divides ppvar_sys by 2, so voltage is variable */
112	src_vph_pwr: src-vph-pwr-regulator {
113		compatible = "regulator-fixed";
114		regulator-name = "src_vph_pwr";
115
116		/* EC turns on with switchcap_on; always on for AP */
117		regulator-always-on;
118		regulator-boot-on;
119
120		vin-supply = <&ppvar_sys>;
121	};
122
123	pp5000_a: pp5000-a-regulator {
124		compatible = "regulator-fixed";
125		regulator-name = "pp5000_a";
126
127		/* EC turns on with en_pp5000_a; always on for AP */
128		regulator-always-on;
129		regulator-boot-on;
130		regulator-min-microvolt = <5000000>;
131		regulator-max-microvolt = <5000000>;
132
133		vin-supply = <&ppvar_sys>;
134	};
135
136	pp3300_a: pp3300-a-regulator {
137		compatible = "regulator-fixed";
138		regulator-name = "pp3300_a";
139
140		/* EC turns on with en_pp3300_a; always on for AP */
141		regulator-always-on;
142		regulator-boot-on;
143		regulator-min-microvolt = <3300000>;
144		regulator-max-microvolt = <3300000>;
145
146		/*
147		 * Actually should be pp3300 but that's practically an alias for
148		 * pp3300_a so we use pp3300's vin-supply here to avoid one more
149		 * node.
150		 */
151		vin-supply = <&ppvar_sys>;
152	};
153
154	pp1800_ec:
155	pp1800_sensors:
156	pp1800_ldo: pp1800-ldo-regulator {
157		compatible = "regulator-fixed";
158		regulator-name = "pp1800_ldo";
159
160		/* EC turns on with hibernate_l; always on for AP */
161		regulator-always-on;
162		regulator-boot-on;
163		regulator-min-microvolt = <1800000>;
164		regulator-max-microvolt = <1800000>;
165
166		/*
167		 * Actually should be pp1800_h1 but we don't have any need to
168		 * model that so we use the parent of pp1800_h1.
169		 */
170		vin-supply = <&pp3300_a>;
171	};
172
173	pp1800_uf_cam: pp1800-uf-cam-regulator {
174		compatible = "regulator-fixed";
175		regulator-name = "pp1800_uf_cam";
176		status = "disabled";
177
178		regulator-min-microvolt = <1800000>;
179		regulator-max-microvolt = <1800000>;
180
181		gpio = <&tlmm 6 GPIO_ACTIVE_HIGH>;
182		enable-active-high;
183		pinctrl-names = "default";
184		pinctrl-0 = <&uf_cam_en>;
185
186		vin-supply = <&pp1800_ldo>;
187		regulator-enable-ramp-delay = <1000>;
188	};
189
190	pp1800_wf_cam: pp1800-wf-cam-regulator {
191		compatible = "regulator-fixed";
192		regulator-name = "pp1800_wf_cam";
193		status = "disabled";
194
195		regulator-min-microvolt = <1800000>;
196		regulator-max-microvolt = <1800000>;
197
198		gpio = <&tlmm 7 GPIO_ACTIVE_HIGH>;
199		enable-active-high;
200		pinctrl-names = "default";
201		pinctrl-0 = <&wf_cam_en>;
202
203		vin-supply = <&pp1800_ldo>;
204		regulator-enable-ramp-delay = <1000>;
205	};
206
207	pp2800_uf_cam: pp2800-uf-cam-regulator {
208		compatible = "regulator-fixed";
209		regulator-name = "pp2800_uf_cam";
210		status = "disabled";
211
212		regulator-min-microvolt = <2850000>;
213		regulator-max-microvolt = <2850000>;
214
215		gpio = <&tlmm 6 GPIO_ACTIVE_HIGH>;
216		enable-active-high;
217		/*
218		 * The pinconf can only be referenced once so we put it on the
219		 * first regulator and comment it out here.
220		 * pinctrl-names = "default";
221		 * pinctrl-0 = <&uf_cam_en>;
222		 */
223
224		vin-supply = <&pp3300_a>;
225	};
226
227	pp2800_vcm_wf_cam:
228	pp2800_wf_cam: pp2800-wf-cam-regulator {
229		compatible = "regulator-fixed";
230		regulator-name = "pp2800_wf_cam";
231		status = "disabled";
232
233		regulator-min-microvolt = <2850000>;
234		regulator-max-microvolt = <2850000>;
235
236		gpio = <&tlmm 7 GPIO_ACTIVE_HIGH>;
237		enable-active-high;
238		/*
239		 * The pinconf can only be referenced once so we put it on the
240		 * first regulator and comment it out here.
241		 * pinctrl-names = "default";
242		 * pinctrl-0 = <&wf_cam_en>;
243		 */
244
245		vin-supply = <&pp3300_a>;
246	};
247
248	pp3300_audio:
249	pp3300_codec: pp3300-codec-regulator {
250		compatible = "regulator-fixed";
251		regulator-name = "pp3300_codec";
252
253		regulator-min-microvolt = <3300000>;
254		regulator-max-microvolt = <3300000>;
255
256		gpio = <&tlmm 83 GPIO_ACTIVE_HIGH>;
257		enable-active-high;
258		pinctrl-names = "default";
259		pinctrl-0 = <&en_pp3300_codec>;
260
261		vin-supply = <&pp3300_a>;
262	};
263
264	pp3300_dx_edp:
265	pp3300_ts: pp3300-dx-edp-regulator {
266		compatible = "regulator-fixed";
267		regulator-name = "pp3300_dx_edp";
268
269		regulator-min-microvolt = <3300000>;
270		regulator-max-microvolt = <3300000>;
271
272		gpio = <&tlmm 30 GPIO_ACTIVE_HIGH>;
273		enable-active-high;
274		pinctrl-names = "default";
275		pinctrl-0 = <&en_pp3300_dx_edp>;
276
277		vin-supply = <&pp3300_a>;
278	};
279
280	pp3300_fp_tp: pp3300-fp-tp-regulator {
281		compatible = "regulator-fixed";
282		regulator-name = "pp3300_fp_tp";
283
284		regulator-min-microvolt = <3300000>;
285		regulator-max-microvolt = <3300000>;
286
287		/* AP turns on with PP1800_VIO_OUT; always on for AP */
288		regulator-always-on;
289		regulator-boot-on;
290
291		vin-supply = <&pp3300_a>;
292	};
293
294	pp3300_hub: pp3300-hub-regulator {
295		compatible = "regulator-fixed";
296		regulator-name = "pp3300_hub";
297
298		regulator-min-microvolt = <3300000>;
299		regulator-max-microvolt = <3300000>;
300
301		gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
302		enable-active-high;
303		pinctrl-names = "default";
304		pinctrl-0 = <&en_pp3300_hub>;
305
306		/* The BIOS leaves this regulator on */
307		regulator-boot-on;
308
309		vin-supply = <&pp3300_a>;
310	};
311
312	/* BOARD-SPECIFIC TOP LEVEL NODES */
313
314	backlight: backlight {
315		compatible = "pwm-backlight";
316
317		/* The panels don't seem to like anything below ~ 5% */
318		brightness-levels = <
319			196 256 324 400 484 576 676 784 900 1024 1156 1296
320			1444 1600 1764 1936 2116 2304 2500 2704 2916 3136
321			3364 3600 3844 4096
322		>;
323		num-interpolated-steps = <64>;
324		default-brightness-level = <951>;
325
326		pwms = <&cros_ec_pwm 1>;
327		enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
328		power-supply = <&ppvar_sys>;
329		pinctrl-names = "default";
330		pinctrl-0 = <&ap_edp_bklten>;
331	};
332
333	gpio_keys: gpio-keys {
334		compatible = "gpio-keys";
335		status = "disabled";
336		pinctrl-names = "default";
337		pinctrl-0 = <&pen_pdct_l>;
338
339		pen_insert: switch-pen-insert {
340			label = "Pen Insert";
341
342			/* Insert = low, eject = high */
343			gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
344			linux,code = <SW_PEN_INSERTED>;
345			linux,input-type = <EV_SW>;
346			wakeup-event-action = <EV_ACT_DEASSERTED>;
347			wakeup-source;
348		};
349	};
350
351	max98360a: audio-codec-0 {
352		compatible = "maxim,max98360a";
353		pinctrl-names = "default";
354		pinctrl-0 = <&amp_en>;
355		sdmode-gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
356		#sound-dai-cells = <0>;
357	};
358
359	pwmleds {
360		compatible = "pwm-leds";
361		keyboard_backlight: led-0 {
362			status = "disabled";
363			label = "cros_ec::kbd_backlight";
364			function = LED_FUNCTION_KBD_BACKLIGHT;
365			pwms = <&cros_ec_pwm 0>;
366			max-brightness = <1023>;
367		};
368	};
369
370	sound: sound {
371		compatible = "google,sc7180-trogdor";
372		model = "sc7180-rt5682-max98357a-1mic";
373
374		audio-routing =
375			"Headphone Jack", "HPOL",
376			"Headphone Jack", "HPOR";
377
378		#address-cells = <1>;
379		#size-cells = <0>;
380
381		dai-link@0 {
382			link-name = "MultiMedia0";
383			reg = <MI2S_PRIMARY>;
384			cpu {
385				sound-dai = <&lpass_cpu MI2S_PRIMARY>;
386			};
387
388			sound_multimedia0_codec: codec {
389				sound-dai = <&alc5682 0 /* aif1 */>;
390			};
391		};
392
393		dai-link@1 {
394			link-name = "MultiMedia1";
395			reg = <MI2S_SECONDARY>;
396			cpu {
397				sound-dai = <&lpass_cpu MI2S_SECONDARY>;
398			};
399
400			sound_multimedia1_codec: codec {
401				sound-dai = <&max98360a>;
402			};
403		};
404
405		dai-link@5 {
406			link-name = "MultiMedia2";
407			reg = <LPASS_DP_RX>;
408			cpu {
409				sound-dai = <&lpass_cpu LPASS_DP_RX>;
410			};
411
412			codec {
413				sound-dai = <&mdss_dp>;
414			};
415		};
416	};
417};
418
419&qfprom {
420	vcc-supply = <&pp1800_l11a>;
421};
422
423&qspi {
424	status = "okay";
425	pinctrl-names = "default", "sleep";
426	pinctrl-0 = <&qspi_clk>, <&qspi_cs0>, <&qspi_data0>, <&qspi_data1>;
427	pinctrl-1 = <&qspi_sleep>;
428
429	flash@0 {
430		compatible = "jedec,spi-nor";
431		reg = <0>;
432
433		spi-max-frequency = <37500000>;
434		spi-tx-bus-width = <2>;
435		spi-rx-bus-width = <2>;
436	};
437};
438
439&apps_rsc {
440	regulators-0 {
441		compatible = "qcom,pm6150-rpmh-regulators";
442		qcom,pmic-id = "a";
443
444		vddpx_1:
445		vdd2:
446		pp1125_s1a: smps1 {
447			regulator-min-microvolt = <1128000>;
448			regulator-max-microvolt = <1128000>;
449		};
450
451		vdd_qlink_lv:
452		vdd_qlink_lv_ck:
453		vdd_qusb_hs0_core:
454		vdd_ufs1_core:
455		vdda_mipi_csi0_0p9:
456		vdda_mipi_csi1_0p9:
457		vdda_mipi_csi2_0p9:
458		vdda_mipi_csi3_0p9:
459		vdda_mipi_dsi0_pll:
460		vdda_pll_cc_ebi01:
461		vdda_qrefs_0p9:
462		vdda_usb_ss_dp_core:
463		pp900_l4a: ldo4 {
464			regulator-min-microvolt = <824000>;
465			regulator-max-microvolt = <928000>;
466			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
467		};
468
469		vdd_cx_wlan:
470		pp800_l9a: ldo9 {
471			regulator-min-microvolt = <488000>;
472			regulator-max-microvolt = <800000>;
473			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
474		};
475
476		vdd1:
477		vddpx_3:
478		vddpx_7:
479		vio_in:
480		pp1800_l10a: ldo10 {
481			regulator-min-microvolt = <1800000>;
482			regulator-max-microvolt = <1800000>;
483			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
484		};
485
486		vdd_qfprom:
487		vdda_apc1_cs_1p8:
488		vdda_qrefs_1p8:
489		vdda_qusb_hs0_1p8:
490		vddpx_11:
491		vreg_bb_clk:
492		pp1800_l11a: ldo11 {
493			regulator-min-microvolt = <1800000>;
494			regulator-max-microvolt = <1800000>;
495			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
496		};
497
498		mcp_vccq:
499		pp1800_l12a_r: ldo12 {
500			regulator-min-microvolt = <1800000>;
501			regulator-max-microvolt = <1800000>;
502			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
503		};
504
505		/*
506		 * On trogdor this needs to match l10a since we use it to
507		 * give power to things like SPI flash which communicate back
508		 * on lines powered by l10a.  Thus we force to 1.8V.
509		 */
510		pp1800_l13a: ldo13 {
511			regulator-min-microvolt = <1800000>;
512			regulator-max-microvolt = <1800000>;
513			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
514			regulator-always-on;
515			regulator-boot-on;
516		};
517
518		pp1800_prox:
519		pp1800_l14a: ldo14 {
520			regulator-min-microvolt = <1800000>;
521			regulator-max-microvolt = <1800000>;
522			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
523		};
524
525		pp1800_alc5682:
526		pp1800_l15a: ldo15 {
527			regulator-min-microvolt = <1800000>;
528			regulator-max-microvolt = <1800000>;
529			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
530		};
531
532		vdda_qusb_hs0_3p1:
533		vdd_pdphy:
534		pp3100_l17a: ldo17 {
535			regulator-min-microvolt = <2920000>;
536			regulator-max-microvolt = <3232000>;
537			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
538		};
539
540		pp1800_pen:
541		pp1800_l18a: ldo18 {
542			regulator-min-microvolt = <1800000>;
543			regulator-max-microvolt = <1800000>;
544			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
545		};
546
547		mcp_vcc:
548		pp2850_l19a: ldo19 {
549			regulator-min-microvolt = <2960000>;
550			regulator-max-microvolt = <2960000>;
551			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
552		};
553	};
554
555	regulators-1 {
556		compatible = "qcom,pm6150l-rpmh-regulators";
557		qcom,pmic-id = "c";
558
559		pp1300_s8c: smps8 {
560			regulator-min-microvolt = <1120000>;
561			regulator-max-microvolt = <1408000>;
562		};
563
564		pp1800_l1c: ldo1 {
565			regulator-min-microvolt = <1616000>;
566			regulator-max-microvolt = <1984000>;
567			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
568		};
569
570		vdd_wcss_adc_dac:
571		pp1300_l2c: ldo2 {
572			regulator-min-microvolt = <1168000>;
573			regulator-max-microvolt = <1304000>;
574			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
575		};
576
577		pp1200_brij:
578		vdd_ufs1_1p2:
579		vdda_csi0_1p25:
580		vdda_csi1_1p25:
581		vdda_csi2_1p25:
582		vdda_csi3_1p25:
583		vdda_hv_ebi0:
584		vdda_mipi_dsi0_1p2:
585		vdda_usb_ss_dp_1p2:
586		vddpx_10:
587		pp1200_l3c: ldo3 {
588			regulator-min-microvolt = <1200000>;
589			regulator-max-microvolt = <1200000>;
590			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
591		};
592
593		vddpx_2:
594		ppvar_l6c: ldo6 {
595			regulator-min-microvolt = <1800000>;
596			regulator-max-microvolt = <2952000>;
597			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
598		};
599
600		pp3300_l7c: ldo7 {
601			regulator-min-microvolt = <3304000>;
602			regulator-max-microvolt = <3304000>;
603			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
604		};
605
606		pp1800_brij_vccio:
607		pp1800_edp_vpll:
608		pp1800_l8c: ldo8 {
609			regulator-min-microvolt = <1800000>;
610			regulator-max-microvolt = <1800000>;
611			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
612		};
613
614		pp2950_l9c: ldo9 {
615			regulator-min-microvolt = <2952000>;
616			regulator-max-microvolt = <2952000>;
617			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
618		};
619
620		pp3300_l10c: ldo10 {
621			regulator-min-microvolt = <3000000>;
622			regulator-max-microvolt = <3400000>;
623			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
624		};
625
626		pp3300_l11c: ldo11 {
627			regulator-min-microvolt = <3000000>;
628			regulator-max-microvolt = <3400000>;
629			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
630		};
631
632		src_vreg_bob: bob {
633			regulator-min-microvolt = <3008000>;
634			regulator-max-microvolt = <3960000>;
635			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
636		};
637	};
638};
639
640ap_ec_spi: &spi6 {
641	status = "okay";
642	cros_ec: ec@0 {
643		compatible = "google,cros-ec-spi";
644		reg = <0>;
645		interrupt-parent = <&tlmm>;
646		interrupts = <94 IRQ_TYPE_LEVEL_LOW>;
647		pinctrl-names = "default";
648		pinctrl-0 = <&ap_ec_int_l>;
649		spi-max-frequency = <3000000>;
650
651		cros_ec_pwm: pwm {
652			compatible = "google,cros-ec-pwm";
653			#pwm-cells = <1>;
654		};
655
656		i2c_tunnel: i2c-tunnel {
657			compatible = "google,cros-ec-i2c-tunnel";
658			google,remote-bus = <0>;
659			#address-cells = <1>;
660			#size-cells = <0>;
661		};
662
663		typec {
664			compatible = "google,cros-ec-typec";
665			#address-cells = <1>;
666			#size-cells = <0>;
667
668			usb_c0: connector@0 {
669				compatible = "usb-c-connector";
670				reg = <0>;
671				label = "left";
672				power-role = "dual";
673				data-role = "host";
674				try-power-role = "source";
675			};
676
677			usb_c1: connector@1 {
678				compatible = "usb-c-connector";
679				reg = <1>;
680				label = "right";
681				power-role = "dual";
682				data-role = "host";
683				try-power-role = "source";
684			};
685		};
686	};
687};
688
689ap_h1_spi: &spi0 {
690	status = "okay";
691	cr50: tpm@0 {
692		compatible = "google,cr50";
693		reg = <0>;
694		pinctrl-names = "default";
695		pinctrl-0 = <&h1_ap_int_odl>;
696		spi-max-frequency = <800000>;
697		interrupt-parent = <&tlmm>;
698		interrupts = <42 IRQ_TYPE_EDGE_RISING>;
699	};
700};
701
702&camcc {
703	status = "disabled";
704};
705
706ap_sar_sensor_i2c: &i2c5 {
707	clock-frequency = <400000>;
708
709	ap_sar_sensor: proximity@28 {
710		compatible = "semtech,sx9310";
711		reg = <0x28>;
712		#io-channel-cells = <1>;
713		pinctrl-names = "default";
714		pinctrl-0 = <&p_sensor_int_l>;
715
716		interrupt-parent = <&tlmm>;
717		interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
718
719		vdd-supply = <&pp3300_a>;
720		svdd-supply = <&pp1800_prox>;
721
722		label = "proximity-wifi";
723	};
724};
725
726ap_tp_i2c: &i2c7 {
727	clock-frequency = <400000>;
728
729	trackpad: trackpad@15 {
730		compatible = "elan,ekth3000";
731		reg = <0x15>;
732		pinctrl-names = "default";
733		pinctrl-0 = <&tp_int_odl>;
734
735		interrupt-parent = <&tlmm>;
736		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
737
738		vcc-supply = <&pp3300_fp_tp>;
739
740		wakeup-source;
741	};
742};
743
744hp_i2c: &i2c9 {
745	status = "okay";
746	clock-frequency = <400000>;
747
748	alc5682: codec@1a {
749		compatible = "realtek,rt5682i";
750		reg = <0x1a>;
751		pinctrl-names = "default";
752		pinctrl-0 = <&hp_irq>;
753
754		#sound-dai-cells = <1>;
755
756		interrupt-parent = <&tlmm>;
757		/*
758		 * This will get ignored because the interrupt type
759		 * is set in rt5682.c.
760		 */
761		interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
762
763		AVDD-supply = <&pp1800_alc5682>;
764		DBVDD-supply = <&pp1800_alc5682>;
765		LDO1-IN-supply = <&pp1800_alc5682>;
766		MICVDD-supply = <&pp3300_codec>;
767		VBAT-supply = <&pp3300_audio>;
768
769		realtek,dmic1-data-pin = <1>;
770		realtek,dmic1-clk-pin = <1>;
771		realtek,jd-src = <1>;
772	};
773};
774
775&lpasscc {
776	status = "okay";
777};
778
779&lpass_cpu {
780	status = "okay";
781
782	pinctrl-names = "default";
783	pinctrl-0 = <&sec_mi2s_active>, <&pri_mi2s_active>, <&pri_mi2s_mclk_active>;
784
785	#address-cells = <1>;
786	#size-cells = <0>;
787
788	dai-link@0 {
789		reg = <MI2S_PRIMARY>;
790		qcom,playback-sd-lines = <1>;
791		qcom,capture-sd-lines = <0>;
792	};
793
794	secondary_mi2s: dai-link@1 {
795		reg = <MI2S_SECONDARY>;
796		qcom,playback-sd-lines = <0>;
797	};
798
799	dai-link@5 {
800		reg = <LPASS_DP_RX>;
801	};
802};
803
804&lpass_hm {
805	status = "okay";
806};
807
808&mdss {
809	status = "okay";
810};
811
812&mdss_dp {
813	status = "okay";
814	pinctrl-names = "default";
815	pinctrl-0 = <&dp_hot_plug_det>;
816};
817
818&mdss_dp_out {
819	data-lanes = <0 1>;
820	link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000>;
821};
822
823&mdss_dsi0 {
824	status = "okay";
825	vdda-supply = <&vdda_mipi_dsi0_1p2>;
826};
827
828&mdss_dsi0_out {
829	data-lanes = <0 1 2 3>;
830};
831
832&mdss_dsi0_phy {
833	status = "okay";
834	vdds-supply = <&vdda_mipi_dsi0_pll>;
835};
836
837&pm6150_adc {
838	channel@4f {
839		reg = <ADC5_AMUX_THM3_100K_PU>;
840		qcom,ratiometric;
841		qcom,hw-settle-time = <200>;
842		label = "charger_therm";
843	};
844};
845
846&pm6150_adc_tm {
847	status = "okay";
848
849	charger-thermistor@0 {
850		reg = <0>;
851		io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>;
852		qcom,ratiometric;
853		qcom,hw-settle-time-us = <200>;
854	};
855};
856
857&pm6150_pon {
858	status = "disabled";
859};
860
861&qupv3_id_0 {
862	status = "okay";
863};
864
865&qupv3_id_1 {
866	status = "okay";
867};
868
869&remoteproc_mpss {
870	status = "okay";
871	compatible = "qcom,sc7180-mss-pil";
872	reg = <0 0x04080000 0 0x4040>, <0 0x04180000 0 0x48>;
873	reg-names = "qdsp6", "rmb";
874
875	clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
876		 <&gcc GCC_MSS_Q6_MEMNOC_AXI_CLK>,
877		 <&gcc GCC_MSS_NAV_AXI_CLK>,
878		 <&gcc GCC_MSS_SNOC_AXI_CLK>,
879		 <&gcc GCC_MSS_MFAB_AXIS_CLK>,
880		 <&rpmhcc RPMH_CXO_CLK>;
881	clock-names = "iface", "bus", "nav", "snoc_axi", "mnoc_axi", "xo";
882
883	iommus = <&apps_smmu 0x461 0x0>, <&apps_smmu 0x444 0x3>;
884	memory-region = <&mba_mem>, <&mpss_mem>, <&mdata_mem>;
885
886	/* This gets overridden for SKUs with LTE support. */
887	firmware-name = "qcom/sc7180-trogdor/modem-nolte/mba.mbn",
888			"qcom/sc7180-trogdor/modem-nolte/qdsp6sw.mbn";
889
890	resets = <&aoss_reset AOSS_CC_MSS_RESTART>,
891		 <&pdc_reset PDC_MODEM_SYNC_RESET>;
892	reset-names = "mss_restart", "pdc_reset";
893
894	qcom,halt-regs = <&tcsr_regs_1 0x3000 0x5000 0x4000>;
895	qcom,spare-regs = <&tcsr_regs_2 0xb3e4>;
896};
897
898&scm {
899	/* TF-A firmware maps memory cached so mark dma-coherent to match. */
900	dma-coherent;
901};
902
903&sdhc_1 {
904	status = "okay";
905
906	pinctrl-names = "default", "sleep";
907	pinctrl-0 = <&sdc1_on>;
908	pinctrl-1 = <&sdc1_off>;
909	vmmc-supply = <&mcp_vcc>;
910	vqmmc-supply = <&mcp_vccq>;
911};
912
913&sdhc_2 {
914	pinctrl-names = "default", "sleep";
915	pinctrl-0 = <&sdc2_on>;
916	pinctrl-1 = <&sdc2_off>;
917	vmmc-supply = <&pp2950_l9c>;
918	vqmmc-supply = <&ppvar_l6c>;
919
920	cd-gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
921};
922
923&spi0 {
924	pinctrl-0 = <&qup_spi0_spi>, <&qup_spi0_cs_gpio>;
925	cs-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
926};
927
928&spi6 {
929	pinctrl-0 = <&qup_spi6_spi>, <&qup_spi6_cs_gpio>;
930	cs-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
931};
932
933ap_spi_fp: &spi10 {
934	pinctrl-0 = <&qup_spi10_spi>, <&qup_spi10_cs_gpio>;
935	cs-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
936
937	cros_ec_fp: ec@0 {
938		compatible = "google,cros-ec-fp", "google,cros-ec-spi";
939		reg = <0>;
940		interrupt-parent = <&tlmm>;
941		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
942		pinctrl-names = "default";
943		pinctrl-0 = <&fp_to_ap_irq_l>, <&fp_rst_l>, <&fpmcu_boot0>;
944		boot0-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
945		reset-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
946		spi-max-frequency = <3000000>;
947		vdd-supply = <&pp3300_fp_tp>;
948	};
949};
950
951#include <arm/cros-ec-sbs.dtsi>
952
953&uart3 {
954	status = "okay";
955
956	/delete-property/interrupts;
957	interrupts-extended = <&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
958				<&tlmm 41 IRQ_TYPE_EDGE_FALLING>;
959
960	pinctrl-names = "default", "sleep";
961	pinctrl-1 = <&qup_uart3_sleep>;
962
963	bluetooth: bluetooth {
964		compatible = "qcom,wcn3991-bt";
965		vddio-supply = <&pp1800_l10a>;
966		vddxo-supply = <&pp1800_l1c>;
967		vddrf-supply = <&pp1300_l2c>;
968		vddch0-supply = <&pp3300_l10c>;
969		max-speed = <3200000>;
970
971		qcom,local-bd-address-broken;
972	};
973};
974
975&uart8 {
976	status = "okay";
977};
978
979&usb_1 {
980	status = "okay";
981};
982
983&usb_1_dwc3 {
984	dr_mode = "host";
985	#address-cells = <1>;
986	#size-cells = <0>;
987
988	/* 2.x hub on port 1 */
989	usb_hub_2_x: hub@1 {
990		compatible = "usbbda,5411";
991		reg = <1>;
992		vdd-supply = <&pp3300_hub>;
993		peer-hub = <&usb_hub_3_x>;
994	};
995
996	/* 3.x hub on port 2 */
997	usb_hub_3_x: hub@2 {
998		compatible = "usbbda,411";
999		reg = <2>;
1000		vdd-supply = <&pp3300_hub>;
1001		peer-hub = <&usb_hub_2_x>;
1002	};
1003};
1004
1005&usb_1_hsphy {
1006	status = "okay";
1007	vdd-supply = <&vdd_qusb_hs0_core>;
1008	vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
1009	vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
1010	qcom,imp-res-offset-value = <8>;
1011	qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_15_PERCENT>;
1012	qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
1013	qcom,bias-ctrl-value = <0x22>;
1014	qcom,charge-ctrl-value = <3>;
1015	qcom,hsdisc-trim-value = <0>;
1016};
1017
1018&usb_1_qmpphy {
1019	status = "okay";
1020	vdda-phy-supply = <&vdda_usb_ss_dp_1p2>;
1021	vdda-pll-supply = <&vdda_usb_ss_dp_core>;
1022};
1023
1024&venus {
1025	video-firmware {
1026		iommus = <&apps_smmu 0x0c42 0x0>;
1027	};
1028};
1029
1030&wifi {
1031	status = "okay";
1032	vdd-0.8-cx-mx-supply = <&vdd_cx_wlan>;
1033	vdd-1.8-xo-supply = <&pp1800_l1c>;
1034	vdd-1.3-rfa-supply = <&pp1300_l2c>;
1035	vdd-3.3-ch0-supply = <&pp3300_l10c>;
1036	vdd-3.3-ch1-supply = <&pp3300_l11c>;
1037
1038	wifi-firmware {
1039		iommus = <&apps_smmu 0xc2 0x1>;
1040	};
1041};
1042
1043/* PINCTRL - additions to nodes defined in sc7180.dtsi */
1044
1045&dp_hot_plug_det {
1046	bias-disable;
1047};
1048
1049&pri_mi2s_active {
1050	drive-strength = <2>;
1051	bias-pull-down;
1052};
1053
1054&pri_mi2s_mclk_active {
1055	drive-strength = <2>;
1056	bias-pull-down;
1057};
1058
1059&qspi_cs0 {
1060	bias-disable;		/* External pullup */
1061};
1062
1063&qspi_clk {
1064	drive-strength = <8>;
1065	bias-disable;		/* Rely on Cr50 internal pulldown */
1066};
1067
1068&qspi_data0 {
1069	bias-disable;		/* Rely on Cr50 internal pulldown */
1070};
1071
1072&qspi_data1 {
1073	bias-pull-down;
1074};
1075
1076&qup_i2c2_default {
1077	drive-strength = <2>;
1078
1079	/* Has external pullup */
1080	bias-disable;
1081};
1082
1083&qup_i2c4_default {
1084	drive-strength = <2>;
1085
1086	/* Has external pullup */
1087	bias-disable;
1088};
1089
1090&qup_i2c5_default {
1091	drive-strength = <2>;
1092
1093	/* Has external pullup */
1094	bias-disable;
1095};
1096
1097&qup_i2c7_default {
1098	drive-strength = <2>;
1099
1100	/* Has external pullup */
1101	bias-disable;
1102};
1103
1104&qup_i2c9_default {
1105	drive-strength = <2>;
1106
1107	/* Has external pullup */
1108	bias-disable;
1109};
1110
1111&qup_spi0_spi {
1112	drive-strength = <2>;
1113	bias-disable;
1114};
1115
1116&qup_spi0_cs_gpio {
1117	drive-strength = <2>;
1118	bias-disable;
1119};
1120
1121&qup_spi6_spi {
1122	drive-strength = <2>;
1123	bias-disable;
1124};
1125
1126&qup_spi6_cs_gpio {
1127	drive-strength = <2>;
1128	bias-disable;
1129};
1130
1131&qup_spi10_spi {
1132	drive-strength = <2>;
1133	bias-disable;
1134};
1135
1136&qup_spi10_cs_gpio {
1137	drive-strength = <2>;
1138	bias-disable;
1139};
1140
1141&qup_uart3_cts {
1142	/*
1143	 * Configure a pull-down on CTS to match the pull of
1144	 * the Bluetooth module.
1145	 */
1146	bias-pull-down;
1147};
1148
1149&qup_uart3_rts {
1150	/* We'll drive RTS, so no pull */
1151	drive-strength = <2>;
1152	bias-disable;
1153};
1154
1155&qup_uart3_tx {
1156	/* We'll drive TX, so no pull */
1157	drive-strength = <2>;
1158	bias-disable;
1159};
1160
1161&qup_uart3_rx {
1162	/*
1163	 * Configure a pull-up on RX. This is needed to avoid
1164	 * garbage data when the TX pin of the Bluetooth module is
1165	 * in tri-state (module powered off or not driving the
1166	 * signal yet).
1167	 */
1168	bias-pull-up;
1169};
1170
1171&qup_uart8_tx {
1172	drive-strength = <2>;
1173	bias-disable;
1174};
1175
1176&qup_uart8_rx {
1177	drive-strength = <2>;
1178	bias-pull-up;
1179};
1180
1181&sec_mi2s_active {
1182	drive-strength = <2>;
1183	bias-pull-down;
1184};
1185
1186/* PINCTRL - board-specific pinctrl */
1187
1188&pm6150_gpios {
1189	status = "disabled"; /* No GPIOs are connected */
1190};
1191
1192&pm6150l_gpios {
1193	gpio-line-names = "AP_SUSPEND",
1194			  "",
1195			  "",
1196			  "",
1197			  "",
1198			  "",
1199			  "",
1200			  "",
1201			  "",
1202			  "",
1203			  "",
1204			  "";
1205};
1206
1207&tlmm {
1208	/*
1209	 * pinctrl settings for pins that have no real owners.
1210	 */
1211	pinctrl-names = "default";
1212	pinctrl-0 = <&bios_flash_wp_l>, <&ap_suspend_l_neuter>;
1213
1214	amp_en: amp-en-state {
1215		pins = "gpio23";
1216		function = "gpio";
1217		bias-pull-down;
1218	};
1219
1220	ap_ec_int_l: ap-ec-int-l-state {
1221		pins = "gpio94";
1222		function = "gpio";
1223		bias-pull-up;
1224	};
1225
1226	ap_edp_bklten: ap-edp-bklten-state {
1227		pins = "gpio12";
1228		function = "gpio";
1229		drive-strength = <2>;
1230		bias-disable;
1231
1232		/* Force backlight to be disabled to match state at boot. */
1233		output-low;
1234	};
1235
1236	ap_suspend_l_neuter: ap-suspend-l-neuter-state {
1237		pins = "gpio27";
1238		function = "gpio";
1239		bias-disable;
1240	};
1241
1242	bios_flash_wp_l: bios-flash-wp-l-state {
1243		pins = "gpio66";
1244		function = "gpio";
1245		bias-disable;
1246	};
1247
1248	edp_brij_en: edp-brij-en-state {
1249		pins = "gpio104";
1250		function = "gpio";
1251		drive-strength = <2>;
1252		bias-disable;
1253	};
1254
1255	en_pp3300_codec: en-pp3300-codec-state {
1256		pins = "gpio83";
1257		function = "gpio";
1258		drive-strength = <2>;
1259		bias-disable;
1260	};
1261
1262	en_pp3300_dx_edp: en-pp3300-dx-edp-state {
1263		pins = "gpio30";
1264		function = "gpio";
1265		drive-strength = <2>;
1266		bias-disable;
1267	};
1268
1269	en_pp3300_hub: en-pp3300-hub-state {
1270		pins = "gpio84";
1271		function = "gpio";
1272		drive-strength = <2>;
1273		bias-disable;
1274	};
1275
1276	fp_rst_l: fp-rst-l-state {
1277		pins = "gpio22";
1278		function = "gpio";
1279		bias-disable;
1280		drive-strength = <2>;
1281	};
1282
1283	fp_to_ap_irq_l: fp-to-ap-irq-l-state {
1284		pins = "gpio4";
1285		function = "gpio";
1286
1287		/* Has external pullup */
1288		bias-disable;
1289	};
1290
1291	fpmcu_boot0: fpmcu-boot0-state {
1292		pins = "gpio10";
1293		function = "gpio";
1294		bias-disable;
1295	};
1296
1297	h1_ap_int_odl: h1-ap-int-odl-state {
1298		pins = "gpio42";
1299		function = "gpio";
1300		bias-pull-up;
1301	};
1302
1303	hp_irq: hp-irq-state {
1304		pins = "gpio28";
1305		function = "gpio";
1306		bias-pull-up;
1307	};
1308
1309	pen_irq_l: pen-irq-l-state {
1310		pins = "gpio21";
1311		function = "gpio";
1312
1313		/* Has external pullup */
1314		bias-disable;
1315	};
1316
1317	pen_pdct_l: pen-pdct-l-state-state {
1318		pins = "gpio52";
1319		function = "gpio";
1320
1321		/* Has external pullup */
1322		bias-disable;
1323	};
1324
1325	pen_rst_odl: pen-rst-odl-state {
1326		pins = "gpio18";
1327		function = "gpio";
1328		bias-disable;
1329		drive-strength = <2>;
1330
1331		/*
1332		 * The pen driver doesn't currently support
1333		 * driving this reset line.  By specifying
1334		 * output-high here we're relying on the fact
1335		 * that this pin has a default pulldown at boot
1336		 * (which makes sure the pen was in reset if it
1337		 * was powered) and then we set it high here to
1338		 * take it out of reset.  Better would be if the
1339		 * pen driver could control this and we could
1340		 * remove "output-high" here.
1341		 */
1342		output-high; /* TODO: Remove this? */
1343	};
1344
1345	p_sensor_int_l: p-sensor-int-l-state {
1346		pins = "gpio24";
1347		function = "gpio";
1348
1349		/* Has external pullup */
1350		bias-disable;
1351	};
1352
1353	qspi_sleep: qspi-sleep-state {
1354		pins = "gpio63", "gpio64", "gpio65", "gpio68";
1355
1356		/*
1357		 * When we're not actively transferring we want pins as GPIOs
1358		 * with output disabled so that the quad SPI IP block stops
1359		 * driving them. We rely on the normal pulls configured in
1360		 * the active state and don't redefine them here. Also note
1361		 * that we don't need the reverse (output-enable) in the
1362		 * normal mode since the "output-enable" only matters for
1363		 * GPIO function.
1364		 */
1365		function = "gpio";
1366		output-disable;
1367	};
1368
1369	qup_uart3_sleep: qup-uart3-sleep-state {
1370		cts-pins {
1371			/*
1372			 * Configure a pull-down on CTS to match the pull of
1373			 * the Bluetooth module.
1374			 */
1375			pins = "gpio38";
1376			function = "gpio";
1377			bias-pull-down;
1378		};
1379
1380		rts-pins {
1381			/*
1382			 * Configure pull-down on RTS. As RTS is active low
1383			 * signal, pull it low to indicate the BT SoC that it
1384			 * can wakeup the system anytime from suspend state by
1385			 * pulling RX low (by sending wakeup bytes).
1386			 */
1387			pins = "gpio39";
1388			function = "gpio";
1389			bias-pull-down;
1390		};
1391
1392		tx-pins {
1393			/*
1394			 * Configure pull-up on TX when it isn't actively driven
1395			 * to prevent BT SoC from receiving garbage during sleep.
1396			 */
1397			pins = "gpio40";
1398			function = "gpio";
1399			bias-pull-up;
1400		};
1401
1402		rx-pins {
1403			/*
1404			 * Configure a pull-up on RX. This is needed to avoid
1405			 * garbage data when the TX pin of the Bluetooth module
1406			 * is floating which may cause spurious wakeups.
1407			 */
1408			pins = "gpio41";
1409			function = "gpio";
1410			bias-pull-up;
1411		};
1412	};
1413
1414	/* Named trackpad_int_1v8_odl on earlier revision schematics */
1415	trackpad_int_1v8_odl:
1416	tp_int_odl: tp-int-odl-state {
1417		pins = "gpio0";
1418		function = "gpio";
1419
1420		/* Has external pullup */
1421		bias-disable;
1422	};
1423
1424	ts_int_l: ts-int-l-state {
1425		pins = "gpio9";
1426		function = "gpio";
1427		bias-pull-up;
1428	};
1429
1430	ts_reset_l: ts-reset-l-state {
1431		pins = "gpio8";
1432		function = "gpio";
1433		bias-disable;
1434
1435		/*
1436		 * The reset GPIO to the touchscreen takes almost 2ms to drop
1437		 * at the default drive strength. When we bump it up to 8mA it
1438		 * falls in under 500us. We want this to be fast since the Elan
1439		 * datasheet (and any drivers written based on it) talk about using
1440		 * a 500 us reset pulse.
1441		 */
1442		drive-strength = <8>;
1443	};
1444
1445	sdc1_on: sdc1-on-state {
1446		clk-pins {
1447			pins = "sdc1_clk";
1448			bias-disable;
1449			drive-strength = <16>;
1450		};
1451
1452		cmd-pins {
1453			pins = "sdc1_cmd";
1454			bias-pull-up;
1455			drive-strength = <16>;
1456		};
1457
1458		data-pins {
1459			pins = "sdc1_data";
1460			bias-pull-up;
1461			drive-strength = <16>;
1462		};
1463
1464		rclk-pins {
1465			pins = "sdc1_rclk";
1466			bias-pull-down;
1467		};
1468	};
1469
1470	sdc1_off: sdc1-off-state {
1471		clk-pins {
1472			pins = "sdc1_clk";
1473			bias-disable;
1474			drive-strength = <2>;
1475		};
1476
1477		cmd-pins {
1478			pins = "sdc1_cmd";
1479			bias-pull-up;
1480			drive-strength = <2>;
1481		};
1482
1483		data-pins {
1484			pins = "sdc1_data";
1485			bias-pull-up;
1486			drive-strength = <2>;
1487		};
1488
1489		rclk-pins {
1490			pins = "sdc1_rclk";
1491			bias-pull-down;
1492		};
1493	};
1494
1495	sdc2_on: sdc2-on-state {
1496		clk-pins {
1497			pins = "sdc2_clk";
1498			bias-disable;
1499			drive-strength = <16>;
1500		};
1501
1502		cmd-pins {
1503			pins = "sdc2_cmd";
1504			bias-pull-up;
1505			drive-strength = <10>;
1506		};
1507
1508		data-pins {
1509			pins = "sdc2_data";
1510			bias-pull-up;
1511			drive-strength = <10>;
1512		};
1513
1514		sd-cd-pins {
1515			pins = "gpio69";
1516			function = "gpio";
1517			bias-pull-up;
1518			drive-strength = <2>;
1519		};
1520	};
1521
1522	sdc2_off: sdc2-off-state {
1523		clk-pins {
1524			pins = "sdc2_clk";
1525			bias-disable;
1526			drive-strength = <2>;
1527		};
1528
1529		cmd-pins {
1530			pins = "sdc2_cmd";
1531			bias-pull-up;
1532			drive-strength = <2>;
1533		};
1534
1535		data-pins {
1536			pins = "sdc2_data";
1537			bias-pull-up;
1538			drive-strength = <2>;
1539		};
1540
1541		sd-cd-pins {
1542			pins = "gpio69";
1543			function = "gpio";
1544			bias-pull-up;
1545			drive-strength = <2>;
1546		};
1547	};
1548
1549	uf_cam_en: uf-cam-en-state {
1550		pins = "gpio6";
1551		function = "gpio";
1552		drive-strength = <2>;
1553
1554		/* External pull down */
1555		bias-disable;
1556	};
1557
1558	wf_cam_en: wf-cam-en-state {
1559		pins = "gpio7";
1560		function = "gpio";
1561		drive-strength = <2>;
1562
1563		/* External pull down */
1564		bias-disable;
1565	};
1566};
1567