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