// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2024 Rockchip Electronics Co., Ltd. * */ #include #include "rk3576-evb.dtsi" #include "rk3576-rk806.dtsi" /delete-node/ &leds; /delete-node/ >1x; / { es8388_sound: es8388-sound { status = "okay"; compatible = "rockchip,multicodecs-card"; rockchip,card-name = "rockchip-es8388"; hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; io-channels = <&saradc 3>; io-channel-names = "adc-detect"; keyup-threshold-microvolt = <1800000>; poll-interval = <100>; hp-con-gpio = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>; rockchip,pre-power-on-delay-ms = <30>; rockchip,post-power-down-delay-ms = <40>; rockchip,format = "i2s"; rockchip,mclk-fs = <256>; rockchip,cpu = <&sai1>; rockchip,codec = <&es8388>; rockchip,audio-routing = "Headphone", "LOUT1", "Headphone", "ROUT1", "Speaker", "LOUT2", "Speaker", "ROUT2", "Headphone", "Headphone Power", "Headphone", "Headphone Power", "Speaker", "Speaker Power", "Speaker", "Speaker Power", "LINPUT1", "Main Mic", "LINPUT2", "Main Mic", "RINPUT1", "Headset Mic", "RINPUT2", "Headset Mic"; pinctrl-names = "default"; pinctrl-0 = <&hp_det>; play-pause-key { label = "playpause"; linux,code = ; press-threshold-microvolt = <2000>; }; }; pwm_beeper: pwm-beeper { status = "okay"; compatible = "pwm-beeper"; pwms = <&pwm2_8ch_6 0 5000 0>; }; pwm_leds: pwm-leds { status = "okay"; compatible = "pwm-leds"; r_led: r-led { label = "LED-RED"; pwms = <&pwm1_6ch_0 0 5000 0>; max-brightness = <255>; default-state = "off"; }; g_led: g-led { label = "LED-GREEN"; pwms = <&pwm1_6ch_1 0 5000 0>; max-brightness = <255>; default-state = "off"; }; b_led: b-led { label = "LED-BLUE"; pwms = <&pwm1_6ch_5 0 5000 0>; max-brightness = <255>; default-state = "on"; linux,default-trigger = "heartbeat"; }; }; sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; pinctrl-0 = <&wifi_poweren_gpio>; /* * On the module itself this is one of these (depending * on the actual card populated): * - SDIO_RESET_L_WL_REG_ON * - PDN (power down when low) */ post-power-on-delay-ms = <200>; reset-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; }; spdif_tx0_dc: spdif-tx0-dc { status = "okay"; compatible = "linux,spdif-dit"; #sound-dai-cells = <0>; }; spdif_tx0_sound: spdif-tx0-sound { status = "okay"; compatible = "simple-audio-card"; simple-audio-card,mclk-fs = <128>; simple-audio-card,name = "rockchip,spdif-tx0"; simple-audio-card,cpu { sound-dai = <&spdif_tx0>; }; simple-audio-card,codec { sound-dai = <&spdif_tx0_dc>; }; }; vcc_1v8_s0: vcc-1v8-s0 { compatible = "regulator-fixed"; regulator-name = "vcc_1v8_s0"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; vin-supply = <&vcc_1v8_s3>; }; vcc_3v3_s0: vcc-3v3-s0 { compatible = "regulator-fixed"; regulator-name = "vcc_3v3_s0"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; vin-supply = <&vcc_3v3_s3>; }; vcc_ufs_s0: vcc-ufs-s0 { compatible = "regulator-fixed"; regulator-name = "vcc_ufs_s0"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; vin-supply = <&vcc_sys>; }; vcc1v8_ufs_vccq2_s0: vcc1v8-ufs-vccq2-s0 { compatible = "regulator-fixed"; regulator-name = "vcc1v8_ufs_vccq2_s0"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; vin-supply = <&vcc_1v8_s3>; }; vcc1v2_ufs_vccq_s0: vcc1v2-ufs-vccq-s0 { compatible = "regulator-fixed"; regulator-name = "vcc1v2_ufs_vccq_s0"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; vin-supply = <&vcc_sys>; }; vcc3v3_lcd_n: vcc3v3-lcd0-n { compatible = "regulator-fixed"; regulator-name = "vcc3v3_lcd0_n"; regulator-boot-on; enable-active-high; gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc_3v3_s0>; }; vcc3v3_image_pwren: image-pwren { compatible = "regulator-fixed"; regulator-name = "vcc3v3_image_pwren"; enable-active-high; regulator-boot-on; regulator-always-on; gpio = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_device>; pinctrl-names = "default"; pinctrl-0 = <&image_pwren_gpio>; }; vcc3v3_hubreset: vcc3v3-hubreset { compatible = "regulator-fixed"; regulator-name = "vcc3v3_hubreset"; enable-active-high; regulator-boot-on; regulator-always-on; gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_device>; pinctrl-names = "default"; pinctrl-0 = <&usb_hub_reset>; }; vcc3v3_pcie1: vcc3v3-pcie1 { compatible = "regulator-fixed"; regulator-name = "vcc3v3_pcie1"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; enable-active-high; gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; startup-delay-us = <5000>; vin-supply = <&vcc12v_dcin>; pinctrl-names = "default"; pinctrl-0 = <&pcie_pwr_en>; }; vcc5v0_host: vcc5v0-host { compatible = "regulator-fixed"; regulator-name = "vcc5v0_host"; regulator-boot-on; regulator-always-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_device>; pinctrl-names = "default"; pinctrl-0 = <&usb_host_pwren>; }; vcc5v0_otg: vcc5v0-otg { compatible = "regulator-fixed"; regulator-name = "vcc5v0_otg"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; gpio = <&gpio0 RK_PD1 GPIO_ACTIVE_HIGH>; vin-supply = <&vcc5v0_device>; pinctrl-names = "default"; pinctrl-0 = <&usb_otg0_pwren>; }; }; &backlight { status = "disabled"; }; &combphy0_ps { status = "okay"; }; &combphy1_psu { status = "okay"; }; &dp { pinctrl-0 = <&dpm0_pins>; pinctrl-names = "default"; status = "okay"; }; &dp0 { status = "okay"; }; &dp0_sound { status = "okay"; }; &dp0_in_vp1 { status = "okay"; }; &gmac0 { /* Use rgmii-rxid mode to disable rx delay inside Soc */ phy-mode = "rgmii-rxid"; clock_in_out = "output"; snps,reset-gpio = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>; snps,reset-active-low; /* Reset time is 20ms, 100ms for rtl8211f */ snps,reset-delays-us = <0 20000 100000>; pinctrl-names = "default"; pinctrl-0 = <ð0m1_miim ð0m1_tx_bus2 ð0m1_rx_bus2 ð0m1_rgmii_clk ð0m1_rgmii_bus>; tx_delay = <0x1d>; /* rx_delay = <0x3f>; */ phy-handle = <&rgmii_phy0>; status = "okay"; }; &gmac1 { /* Use rgmii-rxid mode to disable rx delay inside Soc */ phy-mode = "rgmii-rxid"; clock_in_out = "output"; snps,reset-gpio = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>; snps,reset-active-low; /* Reset time is 20ms, 100ms for rtl8211f */ snps,reset-delays-us = <0 20000 100000>; pinctrl-names = "default"; pinctrl-0 = <ð1m0_miim ð1m0_tx_bus2 ð1m0_rx_bus2 ð1m0_rgmii_clk ð1m0_rgmii_bus>; tx_delay = <0x1e>; /* rx_delay = <0x3f>; */ phy-handle = <&rgmii_phy1>; status = "okay"; }; &hdmi { enable-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; status = "okay"; }; &hdmi_in_vp0 { status = "okay"; }; &hdmi_sound { status = "okay"; }; &hdptxphy_hdmi { status = "okay"; }; &i2c0 { status = "disabled"; }; &i2c2 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c2m0_xfer>; hym8563: hym8563@51 { compatible = "haoyu,hym8563"; reg = <0x51>; pinctrl-names = "default"; pinctrl-0 = <&rtc_int>; interrupt-parent = <&gpio0>; interrupts = ; wakeup-source; }; }; &i2c3 { status = "okay"; es8388: es8388@10 { status = "okay"; #sound-dai-cells = <0>; compatible = "everest,es8388", "everest,es8323"; reg = <0x10>; clocks = <&mclkout_sai1>; clock-names = "mclk"; assigned-clocks = <&mclkout_sai1>; assigned-clock-rates = <12288000>; pinctrl-names = "default"; pinctrl-0 = <&sai1m0_mclk>; }; }; &mdio0 { rgmii_phy0: phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1>; }; }; &mdio1 { rgmii_phy1: phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x1>; }; }; &pcie1 { pinctrl-names = "default"; pinctrl-0 = <&pcie_reset_gpio>; reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc3v3_pcie1>; status = "disabled"; }; &pwm1_6ch_0 { status = "okay"; }; &pwm1_6ch_1 { status = "okay"; }; &pwm1_6ch_5 { status = "okay"; }; &pwm2_8ch_6 { status = "okay"; }; &route_hdmi { status = "okay"; connect = <&vp0_out_hdmi>; }; &sai1 { status = "okay"; rockchip,sai-rx-route = <1 0 2 3>; rockchip,sai-tx-route = <1 0 2 3>; pinctrl-names = "default"; pinctrl-0 = <&sai1m0_lrck &sai1m0_sclk &sai1m0_sdi1 &sai1m0_sdo1>; }; &sai6 { status = "okay"; }; &sata0 { status = "okay"; pinctrl-0 = <&satapm_pwren>; pinctrl-names = "default"; }; &sdio { max-frequency = <150000000>; no-sd; no-mmc; bus-width = <4>; disable-wp; cap-sd-highspeed; cap-sdio-irq; keep-power-in-suspend; mmc-pwrseq = <&sdio_pwrseq>; non-removable; pinctrl-names = "default"; pinctrl-0 = <&sdmmc1m0_bus4 &sdmmc1m0_clk &sdmmc1m0_cmd>; sd-uhs-sdr104; status = "okay"; }; &sdmmc { status = "okay"; }; &spdif_tx0 { status = "okay"; pinctrl-0 = <&spdifm1_tx0>; }; &spdif_tx3 { status = "okay"; }; &ufs { vcc-supply = <&vcc_ufs_s0>; vccq-supply = <&vcc1v2_ufs_vccq_s0>; vccq2-supply = <&vcc1v8_ufs_vccq2_s0>; }; &u2phy0_otg { vbus-supply = <&vcc5v0_otg>; status = "okay"; }; &u2phy1_otg { phy-supply = <&vcc5v0_host>; status = "okay"; }; &usbdp_phy { rockchip,dp-lane-mux = <2 3>; status = "okay"; }; &usbdp_phy_dp { status = "okay"; }; &usbdp_phy_u3 { status = "okay"; }; &usb_drd0_dwc3 { dr_mode = "otg"; extcon = <&u2phy0>; status = "okay"; }; &usb_drd1_dwc3 { dr_mode = "host"; status = "okay"; }; &vp0 { status = "okay"; }; &pinctrl { /delete-node/ touch-gpio; headphone { hp_det: hp-det { rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; image { image_pwren_gpio: image-pwren-gpio { rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; }; }; pcie { pcie_reset_gpio: pcie-reset-gpio { rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; }; pcie_pwr_en: pcie-pwr-en { rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; rtc { rtc_int: rtc-int { rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; sata { satapm_pwren: satapm-pwren { rockchip,pins = <4 RK_PC7 RK_FUNC_GPIO &pcfg_output_high>; }; }; usb { usb_host_pwren: usb-host-pwren { rockchip,pins = <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; }; usb_hub_reset: usb-hub-reset { rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; }; usb_otg0_pwren: usb-otg0-pwren { rockchip,pins = <0 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; }; }; wireless-bluetooth { uart4_gpios: uart4-gpios { rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; wireless-wlan { wifi_host_wake_irq: wifi-host-wake-irq { rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>; }; wifi_poweren_gpio: wifi-poweren-gpio { rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; }; }; }; &wireless_wlan { wifi_chip_type = "ap6398s"; status = "okay"; };