From patchwork Sun Nov 3 16:30:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enrico Mioso X-Patchwork-Id: 2005755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=atn5MFX+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=R6r8QxWE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XhKv46Q0xz1xxR for ; Mon, 4 Nov 2024 03:34:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=VTK27VtjRncPctYUzhuvoIx2Qs10GPUie5ANrkgfjV0=; b=atn5MFX+uDOVQZ lmi0Jdcgk0DHzbPBcAhEr34Pxa1d/uCpoedN22dJmGZdY1Os1gkpwqOUklPQElAMZ44iDLijdsVT1 1hqnnA6iKadhmA0xhvkVWyS8hBl6HVpdTyB1DbTg977q+LgUcQnXo/Q6eYoWbtaVazHp4EGR9PuJL MG7k3Qw2BkoC6lQSfqqTFYDKE1Push1/DmKV3Qrv/ZkFSf/vC8wHUXl+eT1wYTfvfCi42ol4Fwr6f wekBC71Dr5wV8PrUNB+gW8cHn1OPNWh+8lmpBalXoJiW8HExzMk96doJNm9p9ssaMh1mEAD9ZiN1S W+yrBqYNhczFcfRskDXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t7dWj-0000000BhPe-3DZa; Sun, 03 Nov 2024 16:32:33 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t7dWb-0000000BhOh-3iQU for openwrt-devel@lists.openwrt.org; Sun, 03 Nov 2024 16:32:28 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-539fe02c386so4046740e87.0 for ; Sun, 03 Nov 2024 08:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730651542; x=1731256342; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rPPAgqade1JtZ+TTFHE3AJ83PNYZLOXuB2VS1/9XL/E=; b=R6r8QxWExGQojoOsE7ZLYciWXSy16LX5zvKTwKGm8IZgA7KRUti6MzAYOetsqsQgxt GYCwbHp61NrZ7BER66XzYpKqkroUAA2EplGovw81VATcDkGI7QawPpF8gf1EXZyYGgsq 4oMjVgqsUQg7ZwmVi1xlmPZrAshLp9Ri90E6c+53K/4z3YSTA4d/a42KsUuqIBu0X/AG CG6S3OwVkcN2SockCj4Gw0VfG1pH2Ovl9mY4PuXMOOd8zT+goZBqCgqYRT2jgxSwkHW8 rrCAeO6wfwKIFz4bek+Ivy/AlSlvbQB3V3fe+LGyQhfQqRsvFmj3wN/U+fGQYDsrkWxL DSAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730651542; x=1731256342; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rPPAgqade1JtZ+TTFHE3AJ83PNYZLOXuB2VS1/9XL/E=; b=V5i/eRtAflmTjVSfKYht+uLUSdck26RZUDxkjUPiyMCnWjvOYW/cGuFTgZehcerOhR tBnbS/3PvZbnlW0H9PCVFUIh5PXTELxQ6Bo8JG1mSGmcbVE8/yHGhSeLCHV0yR/osTQy 1bAKogS+EUaqZm8EzD96RP23K7x+SYE9oeNP1v+TUMhOZ4ekoqmxE/EMjHDmGFHDtMi+ xQIYcD6X+L9CMRo+/KGhfMOXoQbJXfMsd18I1X3dlfLHpab6YFRAKnzwOk/muLm/EN0B c8cGhbPfrI5F37az1GoT6VBdZrYieTXrgE0VzsNExjQwPyPpyhxTh8uONnFBb26XrtGg tXXQ== X-Gm-Message-State: AOJu0YwIAvKhOqt7YXMNrnZsRoMFMy496zqRp2ILXEHi0+0W/JWbnUwx 61jgbgXFQLn4WETpFeda76B7nE5eBhSRpddakaUssQ8evv8O8PH2OPn6+f46 X-Google-Smtp-Source: AGHT+IHRCgr4SDC/FSejiIjyDBBHKwb+E9gNWEPO4PJXyjCpKbFCNNDLjSOuxOPnkxuLjQiKe3V+sQ== X-Received: by 2002:a05:6512:20ca:b0:539:e263:331c with SMTP id 2adb3069b0e04-53c7bbee92dmr3834889e87.17.1730651541638; Sun, 03 Nov 2024 08:32:21 -0800 (PST) Received: from localhost.localdomain ([2a01:4f9:c010:5d73::1]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53c7bc957c0sm1329753e87.25.2024.11.03.08.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 08:32:21 -0800 (PST) From: Enrico Mioso To: openwrt-devel Cc: Daniel Golle , Enrico Mioso Subject: [PATCH] mediatek: filogic: add support for GatoNetworks GDSP Date: Sun, 3 Nov 2024 17:30:34 +0100 Message-ID: <20241103163039.32823-1-mrkiko.rs@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241103_083225_978369_5CD86577 X-CRM114-Status: GOOD ( 25.02 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The GatoNetworks GDSP is a re-branded version of the R5000 5G Industrial router from Yinghua technologies. The re-branded device comes with OpenWrt preinstalled, and an OpenWrt-based U-Boot bootloader [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:135 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [mrkiko.rs(at)gmail.com] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The GatoNetworks GDSP is a re-branded version of the R5000 5G Industrial router from Yinghua technologies. The re-branded device comes with OpenWrt preinstalled, and an OpenWrt-based U-Boot bootloader version. The flash layout has been kept compatible with the OpenWrt version found on the stock device, making sysupgrade possible. Specifications: SOC: Mediatek MT7981BA RAM: 256MB Flash: SPI-NOR 32 MiB (Winbond W25Q256) WLAN: MT7976CN DBDC AX Wi-Fi Switch: MT7531AE (4x LAN Gigabit ports, 1x WAN Gigabit port) 5G: Quectel RM520N modem Watchdog: an external WDT connected to GPIO 6 is present and always running; the builtin Mediatek watchdog is also present and effective, but not used at the moment. This porting has been tested only with 1x 5G modems installed (the device supports up to two). Installation: Installation is possible via sysupgrade both in the stock device and re-branded version (requiring -F and -n in the former case). OpenWrt-based U-Boot Bootloader installation -------------------------------------------- The firmware flashed at manifacturing time in the re-branded device will flash an OpenWrt-based U-Boot bootloader with some extra recovery features (see [1]). To update the bootloader, you need to install the mtd-rw module and insmod it: insmod mtd-rw i_want_a_brick=1 Then update relevant flash partitions: mtd erase u-boot-env mtd erase BL2 mtd erase FIP mtd write openwrt-mediatek-filogic-gatonetworks_gdsp-preloader.bin BL2 mtd write openwrt-mediatek-filogic-gatonetworks_gdsp-bl31-uboot.fip FIP And reboot, making sure all previous commands ran succesfully. If something goes wrong, you can recover your device via the mtk_uartboot tool. In my testing, it was possible to start the process even without (un)-plugging the device, may be handy for remote recovery. U-Boot Recovery --------------- This procedure has been tested only with the OpenWrt-based U-boot bootloader. Assign your system static IP address 192.168.1.1 and start a TFTP server. The device will look for an initramfs image named openwrt-mediatek-filogic-gatonetworks_gdsp-initramfs-kernel.bin (so you may use openwrt/bin/targets/mediatek/filogic as root dir for your TFTP server). Power on the device while keeping the reset button pressed, until you see a TFTP request from 192.168.1.10. Your environment will be restored to it's default state. Notes ----- [1]: the OpenWrt-based U-Boot bootloader you will find installed in the device is configured to request for the initramfs image via TFTP for $gdsp_tftp_tries times before trying normal boot from NOR flash. Setting this U-Boot environment variable to 0x0 will disable the feature, which is not implemented in this patch. [2]: the exposed UART port is connected to ttyS1; the ttyS0 console port s not exposed. [3]: the provided bootloader environment has no provision for operating on BL2 and the FIP partitions. This is an intentional choice to make it (slightly) more difficult to brick the device. Signed-off-by: Enrico Mioso --- .../uboot-envtools/files/mediatek_filogic | 3 + package/boot/uboot-mediatek/Makefile | 14 + ...ialized-the-watchdog-subsystem-later.patch | 59 +++ .../patches/458-add-GatoNetworks-GDSP.patch | 418 ++++++++++++++++++ .../dts/mt7981b-gatonetworks-gdsp.dts | 377 ++++++++++++++++ .../filogic/base-files/etc/board.d/02_network | 4 + .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 5 + .../base-files/lib/upgrade/platform.sh | 1 + target/linux/mediatek/image/filogic.mk | 16 + 9 files changed, 897 insertions(+) create mode 100644 package/boot/uboot-mediatek/patches/457-initialized-the-watchdog-subsystem-later.patch create mode 100644 package/boot/uboot-mediatek/patches/458-add-GatoNetworks-GDSP.patch create mode 100644 target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index a38024de65..9de1a4d75d 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -86,6 +86,9 @@ zbtlink,zbt-z8103ax) 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|\ diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index ab08126b51..bb7ad0edef 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -364,6 +364,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 @@ -797,6 +810,7 @@ UBOOT_TARGETS := \ mt7981_abt_asr3000 \ mt7981_cmcc_rax3000m-emmc \ mt7981_cmcc_rax3000m-nand \ + mt7981_gatonetworks_gdsp \ mt7981_glinet_gl-x3000 \ mt7981_glinet_gl-xe3000 \ mt7981_h3c_magic-nx30-pro \ diff --git a/package/boot/uboot-mediatek/patches/457-initialized-the-watchdog-subsystem-later.patch b/package/boot/uboot-mediatek/patches/457-initialized-the-watchdog-subsystem-later.patch new file mode 100644 index 0000000000..652452c1dd --- /dev/null +++ b/package/boot/uboot-mediatek/patches/457-initialized-the-watchdog-subsystem-later.patch @@ -0,0 +1,59 @@ +From 9c1ad8a18ac1a20aee7a617964bcae3e90dac700 Mon Sep 17 00:00:00 2001 +From: Enrico Mioso +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 +--- + common/board_r.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/common/board_r.c b/common/board_r.c +index e6eab553e5..d5fe9a0d43 100644 +--- a/common/board_r.c ++++ b/common/board_r.c +@@ -651,19 +651,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, +@@ -678,7 +672,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, +@@ -707,6 +700,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, +-- +2.46.2 + diff --git a/package/boot/uboot-mediatek/patches/458-add-GatoNetworks-GDSP.patch b/package/boot/uboot-mediatek/patches/458-add-GatoNetworks-GDSP.patch new file mode 100644 index 0000000000..da53d741a7 --- /dev/null +++ b/package/boot/uboot-mediatek/patches/458-add-GatoNetworks-GDSP.patch @@ -0,0 +1,418 @@ +From 57d0f608d925cb688b5c9b71512fca7d228f07f6 Mon Sep 17 00:00:00 2001 +From: Enrico Mioso +Date: Wed, 23 Oct 2024 20:39:28 +0200 +Subject: [PATCH] add GatoNetworks GDSP + +Signed-off-by: Enrico Mioso +--- + 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 + +diff --git a/arch/arm/dts/mt7981-gatonetworks_gdsp.dts b/arch/arm/dts/mt7981-gatonetworks_gdsp.dts +new file mode 100644 +index 0000000000..8cb5547943 +--- /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 ++#include ++ ++/ { ++ #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 = ; ++ 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 = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-pd { ++ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; ++ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>; ++ status = "okay"; ++}; ++ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart2_pins>; ++ status = "okay"; ++}; +diff --git a/configs/mt7981_gatonetworks_gdsp_defconfig b/configs/mt7981_gatonetworks_gdsp_defconfig +new file mode 100644 +index 0000000000..f357e5b327 +--- /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 +diff --git a/gatonetworks_gdsp_env b/gatonetworks_gdsp_env +new file mode 100644 +index 0000000000..5af8d5b039 +--- /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= ( ( ( OpenWrt ) ) ) ++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 $ver" +-- +2.46.2 + diff --git a/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts new file mode 100644 index 0000000000..1c85167e25 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts @@ -0,0 +1,377 @@ +// 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; + 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"; + }; + + 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 = ; + 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 { + status = "okay"; + + mediatek,mtd-eeprom = <&factory 0x0>; + nvmem-cells = <&macaddr_wifi 0>; + 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>; + }; + + macaddr_wan: macaddr@24 { + reg = <0x24 0x6>; + }; + + macaddr_lan: macaddr@2a { + reg = <0x2a 0x6>; + }; + }; + }; + + partition@100000 { + label = "FIP"; + reg = <0x100000 0x0080000>; + read-only; + }; + + 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 = ; + bias-pull-up = ; + }; + + conf-pd { + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; + drive-strength = ; + bias-pull-down = ; + }; + }; +}; + +&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>; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index fff39006da..e1c0315fab 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -137,6 +137,10 @@ mediatek_setup_macs() bananapi,bpi-r4) wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1) ;; + gatonetworks,gdsp) + local factory_dev="/dev/mtd$(find_mtd_index "Factory")" + label_mac=$(get_mac_binary $factory_dev 0x4) + ;; h3c,magic-nx30-pro) wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr) lan_mac=$(macaddr_add "$wan_mac" 1) diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 3042858353..e94eb8880b 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -89,6 +89,11 @@ case "$board" in addr=$(mtd_get_mac_binary "Odm" 0x81) [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress ;; + gatonetworks,gdsp) + addr=$(get_mac_label) + [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress + ;; glinet,gl-mt6000|\ glinet,gl-x3000|\ glinet,gl-xe3000) diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 7fe2d29d31..fa4faf151b 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -111,6 +111,7 @@ platform_do_upgrade() { ;; cudy,re3000-v1|\ cudy,wr3000-v1|\ + gatonetworks,gdsp|\ yuncore,ax835) default_do_upgrade "$1" ;; diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 5dfde755a0..97837cf9c3 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -670,6 +670,22 @@ 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.bin + IMAGE_SIZE := 32768k + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware \ + kmod-usb-net-qmi-wwan uqmi kmod-usb3 kmod-usb-serial-option \ + -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 +endef +TARGET_DEVICES += gatonetworks_gdsp + define Device/glinet_gl-mt2500 DEVICE_VENDOR := GL.iNet DEVICE_MODEL := GL-MT2500