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