// SPDX-License-Identifier: (GPL-2.0 OR MIT) /* * Copyright (c) 2018 MediaTek Inc. * Author: Ben Ho * Erin Lo */ #include #include #include "mt8183.dtsi" #include "mt6358.dtsi" / { aliases { serial0 = &uart0; mmc0 = &mmc0; mmc1 = &mmc1; }; chosen { stdout-path = "serial0:115200n8"; }; backlight_lcd0: backlight_lcd0 { compatible = "pwm-backlight"; pwms = <&pwm0 0 500000>; power-supply = <&bl_pp5000>; enable-gpios = <&pio 176 0>; brightness-levels = <0 1023>; num-interpolated-steps = <1023>; default-brightness-level = <576>; status = "okay"; }; memory@40000000 { device_type = "memory"; reg = <0 0x40000000 0 0x80000000>; }; clk32k: oscillator1 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <32768>; clock-output-names = "clk32k"; }; it6505_pp18_reg: regulator0 { compatible = "regulator-fixed"; regulator-name = "it6505_pp18"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; gpio = <&pio 178 0>; enable-active-high; }; lcd_pp3300: regulator1 { compatible = "regulator-fixed"; regulator-name = "lcd_pp3300"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; regulator-boot-on; }; bl_pp5000: regulator2 { compatible = "regulator-fixed"; regulator-name = "bl_pp5000"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; regulator-boot-on; }; mmc1_fixed_power: regulator3 { compatible = "regulator-fixed"; regulator-name = "mmc1_power"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; mmc1_fixed_io: regulator4 { compatible = "regulator-fixed"; regulator-name = "mmc1_io"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; pp1800_alw: regulator5 { compatible = "regulator-fixed"; regulator-name = "pp1800_alw"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; pp3300_alw: regulator6 { compatible = "regulator-fixed"; regulator-name = "pp3300_alw"; regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; /* system wide semi-regulated power rail from charger */ reg_vsys: regulator-vsys { compatible = "regulator-fixed"; regulator-name = "vsys"; regulator-always-on; regulator-boot-on; }; reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; scp_mem_reserved: memory@50000000 { compatible = "shared-dma-pool"; reg = <0 0x50000000 0 0x2900000>; no-map; }; }; sound: mt8183-sound { mediatek,platform = <&afe>; pinctrl-names = "default", "aud_tdm_out_on", "aud_tdm_out_off"; pinctrl-0 = <&aud_pins_default>; pinctrl-1 = <&aud_pins_tdm_out_on>; pinctrl-2 = <&aud_pins_tdm_out_off>; status = "okay"; }; btsco: bt-sco { compatible = "linux,bt-sco"; }; wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; pinctrl-0 = <&wifi_pins_pwrseq>; /* Toggle WIFI_ENABLE to reset the chip. */ reset-gpios = <&pio 119 1>; }; wifi_wakeup: wifi-wakeup { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&wifi_pins_wakeup>; button-wowlan { label = "Wake on WiFi"; gpios = <&pio 113 GPIO_ACTIVE_HIGH>; linux,code = ; wakeup-source; }; }; tboard_thermistor1: thermal-sensor1 { compatible = "generic-adc-thermal"; #thermal-sensor-cells = <0>; io-channels = <&auxadc 0>; io-channel-names = "sensor-channel"; temperature-lookup-table = < (-5000) 1553 0 1488 5000 1412 10000 1326 15000 1232 20000 1132 25000 1029 30000 925 35000 823 40000 726 45000 635 50000 552 55000 478 60000 411 65000 353 70000 303 75000 260 80000 222 85000 190 90000 163 95000 140 100000 121 105000 104 110000 90 115000 78 120000 67 125000 59>; }; tboard_thermistor2: thermal-sensor2 { compatible = "generic-adc-thermal"; #thermal-sensor-cells = <0>; io-channels = <&auxadc 1>; io-channel-names = "sensor-channel"; temperature-lookup-table = < (-5000) 1553 0 1488 5000 1412 10000 1326 15000 1232 20000 1132 25000 1029 30000 925 35000 823 40000 726 45000 635 50000 552 55000 478 60000 411 65000 353 70000 303 75000 260 80000 222 85000 190 90000 163 95000 140 100000 121 105000 104 110000 90 115000 78 120000 67 125000 59>; }; }; &auxadc { status = "okay"; }; &cci { proc-supply = <&mt6358_vproc12_reg>; }; &cpu0 { proc-supply = <&mt6358_vproc12_reg>; }; &cpu1 { proc-supply = <&mt6358_vproc12_reg>; }; &cpu2 { proc-supply = <&mt6358_vproc12_reg>; }; &cpu3 { proc-supply = <&mt6358_vproc12_reg>; }; &cpu4 { proc-supply = <&mt6358_vproc11_reg>; }; &cpu5 { proc-supply = <&mt6358_vproc11_reg>; }; &cpu6 { proc-supply = <&mt6358_vproc11_reg>; }; &cpu7 { proc-supply = <&mt6358_vproc11_reg>; }; &dsi0 { status = "okay"; #address-cells = <1>; #size-cells = <0>; panel: panel@0 { /* compatible will be set in board dts */ reg = <0>; enable-gpios = <&pio 45 0>; pinctrl-names = "default"; pinctrl-0 = <&panel_pins_default>; avdd-supply = <&ppvarn_lcd>; avee-supply = <&ppvarp_lcd>; pp1800-supply = <&pp1800_lcd>; backlight = <&backlight_lcd0>; rotation = <270>; port { panel_in: endpoint { remote-endpoint = <&dsi_out>; }; }; }; ports { port { dsi_out: endpoint { remote-endpoint = <&panel_in>; }; }; }; }; &gic { mediatek,broken-save-restore-fw; }; &gpu { mali-supply = <&mt6358_vgpu_reg>; }; &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; clock-frequency = <400000>; #address-cells = <1>; #size-cells = <0>; }; &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; status = "okay"; clock-frequency = <100000>; }; &i2c3 { pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins>; status = "okay"; clock-frequency = <100000>; #address-cells = <1>; #size-cells = <0>; }; &i2c5 { pinctrl-names = "default"; pinctrl-0 = <&i2c5_pins>; status = "okay"; clock-frequency = <100000>; #address-cells = <1>; #size-cells = <0>; }; &i2c6 { pinctrl-names = "default"; pinctrl-0 = <&i2c6_pins>; status = "okay"; clock-frequency = <100000>; }; &mipi_tx0 { status = "okay"; }; &mmc0 { status = "okay"; pinctrl-names = "default", "state_uhs"; pinctrl-0 = <&mmc0_pins_default>; pinctrl-1 = <&mmc0_pins_uhs>; bus-width = <8>; max-frequency = <200000000>; cap-mmc-highspeed; mmc-hs200-1_8v; mmc-hs400-1_8v; cap-mmc-hw-reset; no-sdio; no-sd; hs400-ds-delay = <0x12814>; vmmc-supply = <&mt6358_vemc_reg>; vqmmc-supply = <&mt6358_vio18_reg>; assigned-clocks = <&topckgen CLK_TOP_MUX_MSDC50_0>; assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_CK>; non-removable; }; &mmc1 { status = "okay"; pinctrl-names = "default", "state_uhs"; pinctrl-0 = <&mmc1_pins_default>; pinctrl-1 = <&mmc1_pins_uhs>; vmmc-supply = <&mmc1_fixed_power>; vqmmc-supply = <&mmc1_fixed_io>; mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; max-frequency = <200000000>; cap-sd-highspeed; sd-uhs-sdr50; sd-uhs-sdr104; keep-power-in-suspend; wakeup-source; cap-sdio-irq; non-removable; no-mmc; no-sd; assigned-clocks = <&topckgen CLK_TOP_MUX_MSDC30_1>; assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>; #address-cells = <1>; #size-cells = <0>; qca_wifi: qca-wifi@1 { compatible = "qcom,ath10k"; reg = <1>; }; }; &mt6358_vdram2_reg { regulator-always-on; }; &mt6358codec { Avdd-supply = <&mt6358_vaud28_reg>; }; &mt6358regulator { vsys-ldo1-supply = <®_vsys>; vsys-ldo2-supply = <®_vsys>; vsys-ldo3-supply = <®_vsys>; vsys-vcore-supply = <®_vsys>; vsys-vdram1-supply = <®_vsys>; vsys-vgpu-supply = <®_vsys>; vsys-vmodem-supply = <®_vsys>; vsys-vpa-supply = <®_vsys>; vsys-vproc11-supply = <®_vsys>; vsys-vproc12-supply = <®_vsys>; vsys-vs1-supply = <®_vsys>; vsys-vs2-supply = <®_vsys>; vs1-ldo1-supply = <&mt6358_vs1_reg>; vs2-ldo1-supply = <&mt6358_vdram1_reg>; vs2-ldo2-supply = <&mt6358_vs2_reg>; vs2-ldo3-supply = <&mt6358_vs2_reg>; vs2-ldo4-supply = <&mt6358_vs2_reg>; }; &mt6358_vgpu_reg { regulator-min-microvolt = <625000>; regulator-max-microvolt = <900000>; regulator-coupled-with = <&mt6358_vsram_gpu_reg>; regulator-coupled-max-spread = <100000>; }; &mt6358_vsim1_reg { regulator-min-microvolt = <2700000>; regulator-max-microvolt = <2700000>; }; &mt6358_vsim2_reg { regulator-min-microvolt = <2700000>; regulator-max-microvolt = <2700000>; }; &mt6358_vsram_gpu_reg { regulator-min-microvolt = <850000>; regulator-max-microvolt = <1000000>; regulator-coupled-with = <&mt6358_vgpu_reg>; regulator-coupled-max-spread = <100000>; }; &pio { aud_pins_default: audiopins { pins-bus { pinmux = , , , , , /*i2s to da7219/max98357*/ , , , , /*i2s to wifi/bt*/ , , , , , , , ; /*mtkaif3.0*/ }; }; aud_pins_tdm_out_on: audiotdmouton { pins-bus { pinmux = , , , , , ; /*8ch-i2s to it6505*/ drive-strength = ; }; }; aud_pins_tdm_out_off: audiotdmoutoff { pins-bus { pinmux = , , , , , ; input-enable; bias-pull-down; drive-strength = ; }; }; bt_pins: bt-pins { pins-bt-en { pinmux = ; output-low; }; }; ec_ap_int_odl: ec-ap-int-odl { pins1 { pinmux = ; input-enable; bias-pull-up; }; }; h1_int_od_l: h1-int-od-l { pins1 { pinmux = ; input-enable; }; }; i2c0_pins: i2c0 { pins-bus { pinmux = , ; mediatek,pull-up-adv = <3>; mediatek,drive-strength-adv = <00>; }; }; i2c1_pins: i2c1 { pins-bus { pinmux = , ; mediatek,pull-up-adv = <3>; mediatek,drive-strength-adv = <00>; }; }; i2c2_pins: i2c2 { pins-bus { pinmux = , ; bias-disable; mediatek,drive-strength-adv = <00>; }; }; i2c3_pins: i2c3 { pins-bus { pinmux = , ; mediatek,pull-up-adv = <3>; mediatek,drive-strength-adv = <00>; }; }; i2c4_pins: i2c4 { pins-bus { pinmux = , ; bias-disable; mediatek,drive-strength-adv = <00>; }; }; i2c5_pins: i2c5 { pins-bus { pinmux = , ; mediatek,pull-up-adv = <3>; mediatek,drive-strength-adv = <00>; }; }; i2c6_pins: i2c6 { pins-bus { pinmux = , ; bias-disable; }; }; mmc0_pins_default: mmc0-pins-default { pins-cmd-dat { pinmux = , , , , , , , , ; input-enable; drive-strength = ; mediatek,pull-up-adv = <01>; }; pins-clk { pinmux = ; drive-strength = ; mediatek,pull-down-adv = <10>; }; pins-rst { pinmux = ; drive-strength = ; mediatek,pull-down-adv = <01>; }; }; mmc0_pins_uhs: mmc0-pins-uhs { pins-cmd-dat { pinmux = , , , , , , , , ; input-enable; drive-strength = ; mediatek,pull-up-adv = <01>; }; pins-clk { pinmux = ; drive-strength = ; mediatek,pull-down-adv = <10>; }; pins-ds { pinmux = ; drive-strength = ; mediatek,pull-down-adv = <10>; }; pins-rst { pinmux = ; drive-strength = ; mediatek,pull-up-adv = <01>; }; }; mmc1_pins_default: mmc1-pins-default { pins-cmd-dat { pinmux = , , , , ; input-enable; mediatek,pull-up-adv = <10>; }; pins-clk { pinmux = ; input-enable; mediatek,pull-down-adv = <10>; }; }; mmc1_pins_uhs: mmc1-pins-uhs { pins-cmd-dat { pinmux = , , , , ; drive-strength = ; input-enable; mediatek,pull-up-adv = <10>; }; pins-clk { pinmux = ; drive-strength = ; mediatek,pull-down-adv = <10>; input-enable; }; }; panel_pins_default: panel-pins-default { panel-reset { pinmux = ; output-low; bias-pull-up; }; }; pwm0_pin_default: pwm0-pin-default { pins1 { pinmux = ; output-high; bias-pull-up; }; pins2 { pinmux = ; }; }; scp_pins: scp { pins-scp-uart { pinmux = , ; }; }; spi0_pins: spi0 { pins-spi { pinmux = , , , ; bias-disable; }; }; spi1_pins: spi1 { pins-spi { pinmux = , , , ; bias-disable; }; }; spi2_pins: spi2 { pins-spi { pinmux = , , ; bias-disable; }; pins-spi-mi { pinmux = ; mediatek,pull-down-adv = <00>; }; }; spi3_pins: spi3 { pins-spi { pinmux = , , , ; bias-disable; }; }; spi4_pins: spi4 { pins-spi { pinmux = , , , ; bias-disable; }; }; spi5_pins: spi5 { pins-spi { pinmux = , , , ; bias-disable; }; }; uart0_pins_default: uart0-pins-default { pins-rx { pinmux = ; input-enable; bias-pull-up; }; pins-tx { pinmux = ; }; }; uart1_pins_default: uart1-pins-default { pins-rx { pinmux = ; input-enable; bias-pull-up; }; pins-tx { pinmux = ; }; pins-rts { pinmux = ; output-enable; }; pins-cts { pinmux = ; input-enable; }; }; uart1_pins_sleep: uart1-pins-sleep { pins-rx { pinmux = ; input-enable; bias-pull-up; }; pins-tx { pinmux = ; }; pins-rts { pinmux = ; output-enable; }; pins-cts { pinmux = ; input-enable; }; }; wifi_pins_pwrseq: wifi-pins-pwrseq { pins-wifi-enable { pinmux = ; output-low; }; }; wifi_pins_wakeup: wifi-pins-wakeup { pins-wifi-wakeup { pinmux = ; input-enable; }; }; }; &pmic { interrupts-extended = <&pio 182 IRQ_TYPE_LEVEL_HIGH>; }; &pwm0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pwm0_pin_default>; }; &scp { status = "okay"; firmware-name = "mediatek/mt8183/scp.img"; pinctrl-names = "default"; pinctrl-0 = <&scp_pins>; cros-ec-rpmsg { compatible = "google,cros-ec-rpmsg"; mediatek,rpmsg-name = "cros-ec-rpmsg"; }; }; &mfg_async { domain-supply = <&mt6358_vsram_gpu_reg>; }; &mfg { domain-supply = <&mt6358_vgpu_reg>; }; &soc_data { status = "okay"; }; &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; mediatek,pad-select = <0>; status = "okay"; cs-gpios = <&pio 86 GPIO_ACTIVE_LOW>; tpm@0 { compatible = "google,cr50"; reg = <0>; spi-max-frequency = <1000000>; pinctrl-names = "default"; pinctrl-0 = <&h1_int_od_l>; interrupts-extended = <&pio 153 IRQ_TYPE_EDGE_RISING>; }; }; &spi1 { pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; mediatek,pad-select = <0>; status = "okay"; w25q64dw: flash@0 { compatible = "winbond,w25q64dw", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <25000000>; }; }; &spi2 { pinctrl-names = "default"; pinctrl-0 = <&spi2_pins>; mediatek,pad-select = <0>; status = "okay"; cros_ec: cros-ec@0 { compatible = "google,cros-ec-spi"; reg = <0>; spi-max-frequency = <3000000>; interrupts-extended = <&pio 151 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&ec_ap_int_odl>; i2c_tunnel: i2c-tunnel { compatible = "google,cros-ec-i2c-tunnel"; google,remote-bus = <1>; #address-cells = <1>; #size-cells = <0>; }; usbc_extcon: extcon0 { compatible = "google,extcon-usbc-cros-ec"; google,usb-port-id = <0>; }; cbas { compatible = "google,cros-cbas"; }; typec { compatible = "google,cros-ec-typec"; #address-cells = <1>; #size-cells = <0>; usb_c0: connector@0 { compatible = "usb-c-connector"; reg = <0>; power-role = "dual"; data-role = "host"; try-power-role = "sink"; }; }; }; }; &spi3 { pinctrl-names = "default"; pinctrl-0 = <&spi3_pins>; mediatek,pad-select = <0>; status = "disabled"; }; &spi4 { pinctrl-names = "default"; pinctrl-0 = <&spi4_pins>; mediatek,pad-select = <0>; status = "disabled"; }; &spi5 { pinctrl-names = "default"; pinctrl-0 = <&spi5_pins>; mediatek,pad-select = <0>; status = "disabled"; }; &ssusb { dr_mode = "host"; wakeup-source; vusb33-supply = <&mt6358_vusb_reg>; status = "okay"; }; &thermal_zones { tboard1 { polling-delay = <1000>; /* milliseconds */ polling-delay-passive = <0>; /* milliseconds */ thermal-sensors = <&tboard_thermistor1>; }; tboard2 { polling-delay = <1000>; /* milliseconds */ polling-delay-passive = <0>; /* milliseconds */ thermal-sensors = <&tboard_thermistor2>; }; }; &u3phy { status = "okay"; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_default>; status = "okay"; }; &uart1 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart1_pins_default>; pinctrl-1 = <&uart1_pins_sleep>; status = "okay"; /delete-property/ interrupts; interrupts-extended = <&sysirq GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>, <&pio 121 IRQ_TYPE_EDGE_FALLING>; bluetooth: bluetooth { pinctrl-names = "default"; pinctrl-0 = <&bt_pins>; status = "okay"; compatible = "qcom,qca6174-bt"; enable-gpios = <&pio 120 0>; clocks = <&clk32k>; firmware-name = "nvm_00440302_i2s.bin"; }; }; &usb_host { #address-cells = <1>; #size-cells = <0>; vusb33-supply = <&mt6358_vusb_reg>; status = "okay"; hub@1 { compatible = "usb5e3,610"; reg = <1>; }; }; #include