1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Copyright (c) 2018 MediaTek Inc.
4 * Author: Ben Ho <ben.ho@mediatek.com>
5 * Erin Lo <erin.lo@mediatek.com>
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include "mt8183.dtsi"
11 #include "mt6358.dtsi"
21 stdout-path = "serial0:115200n8";
24 backlight_lcd0: backlight_lcd0 {
25 compatible = "pwm-backlight";
26 pwms = <&pwm0 0 500000>;
27 power-supply = <&bl_pp5000>;
28 enable-gpios = <&pio 176 0>;
29 brightness-levels = <0 1023>;
30 num-interpolated-steps = <1023>;
31 default-brightness-level = <576>;
36 device_type = "memory";
37 reg = <0 0x40000000 0 0x80000000>;
41 compatible = "fixed-clock";
43 clock-frequency = <32768>;
44 clock-output-names = "clk32k";
47 it6505_pp18_reg: regulator0 {
48 compatible = "regulator-fixed";
49 regulator-name = "it6505_pp18";
50 regulator-min-microvolt = <1800000>;
51 regulator-max-microvolt = <1800000>;
56 lcd_pp3300: regulator1 {
57 compatible = "regulator-fixed";
58 regulator-name = "lcd_pp3300";
59 regulator-min-microvolt = <3300000>;
60 regulator-max-microvolt = <3300000>;
65 bl_pp5000: regulator2 {
66 compatible = "regulator-fixed";
67 regulator-name = "bl_pp5000";
68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>;
74 mmc1_fixed_power: regulator3 {
75 compatible = "regulator-fixed";
76 regulator-name = "mmc1_power";
77 regulator-min-microvolt = <3300000>;
78 regulator-max-microvolt = <3300000>;
81 mmc1_fixed_io: regulator4 {
82 compatible = "regulator-fixed";
83 regulator-name = "mmc1_io";
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <1800000>;
88 pp1800_alw: regulator5 {
89 compatible = "regulator-fixed";
90 regulator-name = "pp1800_alw";
93 regulator-min-microvolt = <1800000>;
94 regulator-max-microvolt = <1800000>;
97 pp3300_alw: regulator6 {
98 compatible = "regulator-fixed";
99 regulator-name = "pp3300_alw";
102 regulator-min-microvolt = <3300000>;
103 regulator-max-microvolt = <3300000>;
106 reserved_memory: reserved-memory {
107 #address-cells = <2>;
111 scp_mem_reserved: memory@50000000 {
112 compatible = "shared-dma-pool";
113 reg = <0 0x50000000 0 0x2900000>;
118 sound: mt8183-sound {
119 mediatek,platform = <&afe>;
120 pinctrl-names = "default",
123 pinctrl-0 = <&aud_pins_default>;
124 pinctrl-1 = <&aud_pins_tdm_out_on>;
125 pinctrl-2 = <&aud_pins_tdm_out_off>;
130 compatible = "linux,bt-sco";
133 wifi_pwrseq: wifi-pwrseq {
134 compatible = "mmc-pwrseq-simple";
135 pinctrl-names = "default";
136 pinctrl-0 = <&wifi_pins_pwrseq>;
138 /* Toggle WIFI_ENABLE to reset the chip. */
139 reset-gpios = <&pio 119 1>;
142 wifi_wakeup: wifi-wakeup {
143 compatible = "gpio-keys";
144 pinctrl-names = "default";
145 pinctrl-0 = <&wifi_pins_wakeup>;
148 label = "Wake on WiFi";
149 gpios = <&pio 113 GPIO_ACTIVE_HIGH>;
150 linux,code = <KEY_WAKEUP>;
155 tboard_thermistor1: thermal-sensor1 {
156 compatible = "generic-adc-thermal";
157 #thermal-sensor-cells = <0>;
158 io-channels = <&auxadc 0>;
159 io-channel-names = "sensor-channel";
160 temperature-lookup-table = < (-5000) 1553
189 tboard_thermistor2: thermal-sensor2 {
190 compatible = "generic-adc-thermal";
191 #thermal-sensor-cells = <0>;
192 io-channels = <&auxadc 1>;
193 io-channel-names = "sensor-channel";
194 temperature-lookup-table = < (-5000) 1553
234 proc-supply = <&mt6358_vproc12_reg>;
238 proc-supply = <&mt6358_vproc12_reg>;
242 proc-supply = <&mt6358_vproc12_reg>;
246 proc-supply = <&mt6358_vproc12_reg>;
250 proc-supply = <&mt6358_vproc12_reg>;
254 proc-supply = <&mt6358_vproc11_reg>;
258 proc-supply = <&mt6358_vproc11_reg>;
262 proc-supply = <&mt6358_vproc11_reg>;
266 proc-supply = <&mt6358_vproc11_reg>;
271 #address-cells = <1>;
274 /* compatible will be set in board dts */
276 enable-gpios = <&pio 45 0>;
277 pinctrl-names = "default";
278 pinctrl-0 = <&panel_pins_default>;
279 avdd-supply = <&ppvarn_lcd>;
280 avee-supply = <&ppvarp_lcd>;
281 pp1800-supply = <&pp1800_lcd>;
282 backlight = <&backlight_lcd0>;
286 remote-endpoint = <&dsi_out>;
294 remote-endpoint = <&panel_in>;
301 mediatek,broken-save-restore-fw;
305 mali-supply = <&mt6358_vgpu_reg>;
306 sram-supply = <&mt6358_vsram_gpu_reg>;
310 pinctrl-names = "default";
311 pinctrl-0 = <&i2c0_pins>;
313 clock-frequency = <400000>;
314 #address-cells = <1>;
319 pinctrl-names = "default";
320 pinctrl-0 = <&i2c1_pins>;
322 clock-frequency = <100000>;
326 pinctrl-names = "default";
327 pinctrl-0 = <&i2c3_pins>;
329 clock-frequency = <100000>;
330 #address-cells = <1>;
335 pinctrl-names = "default";
336 pinctrl-0 = <&i2c5_pins>;
338 clock-frequency = <100000>;
339 #address-cells = <1>;
344 pinctrl-names = "default";
345 pinctrl-0 = <&i2c6_pins>;
347 clock-frequency = <100000>;
356 pinctrl-names = "default", "state_uhs";
357 pinctrl-0 = <&mmc0_pins_default>;
358 pinctrl-1 = <&mmc0_pins_uhs>;
360 max-frequency = <200000000>;
367 hs400-ds-delay = <0x12814>;
368 vmmc-supply = <&mt6358_vemc_reg>;
369 vqmmc-supply = <&mt6358_vio18_reg>;
370 assigned-clocks = <&topckgen CLK_TOP_MUX_MSDC50_0>;
371 assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_CK>;
377 pinctrl-names = "default", "state_uhs";
378 pinctrl-0 = <&mmc1_pins_default>;
379 pinctrl-1 = <&mmc1_pins_uhs>;
380 vmmc-supply = <&mmc1_fixed_power>;
381 vqmmc-supply = <&mmc1_fixed_io>;
382 mmc-pwrseq = <&wifi_pwrseq>;
384 max-frequency = <200000000>;
389 keep-power-in-suspend;
395 assigned-clocks = <&topckgen CLK_TOP_MUX_MSDC30_1>;
396 assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
397 #address-cells = <1>;
400 qca_wifi: qca-wifi@1 {
401 compatible = "qcom,ath10k";
411 Avdd-supply = <&mt6358_vaud28_reg>;
415 regulator-min-microvolt = <2700000>;
416 regulator-max-microvolt = <2700000>;
420 regulator-min-microvolt = <2700000>;
421 regulator-max-microvolt = <2700000>;
425 aud_pins_default: audiopins {
427 pinmux = <PINMUX_GPIO97__FUNC_I2S2_MCK>,
428 <PINMUX_GPIO98__FUNC_I2S2_BCK>,
429 <PINMUX_GPIO101__FUNC_I2S2_LRCK>,
430 <PINMUX_GPIO102__FUNC_I2S2_DI>,
431 <PINMUX_GPIO3__FUNC_I2S3_DO>, /*i2s to da7219/max98357*/
432 <PINMUX_GPIO89__FUNC_I2S5_BCK>,
433 <PINMUX_GPIO90__FUNC_I2S5_LRCK>,
434 <PINMUX_GPIO91__FUNC_I2S5_DO>,
435 <PINMUX_GPIO174__FUNC_I2S0_DI>, /*i2s to wifi/bt*/
436 <PINMUX_GPIO136__FUNC_AUD_CLK_MOSI>,
437 <PINMUX_GPIO137__FUNC_AUD_SYNC_MOSI>,
438 <PINMUX_GPIO138__FUNC_AUD_DAT_MOSI0>,
439 <PINMUX_GPIO139__FUNC_AUD_DAT_MOSI1>,
440 <PINMUX_GPIO140__FUNC_AUD_CLK_MISO>,
441 <PINMUX_GPIO141__FUNC_AUD_SYNC_MISO>,
442 <PINMUX_GPIO142__FUNC_AUD_DAT_MISO0>,
443 <PINMUX_GPIO143__FUNC_AUD_DAT_MISO1>; /*mtkaif3.0*/
447 aud_pins_tdm_out_on: audiotdmouton {
449 pinmux = <PINMUX_GPIO169__FUNC_TDM_BCK_2ND>,
450 <PINMUX_GPIO170__FUNC_TDM_LRCK_2ND>,
451 <PINMUX_GPIO171__FUNC_TDM_DATA0_2ND>,
452 <PINMUX_GPIO172__FUNC_TDM_DATA1_2ND>,
453 <PINMUX_GPIO173__FUNC_TDM_DATA2_2ND>,
454 <PINMUX_GPIO10__FUNC_TDM_DATA3>; /*8ch-i2s to it6505*/
455 drive-strength = <MTK_DRIVE_6mA>;
459 aud_pins_tdm_out_off: audiotdmoutoff {
461 pinmux = <PINMUX_GPIO169__FUNC_GPIO169>,
462 <PINMUX_GPIO170__FUNC_GPIO170>,
463 <PINMUX_GPIO171__FUNC_GPIO171>,
464 <PINMUX_GPIO172__FUNC_GPIO172>,
465 <PINMUX_GPIO173__FUNC_GPIO173>,
466 <PINMUX_GPIO10__FUNC_GPIO10>;
469 drive-strength = <MTK_DRIVE_2mA>;
475 pinmux = <PINMUX_GPIO120__FUNC_GPIO120>;
480 ec_ap_int_odl: ec_ap_int_odl {
482 pinmux = <PINMUX_GPIO151__FUNC_GPIO151>;
488 h1_int_od_l: h1_int_od_l {
490 pinmux = <PINMUX_GPIO153__FUNC_GPIO153>;
497 pinmux = <PINMUX_GPIO82__FUNC_SDA0>,
498 <PINMUX_GPIO83__FUNC_SCL0>;
499 mediatek,pull-up-adv = <3>;
500 mediatek,drive-strength-adv = <00>;
506 pinmux = <PINMUX_GPIO81__FUNC_SDA1>,
507 <PINMUX_GPIO84__FUNC_SCL1>;
508 mediatek,pull-up-adv = <3>;
509 mediatek,drive-strength-adv = <00>;
515 pinmux = <PINMUX_GPIO103__FUNC_SCL2>,
516 <PINMUX_GPIO104__FUNC_SDA2>;
518 mediatek,drive-strength-adv = <00>;
524 pinmux = <PINMUX_GPIO50__FUNC_SCL3>,
525 <PINMUX_GPIO51__FUNC_SDA3>;
526 mediatek,pull-up-adv = <3>;
527 mediatek,drive-strength-adv = <00>;
533 pinmux = <PINMUX_GPIO105__FUNC_SCL4>,
534 <PINMUX_GPIO106__FUNC_SDA4>;
536 mediatek,drive-strength-adv = <00>;
542 pinmux = <PINMUX_GPIO48__FUNC_SCL5>,
543 <PINMUX_GPIO49__FUNC_SDA5>;
544 mediatek,pull-up-adv = <3>;
545 mediatek,drive-strength-adv = <00>;
551 pinmux = <PINMUX_GPIO11__FUNC_SCL6>,
552 <PINMUX_GPIO12__FUNC_SDA6>;
557 mmc0_pins_default: mmc0-pins-default {
559 pinmux = <PINMUX_GPIO123__FUNC_MSDC0_DAT0>,
560 <PINMUX_GPIO128__FUNC_MSDC0_DAT1>,
561 <PINMUX_GPIO125__FUNC_MSDC0_DAT2>,
562 <PINMUX_GPIO132__FUNC_MSDC0_DAT3>,
563 <PINMUX_GPIO126__FUNC_MSDC0_DAT4>,
564 <PINMUX_GPIO129__FUNC_MSDC0_DAT5>,
565 <PINMUX_GPIO127__FUNC_MSDC0_DAT6>,
566 <PINMUX_GPIO130__FUNC_MSDC0_DAT7>,
567 <PINMUX_GPIO122__FUNC_MSDC0_CMD>;
569 drive-strength = <MTK_DRIVE_14mA>;
570 mediatek,pull-up-adv = <01>;
574 pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
575 drive-strength = <MTK_DRIVE_14mA>;
576 mediatek,pull-down-adv = <10>;
580 pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
581 drive-strength = <MTK_DRIVE_14mA>;
582 mediatek,pull-down-adv = <01>;
586 mmc0_pins_uhs: mmc0-pins-uhs {
588 pinmux = <PINMUX_GPIO123__FUNC_MSDC0_DAT0>,
589 <PINMUX_GPIO128__FUNC_MSDC0_DAT1>,
590 <PINMUX_GPIO125__FUNC_MSDC0_DAT2>,
591 <PINMUX_GPIO132__FUNC_MSDC0_DAT3>,
592 <PINMUX_GPIO126__FUNC_MSDC0_DAT4>,
593 <PINMUX_GPIO129__FUNC_MSDC0_DAT5>,
594 <PINMUX_GPIO127__FUNC_MSDC0_DAT6>,
595 <PINMUX_GPIO130__FUNC_MSDC0_DAT7>,
596 <PINMUX_GPIO122__FUNC_MSDC0_CMD>;
598 drive-strength = <MTK_DRIVE_14mA>;
599 mediatek,pull-up-adv = <01>;
603 pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
604 drive-strength = <MTK_DRIVE_14mA>;
605 mediatek,pull-down-adv = <10>;
609 pinmux = <PINMUX_GPIO131__FUNC_MSDC0_DSL>;
610 drive-strength = <MTK_DRIVE_14mA>;
611 mediatek,pull-down-adv = <10>;
615 pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
616 drive-strength = <MTK_DRIVE_14mA>;
617 mediatek,pull-up-adv = <01>;
621 mmc1_pins_default: mmc1-pins-default {
623 pinmux = <PINMUX_GPIO31__FUNC_MSDC1_CMD>,
624 <PINMUX_GPIO32__FUNC_MSDC1_DAT0>,
625 <PINMUX_GPIO34__FUNC_MSDC1_DAT1>,
626 <PINMUX_GPIO33__FUNC_MSDC1_DAT2>,
627 <PINMUX_GPIO30__FUNC_MSDC1_DAT3>;
629 mediatek,pull-up-adv = <10>;
633 pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
635 mediatek,pull-down-adv = <10>;
639 mmc1_pins_uhs: mmc1-pins-uhs {
641 pinmux = <PINMUX_GPIO31__FUNC_MSDC1_CMD>,
642 <PINMUX_GPIO32__FUNC_MSDC1_DAT0>,
643 <PINMUX_GPIO34__FUNC_MSDC1_DAT1>,
644 <PINMUX_GPIO33__FUNC_MSDC1_DAT2>,
645 <PINMUX_GPIO30__FUNC_MSDC1_DAT3>;
646 drive-strength = <MTK_DRIVE_6mA>;
648 mediatek,pull-up-adv = <10>;
652 pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
653 drive-strength = <MTK_DRIVE_8mA>;
654 mediatek,pull-down-adv = <10>;
659 panel_pins_default: panel_pins_default {
661 pinmux = <PINMUX_GPIO45__FUNC_GPIO45>;
667 pwm0_pin_default: pwm0_pin_default {
669 pinmux = <PINMUX_GPIO176__FUNC_GPIO176>;
674 pinmux = <PINMUX_GPIO43__FUNC_DISP_PWM>;
680 pinmux = <PINMUX_GPIO110__FUNC_TP_URXD1_AO>,
681 <PINMUX_GPIO112__FUNC_TP_UTXD1_AO>;
687 pinmux = <PINMUX_GPIO85__FUNC_SPI0_MI>,
688 <PINMUX_GPIO86__FUNC_GPIO86>,
689 <PINMUX_GPIO87__FUNC_SPI0_MO>,
690 <PINMUX_GPIO88__FUNC_SPI0_CLK>;
697 pinmux = <PINMUX_GPIO161__FUNC_SPI1_A_MI>,
698 <PINMUX_GPIO162__FUNC_SPI1_A_CSB>,
699 <PINMUX_GPIO163__FUNC_SPI1_A_MO>,
700 <PINMUX_GPIO164__FUNC_SPI1_A_CLK>;
707 pinmux = <PINMUX_GPIO0__FUNC_SPI2_CSB>,
708 <PINMUX_GPIO1__FUNC_SPI2_MO>,
709 <PINMUX_GPIO2__FUNC_SPI2_CLK>;
713 pinmux = <PINMUX_GPIO94__FUNC_SPI2_MI>;
714 mediatek,pull-down-adv = <00>;
720 pinmux = <PINMUX_GPIO21__FUNC_SPI3_MI>,
721 <PINMUX_GPIO22__FUNC_SPI3_CSB>,
722 <PINMUX_GPIO23__FUNC_SPI3_MO>,
723 <PINMUX_GPIO24__FUNC_SPI3_CLK>;
730 pinmux = <PINMUX_GPIO17__FUNC_SPI4_MI>,
731 <PINMUX_GPIO18__FUNC_SPI4_CSB>,
732 <PINMUX_GPIO19__FUNC_SPI4_MO>,
733 <PINMUX_GPIO20__FUNC_SPI4_CLK>;
740 pinmux = <PINMUX_GPIO13__FUNC_SPI5_MI>,
741 <PINMUX_GPIO14__FUNC_SPI5_CSB>,
742 <PINMUX_GPIO15__FUNC_SPI5_MO>,
743 <PINMUX_GPIO16__FUNC_SPI5_CLK>;
748 uart0_pins_default: uart0-pins-default {
750 pinmux = <PINMUX_GPIO95__FUNC_URXD0>;
755 pinmux = <PINMUX_GPIO96__FUNC_UTXD0>;
759 uart1_pins_default: uart1-pins-default {
761 pinmux = <PINMUX_GPIO121__FUNC_URXD1>;
766 pinmux = <PINMUX_GPIO115__FUNC_UTXD1>;
769 pinmux = <PINMUX_GPIO47__FUNC_URTS1>;
773 pinmux = <PINMUX_GPIO46__FUNC_UCTS1>;
778 uart1_pins_sleep: uart1-pins-sleep {
780 pinmux = <PINMUX_GPIO121__FUNC_GPIO121>;
785 pinmux = <PINMUX_GPIO115__FUNC_UTXD1>;
788 pinmux = <PINMUX_GPIO47__FUNC_URTS1>;
792 pinmux = <PINMUX_GPIO46__FUNC_UCTS1>;
797 wifi_pins_pwrseq: wifi-pins-pwrseq {
799 pinmux = <PINMUX_GPIO119__FUNC_GPIO119>;
804 wifi_pins_wakeup: wifi-pins-wakeup {
806 pinmux = <PINMUX_GPIO113__FUNC_GPIO113>;
814 pinctrl-names = "default";
815 pinctrl-0 = <&pwm0_pin_default>;
820 pinctrl-names = "default";
821 pinctrl-0 = <&scp_pins>;
824 compatible = "google,cros-ec-rpmsg";
825 mediatek,rpmsg-name = "cros-ec-rpmsg";
830 domain-supply = <&mt6358_vsram_gpu_reg>;
834 domain-supply = <&mt6358_vgpu_reg>;
842 pinctrl-names = "default";
843 pinctrl-0 = <&spi0_pins>;
844 mediatek,pad-select = <0>;
846 cs-gpios = <&pio 86 GPIO_ACTIVE_LOW>;
849 compatible = "google,cr50";
851 spi-max-frequency = <1000000>;
852 pinctrl-names = "default";
853 pinctrl-0 = <&h1_int_od_l>;
854 interrupt-parent = <&pio>;
855 interrupts = <153 IRQ_TYPE_EDGE_RISING>;
860 pinctrl-names = "default";
861 pinctrl-0 = <&spi1_pins>;
862 mediatek,pad-select = <0>;
866 compatible = "winbond,w25q64dw", "jedec,spi-nor";
868 spi-max-frequency = <25000000>;
873 pinctrl-names = "default";
874 pinctrl-0 = <&spi2_pins>;
875 mediatek,pad-select = <0>;
879 compatible = "google,cros-ec-spi";
881 spi-max-frequency = <3000000>;
882 interrupt-parent = <&pio>;
883 interrupts = <151 IRQ_TYPE_LEVEL_LOW>;
884 pinctrl-names = "default";
885 pinctrl-0 = <&ec_ap_int_odl>;
887 i2c_tunnel: i2c-tunnel {
888 compatible = "google,cros-ec-i2c-tunnel";
889 google,remote-bus = <1>;
890 #address-cells = <1>;
894 usbc_extcon: extcon0 {
895 compatible = "google,extcon-usbc-cros-ec";
896 google,usb-port-id = <0>;
900 compatible = "google,cros-cbas";
904 compatible = "google,cros-ec-typec";
905 #address-cells = <1>;
908 usb_c0: connector@0 {
909 compatible = "usb-c-connector";
913 try-power-role = "sink";
920 pinctrl-names = "default";
921 pinctrl-0 = <&spi3_pins>;
922 mediatek,pad-select = <0>;
927 pinctrl-names = "default";
928 pinctrl-0 = <&spi4_pins>;
929 mediatek,pad-select = <0>;
934 pinctrl-names = "default";
935 pinctrl-0 = <&spi5_pins>;
936 mediatek,pad-select = <0>;
943 vusb33-supply = <&mt6358_vusb_reg>;
949 polling-delay = <1000>; /* milliseconds */
950 polling-delay-passive = <0>; /* milliseconds */
951 thermal-sensors = <&tboard_thermistor1>;
955 polling-delay = <1000>; /* milliseconds */
956 polling-delay-passive = <0>; /* milliseconds */
957 thermal-sensors = <&tboard_thermistor2>;
966 pinctrl-names = "default";
967 pinctrl-0 = <&uart0_pins_default>;
972 pinctrl-names = "default", "sleep";
973 pinctrl-0 = <&uart1_pins_default>;
974 pinctrl-1 = <&uart1_pins_sleep>;
976 interrupts-extended = <&sysirq GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>,
977 <&pio 121 IRQ_TYPE_EDGE_FALLING>;
979 bluetooth: bluetooth {
980 pinctrl-names = "default";
981 pinctrl-0 = <&bt_pins>;
983 compatible = "qcom,qca6174-bt";
984 enable-gpios = <&pio 120 0>;
986 firmware-name = "nvm_00440302_i2s.bin";
991 #address-cells = <1>;
993 vusb33-supply = <&mt6358_vusb_reg>;
997 compatible = "usb5e3,610";
1002 #include <arm/cros-ec-keyboard.dtsi>
1003 #include <arm/cros-ec-sbs.dtsi>