Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
a0bab0ccc8
@ -92,6 +92,9 @@ comfast,cf-e393ax)
|
||||
dlink,aquila-pro-ai-m30-a1)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
|
||||
;;
|
||||
gatonetworks,gdsp)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
glinet,gl-x3000|\
|
||||
glinet,gl-xe3000|\
|
||||
glinet,gl-mt2500|\
|
||||
|
@ -449,6 +449,19 @@ define U-Boot/mt7981_rfb-emmc
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr3
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_gatonetworks_gdsp
|
||||
NAME:=GatoNetworks GDSP
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=gatonetworks_gdsp
|
||||
UBOOT_CONFIG:=mt7981_gatonetworks_gdsp
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=nor
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr3
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-nor-ddr3
|
||||
FIP_COMPRESS:=1
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_rfb-nor
|
||||
NAME:=MT7981 Reference Board
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@ -884,6 +897,7 @@ UBOOT_TARGETS := \
|
||||
mt7981_cmcc_a10 \
|
||||
mt7981_cmcc_rax3000m-emmc \
|
||||
mt7981_cmcc_rax3000m-nand \
|
||||
mt7981_gatonetworks_gdsp \
|
||||
mt7981_glinet_gl-x3000 \
|
||||
mt7981_glinet_gl-xe3000 \
|
||||
mt7981_h3c_magic-nx30-pro \
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 9c1ad8a18ac1a20aee7a617964bcae3e90dac700 Mon Sep 17 00:00:00 2001
|
||||
From: Enrico Mioso <mrkiko.rs@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 17:46:35 +0200
|
||||
Subject: [PATCH] uboot-mediatek: initialized the watchdog subsystem later
|
||||
|
||||
Initialize the watchdog subsystem later during initialization, to allow for
|
||||
the gpio-wdt driver to work.
|
||||
|
||||
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
|
||||
---
|
||||
common/board_r.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/common/board_r.c
|
||||
+++ b/common/board_r.c
|
||||
@@ -663,19 +663,13 @@ static init_fnc_t init_sequence_r[] = {
|
||||
serial_initialize,
|
||||
initr_announce,
|
||||
dm_announce,
|
||||
-#if CONFIG_IS_ENABLED(WDT)
|
||||
- initr_watchdog,
|
||||
-#endif
|
||||
- INIT_FUNC_WATCHDOG_RESET
|
||||
arch_initr_trap,
|
||||
#if defined(CONFIG_BOARD_EARLY_INIT_R)
|
||||
board_early_init_r,
|
||||
#endif
|
||||
- INIT_FUNC_WATCHDOG_RESET
|
||||
#ifdef CONFIG_POST
|
||||
post_output_backlog,
|
||||
#endif
|
||||
- INIT_FUNC_WATCHDOG_RESET
|
||||
#if defined(CONFIG_PCI_INIT_R) && defined(CONFIG_SYS_EARLY_PCI_INIT)
|
||||
/*
|
||||
* Do early PCI configuration _before_ the flash gets initialised,
|
||||
@@ -690,7 +684,6 @@ static init_fnc_t init_sequence_r[] = {
|
||||
#ifdef CONFIG_MTD_NOR_FLASH
|
||||
initr_flash,
|
||||
#endif
|
||||
- INIT_FUNC_WATCHDOG_RESET
|
||||
#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_X86)
|
||||
/* initialize higher level parts of CPU like time base and timers */
|
||||
cpu_init_r,
|
||||
@@ -719,6 +712,10 @@ static init_fnc_t init_sequence_r[] = {
|
||||
#ifdef CONFIG_PVBLOCK
|
||||
initr_pvblock,
|
||||
#endif
|
||||
+#if CONFIG_IS_ENABLED(WDT)
|
||||
+ initr_watchdog,
|
||||
+#endif
|
||||
+ INIT_FUNC_WATCHDOG_RESET
|
||||
initr_env,
|
||||
#ifdef CONFIG_SYS_MALLOC_BOOTPARAMS
|
||||
initr_malloc_bootparams,
|
@ -0,0 +1,406 @@
|
||||
From 57d0f608d925cb688b5c9b71512fca7d228f07f6 Mon Sep 17 00:00:00 2001
|
||||
From: Enrico Mioso <mrkiko.rs@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 20:39:28 +0200
|
||||
Subject: [PATCH] add GatoNetworks GDSP
|
||||
|
||||
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
|
||||
---
|
||||
arch/arm/dts/mt7981-gatonetworks_gdsp.dts | 200 +++++++++++++++++++++
|
||||
configs/mt7981_gatonetworks_gdsp_defconfig | 144 +++++++++++++++
|
||||
gatonetworks_gdsp_env | 38 ++++
|
||||
3 files changed, 382 insertions(+)
|
||||
create mode 100644 arch/arm/dts/mt7981-gatonetworks_gdsp.dts
|
||||
create mode 100644 configs/mt7981_gatonetworks_gdsp_defconfig
|
||||
create mode 100644 gatonetworks_gdsp_env
|
||||
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-gatonetworks_gdsp.dts
|
||||
@@ -0,0 +1,200 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/linux-event-codes.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "GatoNetworks GDSP";
|
||||
+ compatible = "gatonetworks,gdsp", "mediatek,mt7981";
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ sim1 {
|
||||
+ label = "sim1";
|
||||
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sim2 {
|
||||
+ label = "sim2";
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sg1 {
|
||||
+ label = "sg1";
|
||||
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sg2 {
|
||||
+ label = "sg2";
|
||||
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sg3 {
|
||||
+ label = "sg3";
|
||||
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sg4 {
|
||||
+ label = "sg4";
|
||||
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sg5 {
|
||||
+ label = "sg5";
|
||||
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ sg6 {
|
||||
+ label = "sg6";
|
||||
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+ gpio-watchdog {
|
||||
+ compatible = "linux,wdt-gpio";
|
||||
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
+ hw_algo = "toggle";
|
||||
+ hw_margin_ms = <25000>;
|
||||
+ always-running;
|
||||
+ u-boot,autostart;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "2500base-x";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <2500>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi2_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <2>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ flash@0 {
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@00000 {
|
||||
+ label = "BL2";
|
||||
+ reg = <0x00000 0x0040000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@40000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x40000 0x0010000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@50000 {
|
||||
+ label = "Factory";
|
||||
+ reg = <0x50000 0x00B0000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "FIP";
|
||||
+ reg = <0x100000 0x0080000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x180000 0x1E80000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ uart1_pins: uart1-pins {
|
||||
+ mux {
|
||||
+ function = "uart";
|
||||
+ groups = "uart1_0";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ uart2_pins: uart2-pins {
|
||||
+ mux {
|
||||
+ function = "uart";
|
||||
+ groups = "uart2_0_tx_rx";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi2_flash_pins: spi2-pins {
|
||||
+ mux {
|
||||
+ function = "spi";
|
||||
+ groups = "spi2", "spi2_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart2_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_gatonetworks_gdsp_defconfig
|
||||
@@ -0,0 +1,144 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ENV_SIZE=0x10000
|
||||
+CONFIG_ENV_OFFSET=0x0
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-gatonetworks_gdsp"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_WATCHDOG_TIMEOUT_MSECS=25000
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_SPI_BOOT=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_USE_PREBOOT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mt7981-gatonetworks_gdsp"
|
||||
+CONFIG_SYS_CBSIZE=512
|
||||
+CONFIG_SYS_PBSIZE=1049
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_CONSOLE_MUX=y
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="GDSP> "
|
||||
+CONFIG_SYS_MAXARGS=16
|
||||
+CONFIG_CMD_BDINFO_EXTRA=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_HISTORY=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+# CONFIG_BOOTM_NETBSD is not set
|
||||
+# CONFIG_BOOTM_PLAN9 is not set
|
||||
+# CONFIG_BOOTM_RTEMS is not set
|
||||
+# CONFIG_BOOTM_VXWORKS is not set
|
||||
+# CONFIG_CMD_BOOTEFI_BOOTMGR is not set
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_CALLBACK=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CRC32_VERIFY=y
|
||||
+CONFIG_LOOPW=y
|
||||
+CONFIG_CMD_MEMINFO=y
|
||||
+CONFIG_CMD_MEMTEST=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+# CONFIG_CMD_UNLZ4 is not set
|
||||
+# CONFIG_CMD_UNZIP is not set
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPIO_READ=y
|
||||
+CONFIG_CMD_PWM=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+# CONFIG_CMD_NAND_EXT is not set
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_CAT=y
|
||||
+CONFIG_CMD_SETEXPR_FMT=y
|
||||
+CONFIG_CMD_XXD=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_TFTPPUT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+# CONFIG_CMD_EFICONFIG is not set
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_MTD=y
|
||||
+CONFIG_ENV_MTD_NAME="u-boot-env"
|
||||
+CONFIG_ENV_SIZE_REDUND=0x0
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="gatonetworks_gdsp_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+# CONFIG_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_DM_SPI_FLASH=y
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
+CONFIG_SPI_FLASH_EON=y
|
||||
+CONFIG_SPI_FLASH_GIGADEVICE=y
|
||||
+CONFIG_SPI_FLASH_ISSI=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_SPI_FLASH_SPANSION=y
|
||||
+CONFIG_SPI_FLASH_STMICRO=y
|
||||
+CONFIG_SPI_FLASH_WINBOND=y
|
||||
+CONFIG_SPI_FLASH_XMC=y
|
||||
+CONFIG_SPI_FLASH_XTX=y
|
||||
+CONFIG_SPI_FLASH_MTD=y
|
||||
+CONFIG_UBI_SILENCE_MSG=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_PWM=y
|
||||
+CONFIG_PWM_MTK=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_WDT=y
|
||||
+CONFIG_WDT_GPIO=y
|
||||
+CONFIG_UBIFS_SILENCE_MSG=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/gatonetworks_gdsp_env
|
||||
@@ -0,0 +1,38 @@
|
||||
+load_factory_data=if env exists factory_data_present ; then else mtd read Factory $loadaddr 0x0 0x1000 ; setenv factory_data_present 1 ; fi
|
||||
+lan_mac_factory=run load_factory_data ; setexpr macoffs $loadaddr + 0x2a ; env readmem -b lan_mac $macoffs 0x6 ; setenv lan_mac_factory ; setenv macoffs
|
||||
+wan_mac_factory=run load_factory_data ; setexpr macoffs $loadaddr + 0x24 ; env readmem -b wan_mac $macoffs 0x6 ; setenv wan_mac_factory ; setenv macoffs
|
||||
+label_mac_factory=run load_factory_data ; setexpr macoffs $loadaddr + 0x4 ; env readmem -b label_mac $macoffs 0x6 ; setenv label_mac_factory ; setenv macoffs
|
||||
+ethaddr_factory=setenv ethaddr $lan_mac ; setenv ethaddr_factory
|
||||
+wifi_mac_factory=setenv wifi_mac $label_mac ; setenv wifi_mac_factory
|
||||
+env_cleanup=setenv load_factory_data ; setenv factory_data_present ; setenv env_cleanup
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.10
|
||||
+loadaddr=0x46000000
|
||||
+bootcmd=run boot_nor
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-gatonetworks_gdsp-initramfs-kernel.bin
|
||||
+bootfile_upg=openwrt-mediatek-filogic-gatonetworks_gdsp-squashfs-sysupgrade.bin
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )[0m
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot system from flash.=run boot_nor ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Load system via TFTP then write to flash.=run boot_tftp_sysupgrade ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+bootmenu_5=Reboot.=reset
|
||||
+boot_first=if button reset ; then run boot_tftp ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_tftp_forever
|
||||
+boot_nor=mtd read firmware ${loadaddr} ; bootm $loadaddr
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
|
||||
+boot_tftp_forever=while true ; do run boot_tftp ; sleep 1 ; done
|
||||
+boot_tftp_sysupgrade=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && run nor_write_production
|
||||
+reset_factory=env default -a && saveenv && reset
|
||||
+nor_pad_size=setexpr image_eb $filesize / 0x1000 ; setexpr tmp1 image_size % 0x1000 ; test 0x$tmp1 -gt 0 && setexpr image_eb $image_eb + 1 ; setexpr image_eb $image_eb * 0x1000
|
||||
+nor_write_production=run nor_pad_size ; test 0x$image_eb -le 0x1e80000 && mtd erase firmware 0x0 0x$image_eb && mtd write firmware $loadaddr 0x0 $filesize
|
||||
+_init_env=setenv _init_env ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run lan_mac_factory ; run wan_mac_factory ; run label_mac_factory ; run env_cleanup ; run ethaddr_factory ; run wifi_mac_factory ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2024-11-13
|
||||
PKG_SOURCE_VERSION:=417a93ceae540444fdbd3f76d1dadf0e15621fdc
|
||||
PKG_MIRROR_HASH:=3888aa506f0ce808cbe0287b98abfb7ba92e68b1eb17516fef4b58068bc72131
|
||||
PKG_SOURCE_DATE:=2024-11-08
|
||||
PKG_SOURCE_VERSION:=d9c24813d983df9524fa7a2b78fc3132c159a20f
|
||||
PKG_MIRROR_HASH:=3d1a79c08ef8c8b9404f9287d9acda6468b8b1c2a99dd384287f522ed3b1a047
|
||||
|
||||
PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
|
||||
|
||||
@ -52,20 +52,21 @@ endef
|
||||
MESON_HOST_VARS+=VERSION=$(PKG_VERSION)
|
||||
MESON_VARS+=VERSION=$(PKG_VERSION)
|
||||
|
||||
MESON_HOST_ARGS += \
|
||||
MESON_COMMON_ARGS = \
|
||||
-Dcompressed-help=false \
|
||||
-Ddocs=disabled \
|
||||
-Dhelp=enabled \
|
||||
-Dlua_version=5.1 \
|
||||
-Durl_backend=wget \
|
||||
-Dcrypto_backend=openssl \
|
||||
-Dzstd=false
|
||||
|
||||
MESON_HOST_ARGS += \
|
||||
$(MESON_COMMON_ARGS) \
|
||||
-Dcrypto_backend=openssl
|
||||
|
||||
MESON_ARGS += \
|
||||
-Dlua_version=5.1 \
|
||||
-Dcompressed-help=false \
|
||||
-Ddocs=disabled \
|
||||
-Durl_backend=wget \
|
||||
-Dcrypto_backend=$(BUILD_VARIANT) \
|
||||
-Dzstd=false
|
||||
$(MESON_COMMON_ARGS) \
|
||||
-Dcrypto_backend=$(BUILD_VARIANT)
|
||||
|
||||
HOST_LDFLAGS += \
|
||||
-Wl,-rpath $(STAGING_DIR_HOST)/lib
|
||||
|
@ -207,15 +207,6 @@
|
||||
stock_partition@1340000 {
|
||||
label = "stock_rootfs";
|
||||
reg = <0x1340000 0x4000000>;
|
||||
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "extra";
|
||||
reg = <0x0 0x4000000>;
|
||||
};
|
||||
};
|
||||
partition@5340000 {
|
||||
label = "0:BOOTCONFIG";
|
||||
@ -265,42 +256,6 @@
|
||||
stock_partition@6400000 {
|
||||
label = "stock_rootfs_1";
|
||||
reg = <0x6400000 0x4000000>;
|
||||
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "fw_env";
|
||||
reg = <0x0 0x100000>;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_fw_env_0: macaddr@0 {
|
||||
reg = <0x00 0x6>;
|
||||
};
|
||||
macaddr_fw_env_6: macaddr@6 {
|
||||
reg = <0x06 0x6>;
|
||||
};
|
||||
macaddr_fw_env_c: macaddr@c {
|
||||
reg = <0x0c 0x6>;
|
||||
};
|
||||
macaddr_fw_env_12: macaddr@12 {
|
||||
reg = <0x12 0x6>;
|
||||
};
|
||||
macaddr_fw_env_18: macaddr@18 {
|
||||
reg = <0x18 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "ubi";
|
||||
reg = <0x100000 0x9b00000>;
|
||||
};
|
||||
};
|
||||
stock_partition@a400000 {
|
||||
label = "stock_fw_env";
|
||||
@ -318,6 +273,41 @@
|
||||
label = "stock_scfgmgr";
|
||||
reg = <0xaf00000 0x0100000>;
|
||||
};
|
||||
|
||||
partition@6400000 {
|
||||
label = "fw_env";
|
||||
reg = <0x6400000 0x0100000>;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_fw_env_0: macaddr@0 {
|
||||
reg = <0x00 0x6>;
|
||||
};
|
||||
macaddr_fw_env_6: macaddr@6 {
|
||||
reg = <0x06 0x6>;
|
||||
};
|
||||
macaddr_fw_env_c: macaddr@c {
|
||||
reg = <0x0c 0x6>;
|
||||
};
|
||||
macaddr_fw_env_12: macaddr@12 {
|
||||
reg = <0x12 0x6>;
|
||||
};
|
||||
macaddr_fw_env_18: macaddr@18 {
|
||||
reg = <0x18 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
partition@6500000 {
|
||||
label = "ubi";
|
||||
reg = <0x6500000 0x9b00000>;
|
||||
};
|
||||
partition@1340000 {
|
||||
label = "extra";
|
||||
reg = <0x1340000 0x4000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
389
target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts
Normal file
389
target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts
Normal file
@ -0,0 +1,389 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981.dtsi"
|
||||
|
||||
/ {
|
||||
model = "GatoNetworks GDSP";
|
||||
compatible = "gatonetworks,gdsp", "mediatek,mt7981";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
label-mac-device = &wifi_band_0;
|
||||
led-boot = &sg1;
|
||||
led-failsafe = &sg1;
|
||||
led-running = &sg1;
|
||||
led-upgrade = &sg1;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
bootargs = "console=ttyS0,115200n1 earlycon=uart8250,mmio32,0x11002000";
|
||||
rootdisk = <&firmware>;
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0 0x40000000 0 0x10000000>;
|
||||
};
|
||||
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-3.3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reg_5v: regulator-5v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-5V";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
modem1 {
|
||||
gpio-export,name = "modem1";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&pio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
modem2 {
|
||||
gpio-export,name = "modem2";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&pio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
sim1 {
|
||||
label = "green:sim1";
|
||||
gpios = <&pio 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sim2 {
|
||||
label = "green:sim2";
|
||||
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sg1: sg1 {
|
||||
label = "green:sg1";
|
||||
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sg2 {
|
||||
label = "green:sg2";
|
||||
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sg3 {
|
||||
label = "green:sg3";
|
||||
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sg4 {
|
||||
label = "green:sg4";
|
||||
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sg5 {
|
||||
label = "green:sg5";
|
||||
gpios = <&pio 8 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
sg6 {
|
||||
label = "green:sg6";
|
||||
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-watchdog {
|
||||
compatible = "linux,wdt-gpio";
|
||||
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||
hw_algo = "toggle";
|
||||
hw_margin_ms = <25000>;
|
||||
always-running;
|
||||
};
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
nvmem-cells = <&macaddr_lan>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch@1f {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 39 0>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
swphy0: phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
swphy1: phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
swphy2: phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
swphy3: phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
|
||||
swphy4: phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan1";
|
||||
phy-handle = <&swphy0>;
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan2";
|
||||
phy-handle = <&swphy1>;
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan3";
|
||||
phy-handle = <&swphy2>;
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan4";
|
||||
phy-handle = <&swphy3>;
|
||||
};
|
||||
|
||||
port@4 {
|
||||
reg = <4>;
|
||||
label = "wan";
|
||||
nvmem-cells = <&macaddr_wan>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
phy-handle = <&swphy4>;
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&crypto {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wifi {
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
status = "okay";
|
||||
|
||||
wifi_band_0: band@0 {
|
||||
reg = <0>;
|
||||
nvmem-cells = <&macaddr_wifi 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
band@1 {
|
||||
reg = <1>;
|
||||
nvmem-cells = <&macaddr_wifi 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi2_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <52000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@00000 {
|
||||
label = "BL2";
|
||||
reg = <0x00000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x40000 0x0010000>;
|
||||
};
|
||||
|
||||
factory: partition@50000 {
|
||||
label = "Factory";
|
||||
reg = <0x50000 0x00B0000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_wifi: macaddr@4 {
|
||||
reg = <0x4 0x6>;
|
||||
compatible = "mac-base";
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
macaddr_wan: macaddr@24 {
|
||||
reg = <0x24 0x6>;
|
||||
};
|
||||
|
||||
macaddr_lan: macaddr@2a {
|
||||
reg = <0x2a 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "FIP";
|
||||
reg = <0x100000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
firmware: partition@180000 {
|
||||
label = "firmware";
|
||||
reg = <0x180000 0x1E80000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
uart1_pins: uart1-pins {
|
||||
mux {
|
||||
function = "uart";
|
||||
groups = "uart1_0";
|
||||
};
|
||||
};
|
||||
|
||||
uart2_pins: uart2-pins {
|
||||
mux {
|
||||
function = "uart";
|
||||
groups = "uart2_0_tx_rx";
|
||||
};
|
||||
};
|
||||
|
||||
spi2_flash_pins: spi2-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi2", "spi2_wp_hold";
|
||||
};
|
||||
|
||||
conf-pu {
|
||||
pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
|
||||
conf-pd {
|
||||
pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
drive-strength = <MTK_DRIVE_8mA>;
|
||||
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&xhci {
|
||||
mediatek,u3p-dis-msk = <0x0>;
|
||||
phys = <&u2port0 PHY_TYPE_USB2>,
|
||||
<&u3port0 PHY_TYPE_USB3>;
|
||||
status = "okay";
|
||||
vusb33-supply = <®_3p3v>;
|
||||
vbus-supply = <®_5v>;
|
||||
};
|
@ -72,6 +72,7 @@ platform_do_upgrade() {
|
||||
cetron,ct3003-ubootmod|\
|
||||
cmcc,a10|\
|
||||
cmcc,rax3000m|\
|
||||
gatonetworks,gdsp|\
|
||||
h3c,magic-nx30-pro|\
|
||||
imou,lc-hx3001|\
|
||||
jcg,q30-pro|\
|
||||
|
@ -727,6 +727,26 @@ define Device/edgecore_eap111
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_eap111
|
||||
|
||||
define Device/gatonetworks_gdsp
|
||||
DEVICE_VENDOR := GatoNetworks
|
||||
DEVICE_MODEL := gdsp
|
||||
DEVICE_DTS := mt7981b-gatonetworks-gdsp
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
IMAGES := sysupgrade.itb
|
||||
IMAGE_SIZE := 32768k
|
||||
DEVICE_PACKAGES := fitblk kmod-mt7915e kmod-mt7981-firmware \
|
||||
kmod-usb-net-qmi-wwan kmod-usb-serial-option kmod-usb3 \
|
||||
mt7981-wo-firmware -kmod-phy-aquantia
|
||||
ARTIFACTS := preloader.bin bl31-uboot.fip
|
||||
ARTIFACT/preloader.bin := mt7981-bl2 nor-ddr3
|
||||
ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot gatonetworks_gdsp
|
||||
KERNEL := kernel-bin | gzip
|
||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
||||
IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | pad-rootfs | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += gatonetworks_gdsp
|
||||
|
||||
define Device/glinet_gl-mt2500
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
DEVICE_MODEL := GL-MT2500
|
||||
|
Loading…
x
Reference in New Issue
Block a user