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