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