1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Copyright (C) 2021 MediaTek Inc.
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/spmi/spmi.h>
26 stdout-path = "serial0:115200n8";
30 device_type = "memory";
31 reg = <0 0x40000000 0 0x80000000>;
34 /* system wide LDO 3.3V power rail */
35 pp3300_z5: regulator-pp3300-ldo-z5 {
36 compatible = "regulator-fixed";
37 regulator-name = "pp3300_ldo_z5";
40 regulator-min-microvolt = <3300000>;
41 regulator-max-microvolt = <3300000>;
42 vin-supply = <&ppvar_sys>;
45 /* separately switched 3.3V power rail */
46 pp3300_s3: regulator-pp3300-s3 {
47 compatible = "regulator-fixed";
48 regulator-name = "pp3300_s3";
49 /* automatically sequenced by PMIC EXT_PMIC_EN2 */
52 regulator-min-microvolt = <3300000>;
53 regulator-max-microvolt = <3300000>;
54 vin-supply = <&pp3300_z2>;
57 /* system wide 3.3V power rail */
58 pp3300_z2: regulator-pp3300-z2 {
59 compatible = "regulator-fixed";
60 regulator-name = "pp3300_z2";
61 /* EN pin tied to pp4200_z2, which is controlled by EC */
64 regulator-min-microvolt = <3300000>;
65 regulator-max-microvolt = <3300000>;
66 vin-supply = <&ppvar_sys>;
69 /* system wide 4.2V power rail */
70 pp4200_z2: regulator-pp4200-z2 {
71 compatible = "regulator-fixed";
72 regulator-name = "pp4200_z2";
73 /* controlled by EC */
76 regulator-min-microvolt = <4200000>;
77 regulator-max-microvolt = <4200000>;
78 vin-supply = <&ppvar_sys>;
81 /* system wide switching 5.0V power rail */
82 pp5000_s5: regulator-pp5000-s5 {
83 compatible = "regulator-fixed";
84 regulator-name = "pp5000_s5";
85 /* controlled by EC */
88 regulator-min-microvolt = <5000000>;
89 regulator-max-microvolt = <5000000>;
90 vin-supply = <&ppvar_sys>;
93 /* system wide semi-regulated power rail from battery or USB */
94 ppvar_sys: regulator-ppvar-sys {
95 compatible = "regulator-fixed";
96 regulator-name = "ppvar_sys";
101 usb_vbus: regulator-5v0-usb-vbus {
102 compatible = "regulator-fixed";
103 regulator-name = "usb-vbus";
104 regulator-min-microvolt = <5000000>;
105 regulator-max-microvolt = <5000000>;
110 reserved_memory: reserved-memory {
111 #address-cells = <2>;
115 scp_mem: memory@50000000 {
116 compatible = "shared-dma-pool";
117 reg = <0 0x50000000 0 0x2900000>;
126 clock-frequency = <400000>;
127 pinctrl-names = "default";
128 pinctrl-0 = <&i2c0_pins>;
134 clock-frequency = <400000>;
135 i2c-scl-internal-delay-ns = <12500>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&i2c1_pins>;
140 compatible = "elan,ekth3000";
142 interrupts-extended = <&pio 6 IRQ_TYPE_LEVEL_LOW>;
143 pinctrl-names = "default";
144 pinctrl-0 = <&trackpad_pins>;
145 vcc-supply = <&pp3300_s3>;
153 clock-frequency = <400000>;
154 pinctrl-names = "default";
155 pinctrl-0 = <&i2c2_pins>;
161 clock-frequency = <400000>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&i2c3_pins>;
166 compatible = "google,cr50";
168 interrupts-extended = <&pio 88 IRQ_TYPE_EDGE_FALLING>;
169 pinctrl-names = "default";
170 pinctrl-0 = <&cr50_int>;
177 clock-frequency = <400000>;
178 pinctrl-names = "default";
179 pinctrl-0 = <&i2c4_pins>;
181 ts_10: touchscreen@10 {
182 compatible = "hid-over-i2c";
184 hid-descr-addr = <0x0001>;
185 interrupts-extended = <&pio 92 IRQ_TYPE_LEVEL_LOW>;
186 pinctrl-names = "default";
187 pinctrl-0 = <&touchscreen_pins>;
188 post-power-on-delay-ms = <10>;
189 vdd-supply = <&pp3300_s3>;
197 clock-frequency = <400000>;
198 pinctrl-names = "default";
199 pinctrl-0 = <&i2c5_pins>;
205 clock-frequency = <400000>;
206 pinctrl-names = "default";
207 pinctrl-0 = <&i2c7_pins>;
210 #interrupt-cells = <2>;
211 compatible = "mediatek,mt6360";
213 interrupt-controller;
214 interrupts-extended = <&pio 130 IRQ_TYPE_EDGE_FALLING>;
215 interrupt-names = "IRQB";
216 pinctrl-names = "default";
217 pinctrl-0 = <&subpmic_default>;
228 hs400-ds-delay = <0x14c11>;
229 max-frequency = <200000000>;
235 pinctrl-names = "default", "state_uhs";
236 pinctrl-0 = <&mmc0_pins_default>;
237 pinctrl-1 = <&mmc0_pins_uhs>;
238 vmmc-supply = <&mt6359_vemc_1_ldo_reg>;
239 vqmmc-supply = <&mt6359_vufs_ldo_reg>;
247 cd-gpios = <&pio 54 GPIO_ACTIVE_LOW>;
248 max-frequency = <200000000>;
251 pinctrl-names = "default", "state_uhs";
252 pinctrl-0 = <&mmc1_pins_default>, <&mmc1_pins_detect>;
253 pinctrl-1 = <&mmc1_pins_default>;
256 vmmc-supply = <&mt_pmic_vmch_ldo_reg>;
257 vqmmc-supply = <&mt_pmic_vmc_ldo_reg>;
261 &mt6359_vcore_buck_reg {
266 &mt6359_vgpu11_buck_reg {
270 &mt6359_vgpu11_sshub_buck_reg {
272 regulator-min-microvolt = <550000>;
273 regulator-max-microvolt = <550000>;
277 &mt6359_vpu_buck_reg {
281 &mt6359_vrf12_ldo_reg {
286 &mt6359_vsram_others_ldo_reg {
288 regulator-min-microvolt = <750000>;
289 regulator-max-microvolt = <750000>;
292 &mt6359_vufs_ldo_reg {
299 pinctrl-names = "default";
300 pinctrl-0 = <&nor_pins_default>;
303 compatible = "jedec,spi-nor";
305 spi-max-frequency = <52000000>;
306 spi-rx-bus-width = <2>;
307 spi-tx-bus-width = <2>;
312 mediatek,rsel-resistance-in-si-unit;
313 pinctrl-names = "default";
314 pinctrl-0 = <&pio_default>;
324 * AP_FLASH_WP_L is crossystem ABI. Schematics
325 * call it AP_FLASH_WP_ODL.
332 "AP_I2C_TCHPAD_SDA_1V8",
333 "AP_I2C_TCHPAD_SCL_1V8",
336 "AP_I2C_TPM_SDA_1V8",
337 "AP_I2C_TPM_SCL_1V8",
338 "AP_I2C_TCHSCR_SDA_1V8",
339 "AP_I2C_TCHSCR_SCL_1V8",
343 "PCIE_NVME_CLKREQ_ODL",
345 "PCIE_CLKREQ_1V8_ODL",
349 "AP_I2C_PWR_SCL_1V8",
350 "AP_I2C_PWR_SDA_1V8",
379 "TCHSCR_REPORT_DISABLE",
385 "SCP_I2C_SENSOR_SCL_1V8",
386 "SCP_I2C_SENSOR_SDA_1V8",
399 "AP_SPI_GSC_TPM_CLK",
400 "AP_SPI_GSC_TPM_MOSI",
401 "AP_SPI_GSC_TPM_CS_L",
402 "AP_SPI_GSC_TPM_MISO",
423 "AP_EC_WARM_RST_REQ",
424 "UART_SCP_TX_DBGCON_RX",
425 "UART_DBGCON_TX_SCP_RX",
431 "MT6315_PROC_BC_INT",
467 cr50_int: cr50-irq-default-pins {
468 pins-gsc-ap-int-odl {
469 pinmux = <PINMUX_GPIO88__FUNC_GPIO88>;
474 cros_ec_int: cros-ec-irq-default-pins {
476 pinmux = <PINMUX_GPIO4__FUNC_GPIO4>;
477 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
482 i2c0_pins: i2c0-default-pins {
484 pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
485 <PINMUX_GPIO9__FUNC_SCL0>;
487 drive-strength-microamp = <1000>;
491 i2c1_pins: i2c1-default-pins {
493 pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
494 <PINMUX_GPIO11__FUNC_SCL1>;
495 bias-pull-up = <1000>;
496 drive-strength-microamp = <1000>;
500 i2c2_pins: i2c2-default-pins {
502 pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
503 <PINMUX_GPIO13__FUNC_SCL2>;
505 drive-strength-microamp = <1000>;
509 i2c3_pins: i2c3-default-pins {
511 pinmux = <PINMUX_GPIO14__FUNC_SDA3>,
512 <PINMUX_GPIO15__FUNC_SCL3>;
513 bias-pull-up = <1000>;
514 drive-strength-microamp = <1000>;
518 i2c4_pins: i2c4-default-pins {
520 pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
521 <PINMUX_GPIO17__FUNC_SCL4>;
522 bias-pull-up = <1000>;
523 drive-strength = <4>;
527 i2c5_pins: i2c5-default-pins {
529 pinmux = <PINMUX_GPIO29__FUNC_SCL5>,
530 <PINMUX_GPIO30__FUNC_SDA5>;
532 drive-strength-microamp = <1000>;
536 i2c7_pins: i2c7-default-pins {
538 pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
539 <PINMUX_GPIO28__FUNC_SDA7>;
544 mmc0_pins_default: mmc0-default-pins {
546 pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>,
547 <PINMUX_GPIO125__FUNC_MSDC0_DAT1>,
548 <PINMUX_GPIO124__FUNC_MSDC0_DAT2>,
549 <PINMUX_GPIO123__FUNC_MSDC0_DAT3>,
550 <PINMUX_GPIO119__FUNC_MSDC0_DAT4>,
551 <PINMUX_GPIO118__FUNC_MSDC0_DAT5>,
552 <PINMUX_GPIO117__FUNC_MSDC0_DAT6>,
553 <PINMUX_GPIO116__FUNC_MSDC0_DAT7>,
554 <PINMUX_GPIO121__FUNC_MSDC0_CMD>;
556 drive-strength = <6>;
557 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
561 pinmux = <PINMUX_GPIO122__FUNC_MSDC0_CLK>;
562 drive-strength = <6>;
563 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
567 pinmux = <PINMUX_GPIO120__FUNC_MSDC0_RSTB>;
568 drive-strength = <6>;
569 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
573 mmc0_pins_uhs: mmc0-uhs-pins {
575 pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>,
576 <PINMUX_GPIO125__FUNC_MSDC0_DAT1>,
577 <PINMUX_GPIO124__FUNC_MSDC0_DAT2>,
578 <PINMUX_GPIO123__FUNC_MSDC0_DAT3>,
579 <PINMUX_GPIO119__FUNC_MSDC0_DAT4>,
580 <PINMUX_GPIO118__FUNC_MSDC0_DAT5>,
581 <PINMUX_GPIO117__FUNC_MSDC0_DAT6>,
582 <PINMUX_GPIO116__FUNC_MSDC0_DAT7>,
583 <PINMUX_GPIO121__FUNC_MSDC0_CMD>;
585 drive-strength = <8>;
586 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
590 pinmux = <PINMUX_GPIO122__FUNC_MSDC0_CLK>;
591 drive-strength = <8>;
592 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
596 pinmux = <PINMUX_GPIO127__FUNC_MSDC0_DSL>;
597 drive-strength = <8>;
598 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
602 pinmux = <PINMUX_GPIO120__FUNC_MSDC0_RSTB>;
603 drive-strength = <8>;
604 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
608 mmc1_pins_detect: mmc1-detect-pins {
610 pinmux = <PINMUX_GPIO54__FUNC_GPIO54>;
615 mmc1_pins_default: mmc1-default-pins {
617 pinmux = <PINMUX_GPIO110__FUNC_MSDC1_CMD>,
618 <PINMUX_GPIO112__FUNC_MSDC1_DAT0>,
619 <PINMUX_GPIO113__FUNC_MSDC1_DAT1>,
620 <PINMUX_GPIO114__FUNC_MSDC1_DAT2>,
621 <PINMUX_GPIO115__FUNC_MSDC1_DAT3>;
623 drive-strength = <8>;
624 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
628 pinmux = <PINMUX_GPIO111__FUNC_MSDC1_CLK>;
629 drive-strength = <8>;
630 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
634 nor_pins_default: nor-default-pins {
636 pinmux = <PINMUX_GPIO142__FUNC_SPINOR_IO0>,
637 <PINMUX_GPIO141__FUNC_SPINOR_CK>,
638 <PINMUX_GPIO143__FUNC_SPINOR_IO1>;
639 drive-strength = <6>;
644 pinmux = <PINMUX_GPIO140__FUNC_SPINOR_CS>;
645 drive-strength = <6>;
650 pio_default: pio-default-pins {
652 pinmux = <PINMUX_GPIO58__FUNC_GPIO58>;
654 drive-strength = <14>;
658 pinmux = <PINMUX_GPIO25__FUNC_GPIO25>,
659 <PINMUX_GPIO26__FUNC_GPIO26>,
660 <PINMUX_GPIO46__FUNC_GPIO46>,
661 <PINMUX_GPIO47__FUNC_GPIO47>,
662 <PINMUX_GPIO48__FUNC_GPIO48>,
663 <PINMUX_GPIO65__FUNC_GPIO65>,
664 <PINMUX_GPIO66__FUNC_GPIO66>,
665 <PINMUX_GPIO67__FUNC_GPIO67>,
666 <PINMUX_GPIO68__FUNC_GPIO68>,
667 <PINMUX_GPIO128__FUNC_GPIO128>,
668 <PINMUX_GPIO129__FUNC_GPIO129>;
673 pins-low-power-pupd {
674 pinmux = <PINMUX_GPIO77__FUNC_GPIO77>,
675 <PINMUX_GPIO78__FUNC_GPIO78>,
676 <PINMUX_GPIO79__FUNC_GPIO79>,
677 <PINMUX_GPIO80__FUNC_GPIO80>,
678 <PINMUX_GPIO83__FUNC_GPIO83>,
679 <PINMUX_GPIO85__FUNC_GPIO85>,
680 <PINMUX_GPIO90__FUNC_GPIO90>,
681 <PINMUX_GPIO91__FUNC_GPIO91>,
682 <PINMUX_GPIO93__FUNC_GPIO93>,
683 <PINMUX_GPIO94__FUNC_GPIO94>,
684 <PINMUX_GPIO95__FUNC_GPIO95>,
685 <PINMUX_GPIO96__FUNC_GPIO96>,
686 <PINMUX_GPIO104__FUNC_GPIO104>,
687 <PINMUX_GPIO105__FUNC_GPIO105>,
688 <PINMUX_GPIO107__FUNC_GPIO107>;
690 bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
694 scp_pins: scp-default-pins {
696 pinmux = <PINMUX_GPIO76__FUNC_SCP_VREQ_VAO>;
702 spi0_pins: spi0-default-pins {
704 pinmux = <PINMUX_GPIO132__FUNC_SPIM0_CSB>,
705 <PINMUX_GPIO134__FUNC_SPIM0_MO>,
706 <PINMUX_GPIO133__FUNC_SPIM0_CLK>;
711 pinmux = <PINMUX_GPIO135__FUNC_SPIM0_MI>;
716 subpmic_default: subpmic-default-pins {
717 subpmic_pin_irq: pins-subpmic-int-n {
718 pinmux = <PINMUX_GPIO130__FUNC_GPIO130>;
724 trackpad_pins: trackpad-default-pins {
726 pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
732 touchscreen_pins: touchscreen-default-pins {
734 pinmux = <PINMUX_GPIO92__FUNC_GPIO92>;
736 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
739 pinmux = <PINMUX_GPIO56__FUNC_GPIO56>;
743 pinmux = <PINMUX_GPIO57__FUNC_GPIO57>;
750 interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
756 firmware-name = "/*(DEBLOBBED)*/";
757 memory-region = <&scp_mem>;
758 pinctrl-names = "default";
759 pinctrl-0 = <&scp_pins>;
762 compatible = "google,cros-ec-rpmsg";
763 mediatek,rpmsg-name = "cros-ec-rpmsg";
770 pinctrl-names = "default";
771 pinctrl-0 = <&spi0_pins>;
772 mediatek,pad-select = <0>;
775 #address-cells = <1>;
778 compatible = "google,cros-ec-spi";
780 interrupts-extended = <&pio 4 IRQ_TYPE_LEVEL_LOW>;
781 pinctrl-names = "default";
782 pinctrl-0 = <&cros_ec_int>;
783 spi-max-frequency = <3000000>;
786 compatible = "google,cros-kbd-led-backlight";
789 i2c_tunnel: i2c-tunnel {
790 compatible = "google,cros-ec-i2c-tunnel";
791 google,remote-bus = <0>;
792 #address-cells = <1>;
796 mt_pmic_vmc_ldo_reg: regulator@0 {
797 compatible = "google,cros-ec-regulator";
799 regulator-name = "mt_pmic_vmc_ldo";
800 regulator-min-microvolt = <1200000>;
801 regulator-max-microvolt = <3600000>;
804 mt_pmic_vmch_ldo_reg: regulator@1 {
805 compatible = "google,cros-ec-regulator";
807 regulator-name = "mt_pmic_vmch_ldo";
808 regulator-min-microvolt = <2700000>;
809 regulator-max-microvolt = <3600000>;
813 compatible = "google,cros-ec-typec";
814 #address-cells = <1>;
817 usb_c0: connector@0 {
818 compatible = "usb-c-connector";
822 try-power-role = "source";
825 usb_c1: connector@1 {
826 compatible = "usb-c-connector";
830 try-power-role = "source";
837 #address-cells = <2>;
841 compatible = "mediatek,mt6315-regulator";
842 reg = <0x6 SPMI_USID>;
845 mt6315_6_vbuck1: vbuck1 {
846 regulator-compatible = "vbuck1";
847 regulator-name = "Vbcpu";
848 regulator-min-microvolt = <400000>;
849 regulator-max-microvolt = <1193750>;
850 regulator-enable-ramp-delay = <256>;
851 regulator-ramp-delay = <6250>;
852 regulator-allowed-modes = <0 1 2>;
859 compatible = "mediatek,mt6315-regulator";
860 reg = <0x7 SPMI_USID>;
863 mt6315_7_vbuck1: vbuck1 {
864 regulator-compatible = "vbuck1";
865 regulator-name = "Vgpu";
866 regulator-min-microvolt = <400000>;
867 regulator-max-microvolt = <1193750>;
868 regulator-enable-ramp-delay = <256>;
869 regulator-ramp-delay = <6250>;
870 regulator-allowed-modes = <0 1 2>;
900 vusb33-supply = <&mt6359_vusb_ldo_reg>;
901 vbus-supply = <&usb_vbus>;
907 vusb33-supply = <&mt6359_vusb_ldo_reg>;
908 vbus-supply = <&usb_vbus>;
914 vusb33-supply = <&mt6359_vusb_ldo_reg>;
915 vbus-supply = <&usb_vbus>;
921 /* MT7921's USB Bluetooth has issues with USB2 LPM */
923 vusb33-supply = <&mt6359_vusb_ldo_reg>;
924 vbus-supply = <&usb_vbus>;
927 #include <arm/cros-ec-keyboard.dtsi>
928 #include <arm/cros-ec-sbs.dtsi>
930 &keyboard_controller {
931 function-row-physmap = <
932 MATRIX_KEY(0x00, 0x02, 0) /* T1 */
933 MATRIX_KEY(0x03, 0x02, 0) /* T2 */
934 MATRIX_KEY(0x02, 0x02, 0) /* T3 */
935 MATRIX_KEY(0x01, 0x02, 0) /* T4 */
936 MATRIX_KEY(0x03, 0x04, 0) /* T5 */
937 MATRIX_KEY(0x02, 0x04, 0) /* T6 */
938 MATRIX_KEY(0x01, 0x04, 0) /* T7 */
939 MATRIX_KEY(0x02, 0x09, 0) /* T8 */
940 MATRIX_KEY(0x01, 0x09, 0) /* T9 */
941 MATRIX_KEY(0x00, 0x04, 0) /* T10 */
945 MATRIX_KEY(0x00, 0x02, KEY_BACK)
946 MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
947 MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
948 MATRIX_KEY(0x01, 0x02, KEY_SCALE)
949 MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
950 MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
951 MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
952 MATRIX_KEY(0x02, 0x09, KEY_MUTE)
953 MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
954 MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)