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