add external config
authorkyz <kyz@kyz.pub>
Tue, 4 Nov 2025 09:50:30 +0000 (17:50 +0800)
committerkyz <kyz@kyz.pub>
Tue, 4 Nov 2025 09:50:30 +0000 (17:50 +0800)
external/board/gl_dtu.config [new file with mode: 0644]
external/board/ido-evb3506-v1a-nand-gl_defconfig [new file with mode: 0644]
external/dts/ido-evb3506-v1a-nand-gl.dts [new file with mode: 0644]
external/dts/ido-evb3506-v1a-nand-gl.dtsi [new file with mode: 0644]
external/pkg/Config.in [new file with mode: 0644]
external/pkg/pcs_dtu.mk [new file with mode: 0644]

diff --git a/external/board/gl_dtu.config b/external/board/gl_dtu.config
new file mode 100644 (file)
index 0000000..ef9fa5b
--- /dev/null
@@ -0,0 +1,23 @@
+#GL_DTU
+BR2_PACKAGE_GL_DTU=y
+BR2_PACKAGE_CJSON=y
+BR2_PACKAGE_LIBLOG4C_LOCALTIME=y
+BR2_PACKAGE_LIBMODBUS=y
+BR2_PACKAGE_LIBCONFIG=y
+BR2_TARGET_LOCALTIME="Asia/Shanghai"
+#BR2_PACKAGE_NTP_NTPQ=y
+#BR2_PACKAGE_LIBCURL=y
+#BR2_PACKAGE_LIBCURL_CURL=y
+#BR2_PACKAGE_LIBCURL_PROXY_SUPPORT=y
+#BR2_PACKAGE_LIBCURL_COOKIES_SUPPORT=y
+#BR2_PACKAGE_LIBCURL_EXTRA_PROTOCOLS_FEATURES=y
+#BR2_PACKAGE_LIBCURL_OPENSSL=y
+#BR2_PACKAGE_RKWIFIBT=n
+BR2_ROOTFS_OVERLAY+="../app/gl_dtu/fs_overlay"
+#BR2_PACKAGE_COLLECTD=y
+#BR2_PACKAGE_COLLECTD_IPTABLES=y
+#BR2_PACKAGE_IPTABLES=y
+BR2_PACKAGE_LIBWEBSOCKETS=y
+BR2_PACKAGE_SQLITE=y
+BR2_PACKAGE_NGINX=y
+
diff --git a/external/board/ido-evb3506-v1a-nand-gl_defconfig b/external/board/ido-evb3506-v1a-nand-gl_defconfig
new file mode 100644 (file)
index 0000000..84915ea
--- /dev/null
@@ -0,0 +1,20 @@
+RK_ROOTFS_UBI=y
+RK_ROOTFS_INSTALL_MODULES=y
+RK_WIFIBT_CHIP="AP6256"
+# RK_ROOTFS_LOG_GUARDIAN is not set
+RK_UBOOT_CFG="rk3506"
+RK_UBOOT_CFG_FRAGMENTS="rk3506b rk3506_tb"
+RK_UBOOT_SPL=y
+RK_KERNEL_ARM32=y
+RK_KERNEL_CFG="rk3506_defconfig"
+RK_KERNEL_CFG_FRAGMENTS="rk3506-display.config"
+RK_KERNEL_DTS_NAME="ido-evb3506-v1a-nand-gl"
+RK_BOOT_COMPRESSED=y
+RK_BOOT_FIT_ITS_NAME="thunderboot.its"
+RK_RECOVERY_FIT_ITS_NAME="thunderboot4recovery.its"
+RK_FLASH_SIZE=2048
+RK_EXTRA_PARTITION_1_FSTYPE="ubi"
+RK_EXTRA_PARTITION_1_SRC="rk3506_oem"
+RK_EXTRA_PARTITION_2_FSTYPE="ubi"
+RK_PARAMETER="parameter-flash.txt"
+RK_USE_FIT_IMG=y
diff --git a/external/dts/ido-evb3506-v1a-nand-gl.dts b/external/dts/ido-evb3506-v1a-nand-gl.dts
new file mode 100644 (file)
index 0000000..57ef36f
--- /dev/null
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)\r
+/*\r
+ * Copyright (c) 2024 Rockchip Electronics Co., Ltd.\r
+ */\r
+\r
+\r
+#include <dt-bindings/display/drm_mipi_dsi.h>\r
+#include <dt-bindings/input/rk-input.h>\r
+#include <dt-bindings/suspend/rockchip-rk3506.h>\r
+#include "ido-evb3506-v1a-nand-gl.dtsi"\r
+\r
+/ {\r
+       backlight: backlight {\r
+               status = "disabled";\r
+       };\r
+};\r
+\r
+\r
+&display_subsystem {\r
+       status = "disabled";\r
+};\r
+\r
+&pwm0_4ch_2 {\r
+        status = "disabled";\r
+};\r
+\r
+&dsi {\r
+       status = "disabled";\r
+};\r
+\r
+\r
+&i2c0 {\r
+       status = "disabled";\r
+};\r
+\r
+&vop {\r
+       status = "disabled";\r
+};\r
+\r
+&gmac1 {\r
+       status = "disabled";\r
+};\r
+//---------------------------------------------------------------\r
+&uart2 {\r
+       status = "okay";\r
+};\r
+\r
+&uart4 {\r
+       status = "okay";\r
+};\r
+\r
+&can0 {\r
+       status = "okay";\r
+};\r
+\r
+&pinctrl {\r
+    led {\r
+        leds_pin: leds-pin {\r
+              rockchip,pins =\r
+                  <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,  // GPIO3_B0\r
+                  <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,  // GPIO3_B1  \r
+                  <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;  // GPIO3_B2\r
+          };\r
+    };\r
+    can {\r
+        spi_can_reset_pins: spi-can-reset-pins {\r
+              rockchip,pins =\r
+                  <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;  // GPIO0_B3 RST\r
+        };\r
+        spi_can_int_pins: spi-can-int-pins {\r
+              rockchip,pins =\r
+                  <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;  // GPIO0_B4 INT \r
+        };\r
+    };\r
+\r
+};\r
+\r
+&leds {\r
+        compatible = "gpio-leds";\r
+        pinctrl-names = "default";\r
+        pinctrl-0 = <&leds_pin>;\r
+        status = "okay";\r
+\r
+        sys_led: sys_led {\r
+            label = "sys_led";\r
+            gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;\r
+            linux,default-trigger = "mmc0";\r
+            default-state = "off";\r
+        };\r
+\r
+        state_led: state_led {\r
+            label = "state_led";\r
+            gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;\r
+            linux,default-trigger = "none";\r
+            default-state = "off";\r
+        };\r
+\r
+        fault_led: fault_led {\r
+            label = "fault_led";\r
+            gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;\r
+            linux,default-trigger = "none";\r
+            default-state = "off";\r
+        };\r
+};\r
+\r
+&spi1 {\r
+    can2: can@0 {\r
+          compatible = "microchip,mcp2515";\r
+          reg = <0>;\r
+          //clocks = <&cru CLK_SPI1>, <&cru PCLK_SPI1>;\r
+          interrupt-parent = <&gpio0>; // 指定中断控制器为gpio0\r
+          interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;\r
+          spi-max-frequency = <10000000>;\r
+          pinctrl-0 = <&spi_can_reset_pins\r
+                    &spi_can_int_pins>;\r
+          status = "disabled";\r
+      };\r
+};\r
+\r
diff --git a/external/dts/ido-evb3506-v1a-nand-gl.dtsi b/external/dts/ido-evb3506-v1a-nand-gl.dtsi
new file mode 100644 (file)
index 0000000..5d4d608
--- /dev/null
@@ -0,0 +1,635 @@
+// 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 = <&eth_rmii0_miim_pins
+                    &eth_rmii0_tx_bus2_pins
+                    &eth_rmii0_rx_bus2_pins
+                    &eth_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 = <&eth_rmii1_miim_pins
+                    &eth_rmii1_tx_bus2_pins
+                    &eth_rmii1_rx_bus2_pins
+                    &eth_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";
+};
diff --git a/external/pkg/Config.in b/external/pkg/Config.in
new file mode 100644 (file)
index 0000000..6092fde
--- /dev/null
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_PCS_DTU
+       bool "pcs dtu"
+       default n
+       help
+         pcs dtu
diff --git a/external/pkg/pcs_dtu.mk b/external/pkg/pcs_dtu.mk
new file mode 100644 (file)
index 0000000..7e20966
--- /dev/null
@@ -0,0 +1,19 @@
+PCS_DTU_SITE = $(TOPDIR)/../app/pcs_dtu
+PCS_DTU_SITE_METHOD = local
+
+ifeq ($(call qstrip,$(BR2_ARCH)), arm)
+SODIR = lib32
+else ifeq ($(call qstrip, $(BR2_ARCH)), aarch64)
+SODIR = lib64
+endif
+
+# add dependencies
+#PCS_DTU_DEPENDENCIES =
+
+PCS_DTU_APP_INSTALL_STAGING = YES
+#PCS_DTU_SUPPORTS_IN_SOURCE_BUILD = NO
+#PCS_DTU_PRE_BUILD_HOOKS += PCS_DTU_PRE_BUILD_HOOK
+#PCS_DTU_CONF_OPTS += -DCPU_ARCH=$(BR2_ARCH) -DBUILD_TYPE=$(PCS_DTU_BUILD_TYPE)
+#PCS_DTU_CONF_OPTS += -DCMAKE_INSTALL_STAGING=$(STAGING_DIR)
+
+$(eval $(cmake-package))