--- /dev/null
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2024 Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+#include <dt-bindings/display/drm_mipi_dsi.h>
+#include <dt-bindings/input/rk-input.h>
+#include <dt-bindings/suspend/rockchip-rk3506.h>
+#include "rk3506.dtsi"
+
+/ {
+ model = "Rockchip RK3506 IDO EVB3506 V10 Board";
+ compatible = "rockchip,ido-evb3506-v10", "rockchip,rk3506";
+
+
+ chosen {
+ bootargs = "earlycon=uart8250,mmio32,0xff0a0000 console=ttyFIQ0 ubi.mtd=5 root=ubi0:rootfs rw rootfstype=ubifs rootwait snd_aloop.index=7 snd_aloop.use_raw_jiffies=1";
+ };
+
+ vcc3v3_lcd_n: vcc3v3-lcd0-n {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ //gpio = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_lcd_n";
+ regulator-boot-on;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc5v0_otg0: vcc5v0-otg0-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_otg0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ //gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&vcc5v0_otg0_en>;
+ };
+
+ vcc5v0_otg1: vcc5v0-otg1-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_otg1";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ //gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&vcc5v0_otg1_en>;
+ };
+
+ acodec_sound: acodec-sound {
+ status = "okay";
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "rockchip,acodec";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <1024>;
+ simple-audio-card,bitclock-master = <&codec_master>;
+ simple-audio-card,frame-master = <&codec_master>;
+ simple-audio-card,cpu {
+ sound-dai = <&sai4>;
+ };
+ codec_master: simple-audio-card,codec {
+ sound-dai = <&audio_codec>;
+ };
+ };
+
+ adc_keys: adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 1>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ vol-up-key {
+ label = "volume up";
+ linux,code = <KEY_VOLUMEUP>;
+ press-threshold-microvolt = <16000>;
+ };
+
+ vol-down-key {
+ label = "volume down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ press-threshold-microvolt = <420000>;
+ };
+
+ menu-key {
+ label = "menu";
+ linux,code = <KEY_MENU>;
+ press-threshold-microvolt = <800000>;
+ };
+
+ esc-key {
+ label = "esc";
+ linux,code = <KEY_ESC>;
+ press-threshold-microvolt = <1200000>;
+ };
+ };
+
+ dsm_sound: dsm-sound {
+ status = "disabled";
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,name = "rockchip,dsm-sound";
+ simple-audio-card,bitclock-master = <&sndcodec>;
+ simple-audio-card,frame-master = <&sndcodec>;
+ sndcpu: simple-audio-card,cpu {
+ sound-dai = <&sai3>;
+ };
+ sndcodec: simple-audio-card,codec {
+ sound-dai = <&acdcdig_dsm>;
+ };
+ };
+
+ es8388_sound: es8388-sound {
+ status = "okay";
+ compatible = "rockchip,multicodecs-card";
+ rockchip,card-name = "rockchip-es8388";
+ spk-con-gpio = <&gpio0 RK_PB6 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",
+ "RINPUT1", "Main Mic",
+ "RINPUT2", "Main Mic",
+ "LINPUT1", "Headset Mic",
+ "LINPUT2", "Headset Mic";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spk_ctrl>;
+ };
+
+ fiq_debugger: fiq-debugger {
+ compatible = "rockchip,fiq-debugger";
+ rockchip,serial-id = <0>;
+ rockchip,wake-irq = <0>;
+ rockchip,irq-mode-enable = <1>;
+ rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */
+ interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ leds: leds {
+ status = "okay";
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&leds_gpio>;
+ work_led: work-led {
+ //gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
+ //default-state = "on";
+ };
+
+ };
+
+ gpio_keys: gpio-keys {
+ status = "disabled";
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ //pinctrl-0 = <&key_wake_up>;
+
+ wake_up: wake-up {
+ label = "Wake-up";
+ //gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WAKEUP>;
+ wakeup-source;
+ };
+ };
+
+ vcc12v_dc: vcc12v-dc {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc12v_dc";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ vcc_sys: vcc-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc12v_dc>;
+ };
+
+ vcc3v3_stb: vcc3v3-stb {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_stb";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_sys>;
+ };
+
+ vcc3v3_sd: vcc3v3-sd {
+ compatible = "regulator-fixed";
+ //gpio = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
+ regulator-name = "vcc3v3_sd";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&sdmmc_pwren>;
+ };
+
+ vccio_sd: vccio-sd {
+ compatible = "regulator-gpio";
+ regulator-name = "vccio_sd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ //gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
+ states = <3300000 1
+ 1800000 0>;
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&sdmmc_volt>;
+ };
+
+ vcc_1v8: vcc-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vcc3v3_stb>;
+ };
+
+ vcc_ddr: vcc-ddr {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_ddr";
+ regulator-always-on;
+ regulator-boot-on;
+ vin-supply = <&vcc_sys>;
+ };
+
+ vdd_arm: vdd-arm {
+ compatible = "pwm-regulator";
+ pwms = <&pwm0_4ch_0 0 5000 1>;
+ regulator-name = "vdd_arm";
+ regulator-min-microvolt = <710000>;
+ regulator-max-microvolt = <1207000>;
+ regulator-init-microvolt = <1011000>;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-settling-time-up-us = <250>;
+ pwm-supply = <&vcc_sys>;
+ };
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ //pinctrl-0 = <&wifi_enable_h>;
+
+ /*
+ * 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)
+ */
+ //reset-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless-bluetooth {
+ compatible = "bluetooth-platdata";
+ //uart_rts_gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
+ //pinctrl-names = "default", "rts_gpio";
+ //pinctrl-0 = <&uart5m0_rtsn_pins>;
+ //pinctrl-1 = <&uart5_gpios>;
+ //BT,power_gpio = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
+ wireless-wlan {
+ compatible = "wlan-platdata";
+ rockchip,grf = <&grf>;
+ pinctrl-names = "default";
+ //pinctrl-0 = <&wifi_wake_host>;
+ wifi_chip_type = "cyw43455";
+ //WIFI,host_wake_irq = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
+ status = "disabled";
+ };
+};
+
+&audio_codec {
+ status = "okay";
+};
+
+&cma {
+ size = <0x1600000>;
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&flexbus_fspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&flexbus0m1_pins &flexbus0_clk_pins
+ &flexbus0_d0_pins &flexbus0_d1_pins
+ &flexbus0_d2_pins &flexbus0_d3_pins>;
+ status = "disabled";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
+&fspi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
+&i2c0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rm_io0_i2c0_scl
+ &rm_io1_i2c0_sda>;
+
+ hym8563: hym8563@51 {
+ status = "okay";
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ //pinctrl-0 = <&hym8563_int>;
+ //interrupt-parent = <&gpio0>;
+ //interrupts = <RK_PA0 IRQ_TYPE_LEVEL_LOW>;
+ //wakeup-source;
+ };
+
+ es8388: es8388@11 {
+ status = "okay";
+ #sound-dai-cells = <0>;
+ compatible = "everest,es8388", "everest,es8323";
+ reg = <0x11>;
+ clocks = <&mclkout_sai1>;
+ clock-names = "mclk";
+ assigned-clocks = <&mclkout_sai1>;
+ assigned-clock-rates = <12288000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rm_io8_sai1_mclk>;
+ };
+};
+
+&mmc {
+ max-frequency = <150000000>;
+ supports-sd;
+ no-sdio;
+ no-mmc;
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ //sd-uhs-sdr104;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc_clk_pins &sdmmc_cmd_pins &sdmmc_bus4_pins &sd_det>;
+ //vqmmc-supply = <&vccio_sd>;
+ //vmmc-supply = <&vcc3v3_sd>;
+ status = "okay";
+};
+
+&gmac0 {
+ phy-mode = "rmii";
+ clock_in_out = "input";
+
+ snps,reset-gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ snps,reset-delays-us = <0 20000 100000>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <ð_rmii0_miim_pins
+ ð_rmii0_tx_bus2_pins
+ ð_rmii0_rx_bus2_pins
+ ð_rmii0_clk_pins>;
+
+ phy-handle = <&rmii_phy0>;
+ status = "okay";
+};
+
+&gmac1 {
+ phy-mode = "rmii";
+ clock_in_out = "input";
+
+ snps,reset-gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ snps,reset-delays-us = <0 20000 100000>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <ð_rmii1_miim_pins
+ ð_rmii1_tx_bus2_pins
+ ð_rmii1_rx_bus2_pins
+ ð_rmii1_clk_pins>;
+
+ phy-handle = <&rmii_phy1>;
+ status = "okay";
+};
+
+&mdio0 {
+ rmii_phy0: phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x01>;
+ };
+};
+&mdio1 {
+ rmii_phy1: phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x01>;
+ };
+};
+
+&pinctrl {
+ sdcard {
+ sd_det: sd-det {
+ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ usb {
+ //vcc5v0_otg0_en: vcc5v0-otg0-en {
+ // rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
+ //};
+ //
+ //vcc5v0_otg1_en: vcc5v0-otg1-en {
+ // rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
+ //};
+ };
+
+ led {
+ leds_gpio: leds-gpio {
+ rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ //sdio-pwrseq {
+ // wifi_enable_h: wifi-enable-h {
+ // rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ // };
+ //};
+
+ speaker {
+ spk_ctrl: spk-ctrl {
+ rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ //wireless-bluetooth {
+ // uart5_gpios: uart5-gpios {
+ // rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+ // };
+ //};
+
+ //wireless-wlan {
+ // wifi_wake_host: wifi-wake-host {
+ // rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>;
+ // };
+ //};
+
+ gmac {
+ gmac0_reset: gmac0-reset {
+ rockchip,pins = <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ gmac1_reset: gmac1-reset {
+ rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
+
+&pwm0_4ch_0 {
+ pinctrl-names = "active";
+ pinctrl-0 = <&rm_io21_pwm0_ch0>;
+ status = "okay";
+};
+
+/*
+&pwm0_4ch_1 {
+ pinctrl-names = "active";
+ pinctrl-0 = <&rm_io20_pwm0_ch1>;
+ status = "okay";
+};
+
+&pwm0_4ch_2 {
+ pinctrl-names = "active";
+ pinctrl-0 = <&rm_io3_pwm0_ch2>;
+ status = "okay";
+};
+*/
+&rga2 {
+ status = "okay";
+};
+
+&rng {
+ status = "okay";
+};
+
+&rockchip_suspend {
+ rockchip,sleep-mode-config = <
+ (0
+ | RKPM_ARMOFF_DDRPD
+ | RKPM_24M_OSC_DIS
+ | RKPM_32K_CLK
+ | RKPM_32K_SRC_RC
+ | RKPM_PWM0_CH0_REGULATOR
+ )
+ >;
+
+ rockchip,apios-suspend = <
+ (0
+ | RKPM_PWREN_CORE_GPIO0A2 | RKPM_PWREN_CORE_ACT_LOW
+ | RKPM_PWREN_SLEEP_GPIO0A0 | RKPM_PWREN_SLEEP_ACT_LOW
+ )
+ >;
+};
+
+&sai1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rm_io9_sai1_sclk
+ &rm_io10_sai1_lrck
+ &rm_io11_sai1_sdi
+ &rm_io12_sai1_sdo0>;
+};
+
+&sai4 {
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&tsadc {
+ status = "okay";
+};
+
+//232
+&uart1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rm_io15_uart1_tx &rm_io16_uart1_rx>;
+};
+
+//232 && 和rgb冲突
+&uart2 {
+ status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rm_io28_uart2_rx &rm_io24_uart2_tx>;
+};
+
+//485
+&uart3 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rm_io6_uart3_tx &rm_io7_uart3_rx &rm_io5_uart3_rtsn>;
+ linux,rs485-enabled-at-boot-time;
+};
+
+//485 && 和rgb冲突
+&uart4 {
+ status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rm_io30_uart4_rx &rm_io31_uart4_tx &rm_io29_uart4_rtsn>;
+ linux,rs485-enabled-at-boot-time;
+};
+
+//和rgb冲突
+&can0 {
+ assigned-clocks = <&cru CLK_CAN0>;
+ assigned-clock-rates = <200000000>;
+ pinctrl-0 = <&rm_io25_can0_tx &rm_io26_can0_rx>;
+ pinctrl-names = "default";
+ status = "disabled";
+};
+
+&can1 {
+ assigned-clocks = <&cru CLK_CAN1>;
+ assigned-clock-rates = <200000000>;
+ pinctrl-0 = <&rm_io17_can1_tx &rm_io18_can1_rx>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&u2phy_otg0 {
+ vbus-supply = <&vcc5v0_otg0>;
+ status = "okay";
+};
+
+&u2phy_otg1 {
+ phy-supply = <&vcc5v0_otg1>;
+ status = "okay";
+};
+
+
+&usb2phy {
+ status = "okay";
+};
+
+&usb20_otg0 {
+ status = "okay";
+};
+
+&usb20_otg1 {
+ dr_mode = "host";
+ status = "okay";
+};