1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Google Herobrine baseboard device tree source
5 * The set of things in this file is a bit loosely defined. It's roughly
6 * defined as the set of things that the child boards happen to have in
7 * common. Since all of the child boards started from the same original
8 * design this is hopefully a large set of things but as more derivatives
9 * appear things may "bubble down" out of this file. For things that are
10 * part of the reference design but might not exist on child nodes we will
11 * follow the lead of the SoC dtsi files and leave their status as "disabled".
13 * Copyright 2022 Google LLC.
16 #include <dt-bindings/input/gpio-keys.h>
17 #include <dt-bindings/input/input.h>
18 #include <dt-bindings/leds/common.h>
20 #include "sc7280-qcard.dtsi"
21 #include "sc7280-chrome-common.dtsi"
25 stdout-path = "serial0:115200n8";
32 * 1. parents above children.
33 * 2. higher voltage above lower voltage.
34 * 3. alphabetically by node name.
37 /* This is the top level supply and variable voltage */
38 ppvar_sys: ppvar-sys-regulator {
39 compatible = "regulator-fixed";
40 regulator-name = "ppvar_sys";
45 /* This divides ppvar_sys by 2, so voltage is variable */
46 src_vph_pwr: src-vph-pwr-regulator {
47 compatible = "regulator-fixed";
48 regulator-name = "src_vph_pwr";
50 /* EC turns on with switchcap_on; always on for AP */
54 vin-supply = <&ppvar_sys>;
57 pp5000_s5: pp5000-s5-regulator {
58 compatible = "regulator-fixed";
59 regulator-name = "pp5000_s5";
61 /* EC turns on with en_pp5000_s5; always on for AP */
64 regulator-min-microvolt = <5000000>;
65 regulator-max-microvolt = <5000000>;
67 vin-supply = <&ppvar_sys>;
70 pp3300_z1: pp3300-z1-regulator {
71 compatible = "regulator-fixed";
72 regulator-name = "pp3300_z1";
74 /* EC turns on with en_pp3300_z1; always on for AP */
77 regulator-min-microvolt = <3300000>;
78 regulator-max-microvolt = <3300000>;
80 vin-supply = <&ppvar_sys>;
83 pp3300_codec: pp3300-codec-regulator {
84 compatible = "regulator-fixed";
85 regulator-name = "pp3300_codec";
87 regulator-min-microvolt = <3300000>;
88 regulator-max-microvolt = <3300000>;
90 gpio = <&tlmm 105 GPIO_ACTIVE_HIGH>;
92 pinctrl-names = "default";
93 pinctrl-0 = <&en_pp3300_codec>;
95 vin-supply = <&pp3300_z1>;
99 pp3300_left_in_mlb: pp3300-left-in-mlb-regulator {
100 compatible = "regulator-fixed";
101 regulator-name = "pp3300_left_in_mlb";
103 regulator-min-microvolt = <3300000>;
104 regulator-max-microvolt = <3300000>;
106 gpio = <&tlmm 80 GPIO_ACTIVE_HIGH>;
108 pinctrl-names = "default";
109 pinctrl-0 = <&en_pp3300_dx_edp>;
111 regulator-enable-ramp-delay = <3000>;
114 * eDP panel specs nearly always have a spec that says you
115 * shouldn't turn them off an on again without waiting 500ms.
116 * Add this as a board constraint since this rail is shared
117 * between the panel and touchscreen.
119 off-on-delay-us = <500000>;
122 * Stat the regulator on. This has the advantage of starting
123 * the slow process of powering the panel on as soon as we
124 * probe the regulator. It also avoids tripping the
125 * off-on-delay immediately on every bootup.
129 vin-supply = <&pp3300_z1>;
134 pp3300_fp_mcu: pp3300-fp-regulator {
135 compatible = "regulator-fixed";
136 regulator-name = "pp3300_fp";
138 regulator-min-microvolt = <3300000>;
139 regulator-max-microvolt = <3300000>;
145 * WARNING: it is intentional that GPIO 77 isn't listed here.
146 * The userspace script for updating the fingerprint firmware
147 * needs to control the FP regulators during a FW update,
148 * hence the signal can't be owned by the kernel regulator.
151 pinctrl-names = "default";
152 pinctrl-0 = <&en_fp_rails>;
154 vin-supply = <&pp3300_z1>;
158 pp3300_hub: pp3300-hub-regulator {
159 compatible = "regulator-fixed";
160 regulator-name = "pp3300_hub";
162 regulator-min-microvolt = <3300000>;
163 regulator-max-microvolt = <3300000>;
165 /* The BIOS leaves this regulator on */
168 gpio = <&tlmm 157 GPIO_ACTIVE_HIGH>;
170 pinctrl-names = "default";
171 pinctrl-0 = <&hub_en>;
173 vin-supply = <&pp3300_z1>;
176 pp3300_tp: pp3300-tp-regulator {
177 compatible = "regulator-fixed";
178 regulator-name = "pp3300_tp";
180 regulator-min-microvolt = <3300000>;
181 regulator-max-microvolt = <3300000>;
183 /* AP turns on with PP1800_L18B_S0; always on for AP */
187 vin-supply = <&pp3300_z1>;
190 pp3300_ssd: pp3300-ssd-regulator {
191 compatible = "regulator-fixed";
192 regulator-name = "pp3300_ssd";
194 regulator-min-microvolt = <3300000>;
195 regulator-max-microvolt = <3300000>;
197 gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
199 pinctrl-names = "default";
200 pinctrl-0 = <&ssd_en>;
203 * The bootloaer may have left PCIe configured. Powering this
204 * off while the PCIe clocks are still running isn't great,
205 * so it's better to default to this regulator being on.
209 vin-supply = <&pp3300_z1>;
212 pp2850_vcm_wf_cam: pp2850-vcm-wf-cam-regulator {
213 compatible = "regulator-fixed";
214 regulator-name = "pp2850_vcm_wf_cam";
216 regulator-min-microvolt = <2850000>;
217 regulator-max-microvolt = <2850000>;
219 gpio = <&tlmm 119 GPIO_ACTIVE_HIGH>;
221 pinctrl-names = "default";
222 pinctrl-0 = <&wf_cam_en>;
224 vin-supply = <&pp3300_z1>;
228 pp2850_wf_cam: pp2850-wf-cam-regulator {
229 compatible = "regulator-fixed";
230 regulator-name = "pp2850_wf_cam";
232 regulator-min-microvolt = <2850000>;
233 regulator-max-microvolt = <2850000>;
235 gpio = <&tlmm 119 GPIO_ACTIVE_HIGH>;
238 * The pinconf can only be referenced once so we put it on the
239 * first regulator and comment it out here.
241 * pinctrl-names = "default";
242 * pinctrl-0 = <&wf_cam_en>;
245 vin-supply = <&pp3300_z1>;
249 pp1800_fp: pp1800-fp-regulator {
250 compatible = "regulator-fixed";
251 regulator-name = "pp1800_fp";
253 regulator-min-microvolt = <1800000>;
254 regulator-max-microvolt = <1800000>;
260 * WARNING: it is intentional that GPIO 77 isn't listed here.
261 * The userspace script for updating the fingerprint firmware
262 * needs to control the FP regulators during a FW update,
263 * hence the signal can't be owned by the kernel regulator.
266 pinctrl-names = "default";
267 pinctrl-0 = <&en_fp_rails>;
269 vin-supply = <&pp1800_l18b_s0>;
273 pp1800_wf_cam: pp1800-wf-cam-regulator {
274 compatible = "regulator-fixed";
275 regulator-name = "pp1800_wf_cam";
277 regulator-min-microvolt = <1800000>;
278 regulator-max-microvolt = <1800000>;
280 gpio = <&tlmm 119 GPIO_ACTIVE_HIGH>;
283 * The pinconf can only be referenced once so we put it on the
284 * first regulator and comment it out here.
286 * pinctrl-names = "default";
287 * pinctrl-0 = <&wf_cam_en>;
290 vin-supply = <&vreg_l19b_s0>;
294 pp1200_wf_cam: pp1200-wf-cam-regulator {
295 compatible = "regulator-fixed";
296 regulator-name = "pp1200_wf_cam";
298 regulator-min-microvolt = <1200000>;
299 regulator-max-microvolt = <1200000>;
301 gpio = <&tlmm 119 GPIO_ACTIVE_HIGH>;
304 * The pinconf can only be referenced once so we put it on the
305 * first regulator and comment it out here.
307 * pinctrl-names = "default";
308 * pinctrl-0 = <&wf_cam_en>;
311 vin-supply = <&pp3300_z1>;
315 /* BOARD-SPECIFIC TOP LEVEL NODES */
317 max98360a: audio-codec-0 {
318 compatible = "maxim,max98360a";
319 pinctrl-names = "default";
320 pinctrl-0 = <&_en>;
321 sdmode-gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
322 #sound-dai-cells = <0>;
326 compatible = "pwm-leds";
328 keyboard_backlight: led-0 {
329 label = "cros_ec::kbd_backlight";
330 function = LED_FUNCTION_KBD_BACKLIGHT;
331 pwms = <&cros_ec_pwm 0>;
332 max-brightness = <1023>;
338 * ADJUSTMENTS TO QCARD REGULATORS
340 * Mostly this is just board-local names for regulators that come from
341 * Qcard, but this also has some minor regulator overrides.
343 * Names are only listed here if regulators go somewhere other than a
347 /* From Qcard to our board; ordered by PMIC-ID / rail number */
349 pp1256_s8b: &vreg_s8b_1p256 {};
351 pp1800_l18b_s0: &vreg_l18b_1p8 {};
352 pp1800_l18b: &vreg_l18b_1p8 {};
354 vreg_l19b_s0: &vreg_l19b_1p8 {};
356 pp1800_alc5682: &vreg_l2c_1p8 {};
357 pp1800_l2c: &vreg_l2c_1p8 {};
359 vreg_l4c: &vreg_l4c_1p8_3p0 {};
361 ppvar_l6c: &vreg_l6c_2p96 {};
363 pp3000_l7c: &vreg_l7c_3p0 {};
365 pp1800_prox: &vreg_l8c_1p8 {};
366 pp1800_l8c: &vreg_l8c_1p8 {};
368 pp2950_l9c: &vreg_l9c_2p96 {};
370 pp1800_lcm: &vreg_l12c_1p8 {};
371 pp1800_mipi: &vreg_l12c_1p8 {};
372 pp1800_l12c: &vreg_l12c_1p8 {};
374 pp3300_lcm: &vreg_l13c_3p0 {};
375 pp3300_mipi: &vreg_l13c_3p0 {};
376 pp3300_l13c: &vreg_l13c_3p0 {};
378 /* From our board to Qcard; ordered same as node definition above */
380 vreg_edp_bl: &ppvar_sys {};
382 ts_avdd: &pp3300_left_in_mlb {};
383 vreg_edp_3p3: &pp3300_left_in_mlb {};
385 /* Regulator overrides from Qcard */
388 * Herobrine boards only use l2c to power an external audio codec (like
389 * alc5682) and we want that to be at 1.8V, not at some slightly lower voltage.
392 regulator-min-microvolt = <1800000>;
395 /* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */
398 /* Our board provides power to the qcard for the eDP panel. */
399 power-supply = <&vreg_edp_3p3>;
402 ap_sar_sensor_i2c: &i2c1 {
403 clock-frequency = <400000>;
406 ap_sar_sensor0: proximity@28 {
407 compatible = "semtech,sx9324";
409 #io-channel-cells = <1>;
410 pinctrl-names = "default";
411 pinctrl-0 = <&sar0_irq_odl>;
413 interrupt-parent = <&tlmm>;
414 interrupts = <141 IRQ_TYPE_LEVEL_LOW>;
416 vdd-supply = <&pp1800_prox>;
418 label = "proximity-wifi_cellular-0";
422 ap_sar_sensor1: proximity@2c {
423 compatible = "semtech,sx9324";
425 #io-channel-cells = <1>;
426 pinctrl-names = "default";
427 pinctrl-0 = <&sar1_irq_odl>;
429 interrupt-parent = <&tlmm>;
430 interrupts = <140 IRQ_TYPE_LEVEL_LOW>;
432 vdd-supply = <&pp1800_prox>;
434 label = "proximity-wifi_cellular-1";
441 clock-frequency = <400000>;
444 compatible = "google,cr50";
447 pinctrl-names = "default";
448 pinctrl-0 = <&gsc_ap_int_odl>;
450 interrupt-parent = <&tlmm>;
451 interrupts = <104 IRQ_TYPE_EDGE_RISING>;
461 pinctrl-names = "default";
462 pinctrl-0 = <&dp_hot_plug_det>;
467 link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000>;
470 /* NVMe drive, enabled on a per-board basis */
472 pinctrl-names = "default";
473 pinctrl-0 = <&pcie1_clkreq_n>, <&ssd_rst_l>, <&pe_wake_odl>;
475 perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
476 vddpe-3v3-supply = <&pp3300_ssd>;
483 &pm8350c_pwm_backlight {
486 /* Our board provides power to the qcard for the backlight */
487 power-supply = <&vreg_edp_bl>;
502 /* SD Card, enabled on a per-board basis */
504 pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>, <&sd_cd_odl>;
505 pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>, <&sd_cd_odl>;
507 vmmc-supply = <&pp2950_l9c>;
508 vqmmc-supply = <&ppvar_l6c>;
510 cd-gpios = <&tlmm 91 GPIO_ACTIVE_LOW>;
514 spi-max-frequency = <50000000>;
517 /* Fingerprint, enabled on a per-board basis */
519 pinctrl-0 = <&qup_spi9_data_clk>, <&qup_spi9_cs_gpio_init_high>, <&qup_spi9_cs_gpio>;
521 cs-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
524 compatible = "google,cros-ec-fp", "google,cros-ec-spi";
526 interrupt-parent = <&tlmm>;
527 interrupts = <61 IRQ_TYPE_LEVEL_LOW>;
528 pinctrl-names = "default";
529 pinctrl-0 = <&fp_to_ap_irq_l>, <&fp_rst_l>, <&fpmcu_boot0>;
530 boot0-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
531 reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>;
532 spi-max-frequency = <3000000>;
533 vdd-supply = <&pp3300_fp_mcu>;
539 pinctrl-0 = <&qup_spi10_data_clk>, <&qup_spi10_cs_gpio_init_high>, <&qup_spi10_cs_gpio>;
541 cs-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
544 compatible = "google,cros-ec-spi";
546 interrupt-parent = <&tlmm>;
547 interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
548 pinctrl-names = "default";
549 pinctrl-0 = <&ap_ec_int_l>;
550 spi-max-frequency = <3000000>;
553 compatible = "google,cros-ec-pwm";
557 i2c_tunnel: i2c-tunnel {
558 compatible = "google,cros-ec-i2c-tunnel";
559 google,remote-bus = <0>;
560 #address-cells = <1>;
565 compatible = "google,cros-ec-typec";
566 #address-cells = <1>;
569 usb_c0: connector@0 {
570 compatible = "usb-c-connector";
575 try-power-role = "source";
578 usb_c1: connector@1 {
579 compatible = "usb-c-connector";
584 try-power-role = "source";
590 #include <arm/cros-ec-keyboard.dtsi>
591 #include <arm/cros-ec-sbs.dtsi>
593 &keyboard_controller {
594 function-row-physmap = <
595 MATRIX_KEY(0x00, 0x02, 0) /* T1 */
596 MATRIX_KEY(0x03, 0x02, 0) /* T2 */
597 MATRIX_KEY(0x02, 0x02, 0) /* T3 */
598 MATRIX_KEY(0x01, 0x02, 0) /* T4 */
599 MATRIX_KEY(0x03, 0x04, 0) /* T5 */
600 MATRIX_KEY(0x02, 0x04, 0) /* T6 */
601 MATRIX_KEY(0x01, 0x04, 0) /* T7 */
602 MATRIX_KEY(0x02, 0x09, 0) /* T8 */
603 MATRIX_KEY(0x01, 0x09, 0) /* T9 */
604 MATRIX_KEY(0x00, 0x04, 0) /* T10 */
607 MATRIX_KEY(0x00, 0x02, KEY_BACK)
608 MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
609 MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
610 MATRIX_KEY(0x01, 0x02, KEY_SCALE)
611 MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
612 MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
613 MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
614 MATRIX_KEY(0x02, 0x09, KEY_MUTE)
615 MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
616 MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
629 #address-cells = <1>;
632 /* 2.x hub on port 1 */
634 compatible = "usbbda,5411";
636 vdd-supply = <&pp3300_hub>;
637 peer-hub = <&usb_hub_3_x>;
640 /* 3.x hub on port 2 */
642 compatible = "usbbda,411";
644 vdd-supply = <&pp3300_hub>;
645 peer-hub = <&usb_hub_2_x>;
652 qcom,hs-rise-fall-time-bp = <0>;
653 qcom,squelch-detector-bp = <(-2090)>;
654 qcom,hs-disconnect-bp = <1743>;
655 qcom,hs-amplitude-bp = <1780>;
656 qcom,hs-crossover-voltage-microvolt = <(-31000)>;
657 qcom,hs-output-impedance-micro-ohms = <2600000>;
664 /* PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES */
671 drive-strength = <6>;
676 drive-strength = <6>;
681 drive-strength = <6>;
687 drive-strength = <2>;
691 bias-disable; /* External pullup */
692 drive-strength = <8>;
696 bias-pull-down; /* No external pulls */
697 drive-strength = <8>;
701 bias-pull-down; /* No external pulls */
702 drive-strength = <8>;
706 bias-disable; /* External pulldown */
707 drive-strength = <8>;
712 /* Has external pull */
714 drive-strength = <2>;
718 &qup_i2c14_data_clk {
719 /* Has external pull */
721 drive-strength = <2>;
727 drive-strength = <2>;
733 drive-strength = <2>;
737 &qup_spi10_data_clk {
739 drive-strength = <2>;
745 drive-strength = <2>;
756 drive-strength = <2>;
761 drive-strength = <16>;
766 drive-strength = <10>;
771 drive-strength = <10>;
774 /* PINCTRL - board-specific pinctrl */
778 * On a quick glance it might look like KYPD_VOL_UP_N is used, but
779 * that only passes through to a debug connector and not to the actual
782 status = "disabled"; /* No GPIOs are connected */
786 status = "disabled"; /* No GPIOs are connected */
790 /* pinctrl settings for pins that have no real owners. */
791 pinctrl-names = "default";
792 pinctrl-0 = <&bios_flash_wp_od>;
794 amp_en: amp-en-state {
798 drive-strength = <2>;
801 ap_ec_int_l: ap-ec-int-l-state {
807 bios_flash_wp_od: bios-flash-wp-od-state {
810 /* Has external pull */
814 en_fp_rails: en-fp-rails-state {
818 drive-strength = <2>;
822 en_pp3300_codec: en-pp3300-codec-state {
826 drive-strength = <2>;
829 en_pp3300_dx_edp: en-pp3300-dx-edp-state {
833 drive-strength = <2>;
836 fp_rst_l: fp-rst-l-state {
840 drive-strength = <2>;
843 fp_to_ap_irq_l: fp-to-ap-irq-l-state {
846 /* Has external pullup */
850 fpmcu_boot0: fpmcu-boot0-state {
856 gsc_ap_int_odl: gsc-ap-int-odl-state {
862 hp_irq: hp-irq-state {
868 hub_en: hub-en-state {
872 drive-strength = <2>;
875 pe_wake_odl: pe-wake-odl-state {
878 /* Has external pull */
880 drive-strength = <2>;
884 qup_spi9_cs_gpio_init_high: qup-spi9-cs-gpio-init-high-state {
891 qup_spi10_cs_gpio_init_high: qup-spi10-cs-gpio-init-high-state {
897 sar0_irq_odl: sar0-irq-odl-state {
903 sar1_irq_odl: sar1-irq-odl-state {
909 sd_cd_odl: sd-cd-odl-state {
915 ssd_en: ssd-en-state {
919 drive-strength = <2>;
922 ssd_rst_l: ssd-rst-l-state {
926 drive-strength = <2>;
930 tp_int_odl: tp-int-odl-state {
933 /* Has external pullup */
937 wf_cam_en: wf-cam-en-state {
940 /* Has external pulldown */
942 drive-strength = <2>;