kiddin9 2 月之前
父節點
當前提交
c48e915148
共有 34 個文件被更改,包括 1889 次插入838 次删除
  1. 3 135
      README.md
  2. 12 3
      devices/common/patches/crontab.patch
  3. 134 0
      devices/common/patches/ucode.revert.patch
  4. 1 1
      devices/mediatek_filogic/diy.sh
  5. 0 269
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981-sl-3000.dts
  6. 56 3
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-emmc.dts
  7. 69 41
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dts
  8. 58 5
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-xr30-emmc.dts
  9. 64 40
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-xr30.dts
  10. 8 20
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-xr30.dtsi
  11. 0 20
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v2-mod.dts
  12. 256 0
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-newland-nl-wr8103.dts
  13. 282 0
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
  14. 92 42
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-sl-3000-emmc.dts
  15. 314 0
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-sl-3000.dts
  16. 217 0
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-umi-uax3000e.dts
  17. 0 2
      devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
  18. 13 18
      devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch
  19. 2 1
      devices/mediatek_filogic/patches/16-komi-a31.patch
  20. 0 24
      devices/mediatek_filogic/patches/20-ea0326gmp.patch
  21. 5 2
      devices/mediatek_filogic/patches/24-nradio-c8-660.patch
  22. 3 2
      devices/mediatek_filogic/patches/25-platform.patch
  23. 37 67
      devices/mediatek_filogic/patches/34-sl-3000.patch
  24. 105 0
      devices/mediatek_filogic/patches/99-newland.patch
  25. 0 63
      devices/mediatek_filogic/patches/F35SQA001G.patch
  26. 9 23
      devices/mediatek_filogic/patches/Winbond-NMBM-fix.patch
  27. 68 0
      devices/mediatek_filogic/patches/ax6s.patch
  28. 45 47
      devices/mediatek_filogic/patches/tr3000-mod.patch
  29. 13 0
      devices/qualcommax_ipq50xx/.config
  30. 2 4
      devices/qualcommax_ipq50xx/diy.sh
  31. 7 0
      devices/qualcommax_ipq60xx/.config
  32. 2 4
      devices/qualcommax_ipq60xx/diy.sh
  33. 0 2
      devices/qualcommax_ipq60xx/patches/fix.patch
  34. 12 0
      devices/qualcommax_ipq60xx/patches/zn-m2.patch

+ 3 - 135
README.md

@@ -1,148 +1,16 @@
 #### 一分钟在线编译定制专属固件: [openwrt.ai](https://openwrt.ai)
-#### 支持300+设备:
-X86/64, 友善 NanoPi、R2S、R4S、R4SE、R5S、R2C、R5C、R6S、NEO3, 斐讯 N1、K2P、K3, 树莓派 4B、3B/3B+、2B, 电犀牛r68s、r66s, 香橙派 R1 Plus、R1 Plus LTS, 红米AX6, 小米AX3600, 小米AX9000, 红米AX6000, 红米AX6S/小米AX3200, 红米AC2100, 小米AC2100, 斐讯K3,  360V6, 玩客云, 极路由 HIWIFI HC5962(极路由4、B70)、HC5661A、HC5761A、HC5861B, 小米4, 小米 R3G, 小米 R3P, newifi-d2 (新路由3), 小娱XY-C5, 竞斗云2.0(P&W R619AC), GL.iNet GL-MT1300、GL-AX1800、GL-AXT1800、GL-microuter-N300、GL-MT300N V2, 小米CR660X(CR6606/CR6608/CR6609), 小米4A千兆版, 小米 R3G-v2, 小米青春版Nano, 迅雷下载宝 timecloud, 优酷 yk-l2, 有华 wr1200js, 向日葵 X3A, 华硕 ASUS RT-ACRH17、RT-AC58u/RT-ACRH13、RT-ac85p、RT-n56u-b1、RT-AC88U、RT-AC1200、RT-AC1200 V2, 网件 NETGEAR R6220、R6260、R6120、R6700-v2、R6800、R6850、R6900-v2、R7450、wndr3700-v5, H1 Box, 贝壳云P1, 我家云lL Pro, x96 Max, 微加云V-Plus, 章鱼星球ZYXQ, GT-King, Odroid N2, MXQ Pro+, 京东无线宝JDCloud RE-SP-01B, Linksys WRT1200AC、WRT1900AC v1、WRT1900AC v2、WRT3200ACM、WRT1900ACS v1、WRT1900ACS v2、WRT32X、EA7500 v2 等
-
-[1]: https://img.shields.io/badge/license-GPLV2-brightgreen.svg
-[2]: /LICENSE
-[3]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
-[4]: https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/pulls
-[5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg
-[6]: https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/issues/new
-[7]: https://img.shields.io/github/v/release/hyird/Action-Openwrt
-[8]: https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/releases
-[10]: https://img.shields.io/badge/Contact-telegram-blue
-[11]: https://t.me/opwrt
-[12]: https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/actions/workflows/Openwrt-AutoBuild.yml/badge.svg
-[13]: https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/actions
-
-[![license][1]][2]
-[![GitHub Stars](https://img.shields.io/github/stars/kiddin9/OpenWrt_x86-r2s-r4s.svg?style=flat-square&label=Stars)](https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/stargazers)
-[![GitHub Forks](https://img.shields.io/github/forks/kiddin9/OpenWrt_x86-r2s-r4s.svg?style=flat-square&label=Forks)](https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/fork)
-[![PRs Welcome][3]][4]
-[![Issue Welcome][5]][6]
-[![AutoBuild][12]][13]
-
-<a href="https://t.me/opwrt" target="_blank">TG通知频道</a>
-## 1. **特色**
-
-+ Cutting edge,openwrt官方openwrt-23.05分支版本, Kernel 5.15, 与官方最新源码同步.
-
-+ 原生极致纯净,固件默认只包含基础上网功能, 后台在线选装插件,系统升级不丢失插件和配置.
-
-+ 自建插件仓库囊括了市面上几乎所有开源插件,插件库日更,系统自动更新所有已安装插件.
-
-+ 通过[openwrt.ai](https://openwrt.ai)在线定制专属固件, 无需任何专业知识, 一分钟生成. 同时支持github云编译.
-
-+ 后台一键OTA更新固件,省去了每次固件升级都需要找固件,下载固件,上传固件等繁琐操作.
-
-+ 后台一键设置旁路由,一键开关IPv6.
-
-+ 支持在线安装全部Kmod内核模块.
-
-+ 替换 Uhttpd 为 Nginx, 支持 反向代理; WebDAV等诸多玩法.
-
-+ 性能,友好度,易用性,插件,以及针对国内特殊环境等的自定义优化, 开箱即用
-
-## 2. **固件**
-
-固件生成有3种方式:在线定制化生成、GitHub编译、本地化编译。
-
-可根据需要选择任意一种进行固件生成。
-
-### 2.1 **在线生成**
-
-通过浏览器访问[https://openwrt.ai](https://openwrt.ai)进行固件定制,等待固件生成结束之后直接下载使用即可。
-
-### 2.2 **GitHub编译**
-
-+ 将仓库进行fork
-
-+ 按需添加相关环境参数REPO_TOKEN、SCKEY、TELEGRAM_CHAT_ID
-
-+ Actions页面选择 Repo Dispatcher 点击 Run workflow
-### 2.3 **GitHub结合浏览器插件编译**
-请在支持油猴的浏览器中安装 [脚本](https://greasyfork.org/scripts/407616-github-actions-trigger/code/Github%20Actions%20Trigger.user.js) ,仓库右上角会出现 x86_64 Actions,K2P Actions等按钮,点击对应按钮即可.更多玩法 [repo-dispatcher](https://github.com/tete1030/github-repo-dispatcher)
-
-## 3. **使用**
-
-### 3.1 **后台**
-
-+ 登录地址 op/ 或 10.0.0.1 (若后台无法打开,请尝试插拔交换wan、lan网线顺序。)
-
-+ 默认用户 root
-
-+ 默认密码 root
-
-### 3.2 **快捷访问**
-部分服务需要先自行在软件包中安装并启用,可自行在 /etc/nginx/conf.d/shortcuts.conf 中调整和添加更多快捷访问。
-
-+ op/ 可打开 OpenWRT后台 即 lan ip
-
-+ ql/ 可打开 青龙后台 即 lan ip:5700
-
-+ adg/ 可打开 AdGuardHome管理后台 即 lan ip:3000
-
-+ pve/ 可打开 Proxmox VE虚拟机管理 默认为 10.0.0.10:8006
-
-+ by/ 可打开 Bypass插件页面 即 ip/luci/admin/services/bypass
-
-+ pk/ 可打开 Packages插件管理页面 即 ip/luci/admin/system/opkg
-
-+ ag/ 可打开 Aria2 Web面板 即 ip/ariang
-
-+ ug/ 可打开 固件在线更新页面 即 ip/luci/admin/services/gpsysupgrade
-
-## 4. **注意事项**
-
-+ 第一次使用请采用全新安装,避免出现升级失败以及其他一些可能的Bug.
-
-+ 云编译需要 [在此](https://github.com/settings/tokens) 创建个token,然后在此仓库Settings->Secrets中添加个名字为REPO_TOKEN的Secret,填入token值,否者无法触发编译。
-
-+ 在仓库Settings->Secrets中分别添加 PPPOE_USERNAME, PPPOE_PASSWD 可设置默认拨号账号密码.有 [安全隐患](https://github.com/kiddin9/OpenWrt_x86-r2s-r4s/issues/23)。
-
-+ 在仓库Settings->Secrets中添加 SCKEY 可通过[Server酱](http://sc.ftqq.com) 推送编译结果到微信。
-
-+ 在仓库Settings->Secrets中添加 TELEGRAM_CHAT_ID, TELEGRAM_TOKEN 可推送编译结果到Telegram Bot. [教程](https://longnight.github.io/2018/12/12/Telegram-Bot-notifications)
-
-+ DIY云编译教程参考: [Read the details in my blog (in Chinese) | 中文教程](https://p3terx.com/archives/build-openwrt-with-github-actions.html)
-
-
-+ 默认插件包含: Opkg 软件包管理、Bypass 智能过墙、Samba4 文件共享(x86)、UPNP 自动端口转发、Turbo ACC 网络加速。
-其他插件请自行在 后台->软件包 中安装,系统升级不会丢失插件.每次系统升级完成连接网络后,会自动安装所有已自选安装的插件。
-
-## 5. **系统截图展示**
-![](https://github.com/kiddin9/luci-theme-edge/raw/master/Screenshots/1.png)
-![](https://github.com/kiddin9/luci-theme-edge/raw/master/Screenshots/3.png)
-![](https://github.com/kiddin9/luci-theme-edge/raw/master/Screenshots/8.png)
-
-
-------
-For English
-
-Build OpenWrt using GitHub Actions
-
-## Usage
-
-- Sign up for [GitHub Actions](https://github.com/features/actions/signup)
-- Fork [this GitHub repository](https://github.com/kiddin9/OpenWrt)
-- click the `Star` button, and the build will starts automatically.Progress can be viewed on the Actions page.
-- When the build is complete, click the `Artifacts` button in the upper right corner of the Actions page to download the binaries.
 
+### openwrt 软路由固件
 
 ## Acknowledgments
 
-#### Rockchip的Kernel等部分源码来源 https://github.com/coolsnowwolf/lede
-#### ipq807x的Kernel等部分源码来源 https://github.com/Boos4721/openwrt
-#### ipq60xx的Kernel等部分源码来源 https://github.com/coolsnowwolf/openwrt-gl-ax1800
-
 - [OpenWrt](https://github.com/openwrt/openwrt)
 - [Lean's OpenWrt](https://github.com/coolsnowwolf/lede)
 - [ImmortalWrt](https://github.com/immortalwrt/immortalwrt)
 - [unifreq](https://github.com/unifreq/openwrt_packit)
 - [ophub](https://github.com/ophub/amlogic-s9xxx-openwrt)
-- [P3TERX](https://github.com/P3TERX/Actions-OpenWrt/blob/master/LICENSE)
+- [hanwckf](https://github.com/hanwckf/immortalwrt-mt798x)
+- [P3TERX](https://github.com/P3TERX/Actions-OpenWrt)
 - [aparcar](https://github.com/openwrt/asu)
 - [GitHub](https://github.com)
 - [GitHub Actions](https://github.com/features/actions)
-
-

+ 12 - 3
devices/common/patches/crontab.patch

@@ -356,13 +356,11 @@ diff --git a/feeds/luci/modules/luci-mod-system/root/usr/share/luci/menu.d/luci-
 index ebae989d0e00..b4eba7862444 100644
 --- a/feeds/luci/modules/luci-mod-system/root/usr/share/luci/menu.d/luci-mod-system.json
 +++ b/feeds/luci/modules/luci-mod-system/root/usr/share/luci/menu.d/luci-mod-system.json
-@@ -98,6 +98,18 @@
+@@ -98,6 +98,16 @@
  		}
  	},
  
 +	"admin/system/crontabhelper": {
-+		"title": "Scheduled Tasks Helper",
-+		"order": 47,
 +		"action": {
 +			"type": "view",
 +			"path": "system/crontabhelper"
@@ -375,3 +373,14 @@ index ebae989d0e00..b4eba7862444 100644
  	"admin/system/mounts": {
  		"title": "Mount Points",
  		"order": 50,
+
+--- a/feeds/luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/crontab.js
++++ b/feeds/luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/crontab.js
+@@ -27,6 +27,7 @@ return view.extend({
+ 		return E([
+ 			E('h2', _('Scheduled Tasks')),
+ 			E('p', { 'class': 'cbi-section-descr' }, _('This is the system crontab in which scheduled tasks can be defined.')),
++			E('p', { 'class': 'cbi-section-descr' }, _('<a href="/cgi-bin/luci/admin/system/crontabhelper"> Scheduled Tasks Helper</a>')),
+ 			E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 25, 'disabled': isReadonlyView }, [ crontab != null ? crontab : '' ]))
+ 		]);
+ 	},

+ 134 - 0
devices/common/patches/ucode.revert.patch

@@ -0,0 +1,134 @@
+From 39972c47eb9e367ca8e8611b1d1de4669df2ff92 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <[email protected]>
+Date: Fri, 18 Jul 2025 12:22:10 +0200
+Subject: [PATCH] ucode: update to Git HEAD (2025-07-18)
+
+54b00e3b1fa9 ubus: fix double registry clear on disconnect
+69521b55855c ubus: fix use-after-free on deferred request reply() method
+f499de690c33 Merge pull request #298 from nbd168/ubus-fixes
+22e8c16d9deb debug: fix crash when passing tagged string to getinfo()
+2c9eea5174d6 ubus: use ucv_resource_create_ex for connections/channels
+0a4cf4b7e71a ubus: use ucv_resource_create_ex for for ubus.request resources
+99ee75a69cd3 ubus: use ucv_resource_create_ex for ubus.deferred resources
+f085a42b977f ubus: use ucv_resource_create_ex for objects
+94ad17d13a0d ubus: use ucv_resource_create_ex for ubus.notify resources
+a3fa47fdda3e ubus: use ucv_resource_create_ex for ubus.listener resources
+9ab5fa869dec ubus: use ucv_resource_create_ex for ubus.subscriber resources
+43dd5716db84 Merge pull request #300 from nbd168/ubus-gc
+be92ebd70633 CI: debian: install cmake package
+fd202fd40bd1 socket: respect port argument in sockinst.connect()
+767c209b917b socket: properly handle async `connect(2)` errors in socket.connect()
+37ac8f112af6 socket: improve port argument validation in sockinst.connect()
+5b3b6b789b9c ubus: fix refcount issue in uc_ubus_object_notify
+cdcd50ad0408 Merge pull request #305 from nbd168/ubus-fix
+f682ac2f6b82 program: add bytecode version to program header flags
+af411d8101b2 vm: implement PVAL opcode
+afdfffb61258 vm: support initiating method calls with I_CALL/I_QCALL opcodes
+5d680425db40 compiler: stop emitting I_MCALL/I_QMCALL opcodes
+a616feed39eb compiler, vm: rework optional chaining and function call semantics
+d29ec45ab107 Merge pull request #306 from jow-/optional-chaining-short-circuiting
+0946a4fb20b8 vm: adjust JMPNT opcode behavior
+6f8291f73757 compiler: improve assignment lhs expression checks
+22e1346a7bda Merge pull request #308 from jow-/compiler-lhs-check-fixes
+cf846c4a11d4 vm: properly handle modulo by zero
+4d81e6c13506 resolv: add documentation and fix clobbering ns strings
+20ee2dabd243 debian/changelog: v0.0.20250529
+82426d1a02e2 Merge pull request #314 from jow-/resolv-fix313
+50d303c8309d ubus: add support for automatically subscribing to objects
+fdbf73da4136 Merge pull request #312 from nbd168/ubus-subscribe
+5a0d21d59f88 vm: export function for converting exception to ucode value
+aaf712eb4fb4 uloop: add guard() function
+693af2b61b52 ubus: add guard() function
+
+Signed-off-by: Felix Fietkau <[email protected]>
+(cherry picked from commit c39a09686e3d562367ab3a47da6a005eebaf5ca2)
+---
+ package/utils/ucode/Makefile                  |  6 ++---
+ ...-double-registry-clear-on-disconnect.patch | 26 ------------------
+ ...er-free-on-deferred-request-reply-me.patch | 27 -------------------
+ 3 files changed, 3 insertions(+), 56 deletions(-)
+ delete mode 100644 package/utils/ucode/patches/010-ubus-fix-double-registry-clear-on-disconnect.patch
+ delete mode 100644 package/utils/ucode/patches/020-ubus-fix-use-after-free-on-deferred-request-reply-me.patch
+
+diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
+index ed155af02f3d60..8ae1b91c1f213a 100644
+--- a/package/utils/ucode/Makefile
++++ b/package/utils/ucode/Makefile
+@@ -12,9 +12,9 @@ PKG_RELEASE:=1
+ 
+ PKG_SOURCE_PROTO:=git
+ PKG_SOURCE_URL=https://github.com/jow-/ucode.git
+-PKG_SOURCE_DATE:=2025-05-11
+-PKG_SOURCE_VERSION:=d5b3a9dc1091dd28cf6f0f60cd34fc322ef27717
+-PKG_MIRROR_HASH:=cd8af9d5ac28e2530b56015a3f2fcf6f36062546cac8b23a5f7b75b367209b54
++PKG_SOURCE_DATE:=2025-07-18
++PKG_SOURCE_VERSION:=3f64c8089bf3ea4847c96b91df09fbfcaec19e1d
++PKG_MIRROR_HASH:=55fbff7c527e1fadbda2e038636f39419649841ee63a5f3cdb50b9714b13420c
+ PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
+ PKG_LICENSE:=ISC
+ 
+diff --git a/package/utils/ucode/patches/010-ubus-fix-double-registry-clear-on-disconnect.patch b/package/utils/ucode/patches/010-ubus-fix-double-registry-clear-on-disconnect.patch
+deleted file mode 100644
+index 70b6a99be7958b..00000000000000
+--- a/package/utils/ucode/patches/010-ubus-fix-double-registry-clear-on-disconnect.patch
++++ /dev/null
+@@ -1,26 +0,0 @@
+-From: Felix Fietkau <[email protected]>
+-Date: Fri, 9 May 2025 11:57:57 +0200
+-Subject: [PATCH] ubus: fix double registry clear on disconnect
+-
+-Set c->registry_index to -1 in order to ensure that the resource free path
+-does not clobber registry items of unrelated connections.
+-
+-Signed-off-by: Felix Fietkau <[email protected]>
+----
+-
+---- a/lib/ubus.c
+-+++ b/lib/ubus.c
+-@@ -2375,8 +2375,11 @@ uc_ubus_channel_disconnect_cb(struct ubu
+- 		c->ctx.sock.fd = -1;
+- 	}
+- 
+--	if (c->registry_index >= 0)
+--		connection_reg_clear(c->vm, c->registry_index);
+-+	if (c->registry_index >= 0) {
+-+		int idx = c->registry_index;
+-+		c->registry_index = -1;
+-+		connection_reg_clear(c->vm, idx);
+-+	}
+- }
+- 
+- static uc_value_t *
+diff --git a/package/utils/ucode/patches/020-ubus-fix-use-after-free-on-deferred-request-reply-me.patch b/package/utils/ucode/patches/020-ubus-fix-use-after-free-on-deferred-request-reply-me.patch
+deleted file mode 100644
+index 142595a5bdbb5e..00000000000000
+--- a/package/utils/ucode/patches/020-ubus-fix-use-after-free-on-deferred-request-reply-me.patch
++++ /dev/null
+@@ -1,27 +0,0 @@
+-From: Felix Fietkau <[email protected]>
+-Date: Mon, 12 May 2025 12:43:44 +0200
+-Subject: [PATCH] ubus: fix use-after-free on deferred request reply() method
+-
+-Hold a reference to the defer resource as long as it is still needed
+-
+-Signed-off-by: Felix Fietkau <[email protected]>
+----
+-
+---- a/lib/ubus.c
+-+++ b/lib/ubus.c
+-@@ -636,6 +636,7 @@ uc_ubus_call_user_cb(uc_ubus_deferred_t
+- 	uc_value_t *this, *func;
+- 
+- 	request_reg_get(defer->vm, defer->registry_index, &this, &func, NULL, NULL);
+-+	ucv_get(this);
+- 
+- 	if (ucv_is_callable(func)) {
+- 		uc_vm_stack_push(defer->vm, ucv_get(this));
+-@@ -648,6 +649,7 @@ uc_ubus_call_user_cb(uc_ubus_deferred_t
+- 	}
+- 
+- 	request_reg_clear(defer->vm, defer->registry_index);
+-+	ucv_put(this);
+- }
+- 
+- static void

+ 1 - 1
devices/mediatek_filogic/diy.sh

@@ -5,7 +5,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
 #bash $SHELL_FOLDER/../common/kernel_6.6.sh
 
-sed -i '/bootargs-.* = ".*root=\/dev\/fit0 rootwait";/d' target/linux/mediatek/dts/*
+sed -i -E -e 's/ ?root=\/dev\/fit0 rootwait//' -e "/rootdisk =/d" -e '/bootargs.* = ""/d' target/linux/mediatek/dts/*{qihoo-360t7,netcore-n60,h3c-magic-nx30-pro,jdcloud-re-cp-03,cmcc-rax3000m,jcg-q30-pro,tplink-tl-xdr*}.dts
 
 find target/linux/mediatek/filogic/base-files/ -type f -exec sed -i "s/-stock//g" {} \;
 find target/linux/mediatek/base-files/ -type f -exec sed -i "s/-stock//g" {} \;

+ 0 - 269
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981-sl-3000.dts

@@ -1,269 +0,0 @@
-/dts-v1/;
-#include "mt7981.dtsi"
-
-/ {
-	model = "SL-3000";
-	compatible = "sl,3000", "mediatek,mt7981";
-
-	chosen {
-		bootargs = "console=ttyS0,115200n1 loglevel=8 \
-			    earlycon=uart8250,mmio32,0x11002000 \
-			    root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
-	};
-
-	aliases {
-		led-boot = &status_red_led;
-		led-failsafe = &status_red_led;
-		led-running = &status_green_led;
-		led-upgrade = &status_blue_led;
-	};
-
-	memory {
-		reg = <0 0x40000000 0 0x20000000>;
-	};
-
-        leds {
-                compatible = "gpio-leds";
-
-                status_red_led: led-0 {
-                        label = "red:status";
-                        gpios = <&pio 10 GPIO_ACTIVE_LOW>;
-                };
-
-                status_green_led: led-1 {
-                        label = "green:status";
-                        gpios = <&pio 11 GPIO_ACTIVE_LOW>;
-                };
-
-                status_blue_led: led-2 {
-                        label = "blue:status";
-                        gpios = <&pio 12 GPIO_ACTIVE_LOW>;
-		};
-	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-		reset {
-			label = "reset";
-			linux,code = <KEY_RESTART>;
-			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-		};
-
-		mesh {
-			label = "mesh";
-			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
-			linux,code = <BTN_9>;
-			linux,input-type = <EV_SW>;
-		};
-	};
-};
-
-&uart0 {
-	status = "okay";
-};
-
-&watchdog {
-	status = "okay";
-};
-
-&eth {
-	status = "okay";
-
-	gmac0: mac@0 {
-		compatible = "mediatek,eth-mac";
-		reg = <0>;
-		phy-mode = "2500base-x";
-
-		fixed-link {
-			speed = <2500>;
-			full-duplex;
-			pause;
-		};
-	};
-	
-	gmac1: mac@1 {
-		compatible = "mediatek,eth-mac";
-		reg = <1>;
-		phy-mode = "2500base-x";
-
-		fixed-link {
-			speed = <2500>;
-			full-duplex;
-			pause;
-		};
-	};
-
-
-
-	mdio: mdio-bus {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-
-		switch@0 {
-			compatible = "mediatek,mt7531";
-			reg = <31>;
-			reset-gpios = <&pio 39 0>;
-
-			ports {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port@0 {
-					reg = <0>;
-					label = "lan1";
-				};
-
-				port@1 {
-					reg = <1>;
-					label = "lan2";
-				};
-
-				port@2 {
-					reg = <2>;
-					label = "lan3";
-				};
-
-				port@3 {
-					reg = <3>;
-					label = "wan";
-				};
-				
-				port@6 {
-					reg = <6>;
-					label = "cpu";
-					ethernet = <&gmac0>;
-					phy-mode = "2500base-x";
-
-					fixed-link {
-						speed = <2500>;
-						full-duplex;
-						pause;
-					};
-				};
-			};
-		};
-	};
-};
-
-&spi1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spic_pins>;
-	status = "disabled";
-};
-
-&spi2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi2_flash_pins>;
-	status = "okay";
-	spi_nor@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "jedec,spi-nor";
-		spi-cal-enable;
-		spi-cal-mode = "read-data";
-		spi-cal-datalen = <7>;
-		spi-cal-data = /bits/ 8 <
-			0x53 0x46 0x5F 0x42 0x4F 0x4F 0x54>; /* SF_BOOT */
-		spi-cal-addrlen = <1>;
-		spi-cal-addr = /bits/ 32 <0x0>;
-		reg = <0>;
-		spi-max-frequency = <52000000>;
-		spi-tx-bus-width = <4>;
-		spi-rx-bus-width = <4>;
-
-		partition@00000 {
-			label = "BL2";
-			reg = <0x00000 0x0100000>;
-		};
-		partition@100000 {
-			label = "Config";
-			reg = <0x100000 0x080000>;
-		};
-		partition@180000 {
-			label = "Factory";
-			reg = <0x180000 0x0200000>;
-		};
-		partition@380000 {
-			label = "FIP";
-			reg = <0x380000 0x0200000>;
-		};
-		partition@580000 {
-			label = "firmware";
-			reg = <0x580000 0x1900000>;
-		};
-		partition@1E80000 {
-			label = "Product";
-			reg = <0x1E80000 0x20000>;
-		};
-		partition@1EA0000 {
-			label = "Custom";
-			reg = <0x1EA0000 0x160000>;
-		};
-	};
-};
-
-&mmc0 {
-	bus-width = <8>;
-	cap-mmc-highspeed;
-	max-frequency = <52000000>;
-	no-sd;
-	no-sdio;
-	non-removable;
-	pinctrl-names = "default", "state_uhs";
-	pinctrl-0 = <&mmc0_pins_default>;
-	pinctrl-1 = <&mmc0_pins_uhs>;
-	vmmc-supply = <&reg_3p3v>;
-	non-removable;
-	status = "okay";
-};
-
-&pio {
-	spic_pins: spi1-pins {
-		mux {
-			function = "spi";
-			groups = "spi1_1";
-		};
-	};
-
-	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>;
-		};
-	};
-	
-	mmc0_pins_default: mmc0-pins-default {
-		mux {
-			function = "flash";
-			groups = "emmc_45";
-		};
-	};
-
-	mmc0_pins_uhs: mmc0-pins-uhs {
-		mux {
-			function = "flash";
-			groups = "emmc_45";
-		};
-	};
-};
-
-&wed {
-	dy_txbm_enable = "true";
-	dy_txbm_budget = <8>;
-	txbm_init_sz = <8>;
-	txbm_max_sz = <32>;
-	status = "okay";
-};

+ 56 - 3
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-emmc.dts

@@ -8,21 +8,69 @@
 	compatible = "cmcc,rax3000m-emmc", "mediatek,mt7981";
 
 	chosen {
-		bootargs = "root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
+		bootargs = "root=PARTLABEL=rootfs rootwait";
 	};
 };
 
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_2a>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	nvmem-cells = <&macaddr_factory_24>;
+	nvmem-cell-names = "mac-address";
+};
+
 &mmc0 {
 	bus-width = <8>;
+	cap-mmc-highspeed;
 	max-frequency = <26000000>;
-	no-sd;
-	no-sdio;
 	non-removable;
 	pinctrl-names = "default", "state_uhs";
 	pinctrl-0 = <&mmc0_pins_default>;
 	pinctrl-1 = <&mmc0_pins_uhs>;
 	vmmc-supply = <&reg_3p3v>;
+	#address-cells = <1>;
+	#size-cells = <0>;
 	status = "okay";
+
+	card@0 {
+		compatible = "mmc-card";
+		reg = <0>;
+
+		block {
+			compatible = "block-device";
+
+			partitions {
+				block-partition-factory {
+					partname = "factory";
+
+					nvmem-layout {
+						compatible = "fixed-layout";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						eeprom_factory_0: eeprom@0 {
+							reg = <0x0 0x1000>;
+						};
+
+						macaddr_factory_24: macaddr@24 {
+							compatible = "mac-base";
+							reg = <0x24 0x6>;
+							#nvmem-cell-cells = <1>;
+						};
+
+						macaddr_factory_2a: macaddr@2a {
+							compatible = "mac-base";
+							reg = <0x2a 0x6>;
+							#nvmem-cell-cells = <1>;
+						};
+					};
+				};
+			};
+		};
+	};
 };
 
 &pio {
@@ -40,3 +88,8 @@
 		};
 	};
 };
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+};

+ 69 - 41
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dts

@@ -12,15 +12,25 @@
 	};
 };
 
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_2a>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	nvmem-cells = <&macaddr_factory_24>;
+	nvmem-cell-names = "mac-address";
+};
+
 &spi0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&spi0_flash_pins>;
 	status = "okay";
 
-	spi_nand: flash@0 {
+	flash@0 {
+		compatible = "spi-nand";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "spi-nand";
 		reg = <0>;
 
 		spi-max-frequency = <52000000>;
@@ -31,59 +41,77 @@
 		mediatek,bmt-max-reserved-blocks = <64>;
 
 		partitions {
-					compatible = "fixed-partitions";
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "bl2";
+				reg = <0x00000 0x0100000>;
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u-boot-env";
+				reg = <0x100000 0x80000>;
+			};
+
+			factory: partition@180000 {
+				label = "factory";
+				reg = <0x180000 0x200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
 					#address-cells = <1>;
 					#size-cells = <1>;
 
-					partition@0 {
-						label = "bl2";
-						reg = <0x00000 0x0100000>;
-						read-only;
-					};
-
-					partition@100000 {
-						label = "u-boot-env";
-						reg = <0x100000 0x80000>;
-					};
-
-					factory: partition@180000 {
-						label = "factory";
-						reg = <0x180000 0x200000>;
-						read-only;
+					macaddr_factory_24: macaddr@24 {
+						compatible = "mac-base";
+						reg = <0x24 0x6>;
+						#nvmem-cell-cells = <1>;
 					};
 
-					partition@380000 {
-						label = "fip";
-						reg = <0x380000 0x200000>;
-						read-only;
-					};
-
-					partition@580000 {
-						label = "ubi";
-						reg = <0x580000 0x7200000>;
+					macaddr_factory_2a: macaddr@2a {
+						compatible = "mac-base";
+						reg = <0x2a 0x6>;
+						#nvmem-cell-cells = <1>;
 					};
+				};
+			};
+
+			partition@380000 {
+				label = "fip";
+				reg = <0x380000 0x200000>;
+				read-only;
+			};
+
+			partition@580000 {
+				label = "ubi";
+				reg = <0x580000 0x7200000>;
+			};
 		};
 	};
 };
 
 &pio {
 	spi0_flash_pins: spi0-pins {
-				mux {
-					function = "spi";
-					groups = "spi0", "spi0_wp_hold";
-				};
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
 
-				conf-pu {
-					pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-					drive-strength = <8>;
-					mediatek,pull-up-adv = <0>; /* bias-disable */
-				};
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <8>;
+			mediatek,pull-up-adv = <0>; /* bias-disable */
+		};
 
-				conf-pd {
-					pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-					drive-strength = <8>;
-					mediatek,pull-up-adv = <0>; /* bias-disable */
-				};
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <8>;
+			mediatek,pull-up-adv = <0>; /* bias-disable */
+		};
 	};
 };
 

+ 58 - 5
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-xr30-emmc.dts

@@ -4,25 +4,73 @@
 #include "mt7981b-cmcc-xr30.dtsi"
 
 / {
-	model = "CMCC XR30 eMMC version (RAX3000Z Enhanced version)";
+	model = "CMCC XR30 (eMMC version)";
 	compatible = "cmcc,xr30-emmc", "mediatek,mt7981";
 
 	chosen {
-		bootargs = "root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
+		bootargs = "root=PARTLABEL=rootfs rootwait";
 	};
 };
 
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_2a>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	nvmem-cells = <&macaddr_factory_24>;
+	nvmem-cell-names = "mac-address";
+};
+
 &mmc0 {
 	bus-width = <8>;
-	max-frequency = <26000000>;
-	no-sd;
-	no-sdio;
+	cap-mmc-highspeed;
+	max-frequency = <52000000>;
 	non-removable;
 	pinctrl-names = "default", "state_uhs";
 	pinctrl-0 = <&mmc0_pins_default>;
 	pinctrl-1 = <&mmc0_pins_uhs>;
 	vmmc-supply = <&reg_3p3v>;
+	#address-cells = <1>;
+	#size-cells = <0>;
 	status = "okay";
+
+	card@0 {
+		compatible = "mmc-card";
+		reg = <0>;
+
+		block {
+			compatible = "block-device";
+
+			partitions {
+				block-partition-factory {
+					partname = "factory";
+
+					nvmem-layout {
+						compatible = "fixed-layout";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						eeprom_factory_0: eeprom@0 {
+							reg = <0x0 0x1000>;
+						};
+
+						macaddr_factory_24: macaddr@24 {
+							compatible = "mac-base";
+							reg = <0x24 0x6>;
+							#nvmem-cell-cells = <1>;
+						};
+
+						macaddr_factory_2a: macaddr@2a {
+							compatible = "mac-base";
+							reg = <0x2a 0x6>;
+							#nvmem-cell-cells = <1>;
+						};
+					};
+				};
+			};
+		};
+	};
 };
 
 &pio {
@@ -40,3 +88,8 @@
 		};
 	};
 };
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+};

+ 64 - 40
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-xr30.dts

@@ -12,12 +12,22 @@
 	};
 };
 
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_2a>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	nvmem-cells = <&macaddr_factory_24>;
+	nvmem-cell-names = "mac-address";
+};
+
 &spi0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&spi0_flash_pins>;
 	status = "okay";
 
-	spi_nand: flash@0 {
+	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "spi-nand";
@@ -31,59 +41,73 @@
 		mediatek,bmt-max-reserved-blocks = <64>;
 
 		partitions {
-					compatible = "fixed-partitions";
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "bl2";
+				reg = <0x00000 0x0100000>;
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u-boot-env";
+				reg = <0x100000 0x80000>;
+			};
+
+			factory: partition@180000 {
+				label = "factory";
+				reg = <0x180000 0x200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
 					#address-cells = <1>;
 					#size-cells = <1>;
 
-					partition@0 {
-						label = "bl2";
-						reg = <0x00000 0x0100000>;
-						read-only;
+					macaddr_factory_24: macaddr@24 {
+						reg = <0x24 0x6>;
 					};
 
-					partition@100000 {
-						label = "u-boot-env";
-						reg = <0x100000 0x80000>;
-					};
-
-					factory: partition@180000 {
-						label = "factory";
-						reg = <0x180000 0x200000>;
-						read-only;
-					};
-
-					partition@380000 {
-						label = "fip";
-						reg = <0x380000 0x200000>;
-						read-only;
-					};
-
-					partition@580000 {
-						label = "ubi";
-						reg = <0x580000 0x7200000>;
+					macaddr_factory_2a: macaddr@2a {
+						reg = <0x2a 0x6>;
 					};
+				};
+			};
+
+			partition@380000 {
+				label = "fip";
+				reg = <0x380000 0x200000>;
+				read-only;
+			};
+
+			partition@580000 {
+				label = "ubi";
+				reg = <0x580000 0x7200000>;
+			};
 		};
 	};
 };
 
 &pio {
 	spi0_flash_pins: spi0-pins {
-				mux {
-					function = "spi";
-					groups = "spi0", "spi0_wp_hold";
-				};
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
 
-				conf-pu {
-					pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-					drive-strength = <8>;
-					mediatek,pull-up-adv = <0>; /* bias-disable */
-				};
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <8>;
+			mediatek,pull-up-adv = <0>; /* bias-disable */
+		};
 
-				conf-pd {
-					pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-					drive-strength = <8>;
-					mediatek,pull-up-adv = <0>; /* bias-disable */
-				};
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <8>;
+			mediatek,pull-up-adv = <0>; /* bias-disable */
+		};
 	};
 };
 

+ 8 - 20
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cmcc-xr30.dtsi

@@ -6,14 +6,10 @@
 /dts-v1/;
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
-#include <dt-bindings/leds/common.h>
 
 #include "mt7981.dtsi"
 
 / {
-	model = "CMCC XR30";
-	compatible = "cmcc,xr30", "mediatek,mt7981";
-
 	aliases {
 		led-boot = &red_led;
 		led-failsafe = &red_led;
@@ -22,7 +18,7 @@
 		serial0 = &uart0;
 	};
 
-	chosen {
+	chosen: chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
@@ -47,25 +43,17 @@
 		};
 	};
 
-	gpio-leds {
+	leds {
 		compatible = "gpio-leds";
 
-		white_led: led-0 {
-			function = LED_FUNCTION_STATUS;
-			color = <LED_COLOR_ID_WHITE>;
+		red_led: red {
+			label = "red:status";
 			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
 		};
 
-		led-1 {
-			function = LED_FUNCTION_STATUS;
-			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
-		};
-
-		red_led: led-2 {
-			function = LED_FUNCTION_STATUS;
-			color = <LED_COLOR_ID_RED>;
-			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+		white_led: white {
+			label = "white:status";
+			gpios = <&pio 34 GPIO_ACTIVE_LOW>;
 		};
 	};
 };
@@ -157,4 +145,4 @@
 
 &xhci {
 	status = "okay";
-};
+};

+ 0 - 20
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v2-mod.dts

@@ -1,20 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-
-/dts-v1/;
-#include "mt7981b-cudy-tr3000-v1.dts"
-
-/ {
-	model = "Cudy TR3000 v2 256MB";
-	compatible = "cudy,tr3000-v2-mod", "mediatek,mt7981";
-};
-
-&spi0 {
-	flash@0 {
-		partitions {
-			partition@5c0000 {
-				label = "ubi";
-				reg = <0x5c0000 0xe280000>;
-			};
-		};
-	};
-};

+ 256 - 0
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-newland-nl-wr8103.dts

@@ -0,0 +1,256 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include "mt7981.dtsi"
+
+/ {
+	model = "Newland NL-WR8103";
+	compatible = "newland,nl-wr8103", "mediatek,mt7981";
+
+	aliases {
+		led-boot = &red_led;
+		led-failsafe = &red_led;
+		led-running = &green_led;
+		led-upgrade = &green_led;
+		label-mac-device = &gmac1;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@40000000 {
+		reg = <0 0x40000000 0 0x10000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		button-mesh {
+			label = "mesh";
+			linux,code = <BTN_9>;
+			linux,input-type = <EV_SW>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+		};
+
+		button-reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		green_led: led-0 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
+		};
+
+		red_led: led-2 {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+	status = "okay";
+
+	gmac0: mac@0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+
+		nvmem-cells = <&macaddr_factory_4 0>;
+		nvmem-cell-names = "mac-address";
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+
+	gmac1: mac@1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+
+		nvmem-cells = <&macaddr_factory_4 2>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&mdio_bus {
+	switch: switch@1f {
+		compatible = "mediatek,mt7531";
+		reg = <31>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand: flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+                mediatek,nmbm;
+                mediatek,bmt-max-ratio = <1>;
+                mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "BL2";
+				reg = <0x0 0x100000>;
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u-boot-env";
+				reg = <0x100000 0x80000>;
+			};
+
+			partition@180000 {
+				label = "Factory";
+				reg = <0x180000 0x200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom@0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_factory_4: macaddr@4 {
+						compatible = "mac-base";
+						reg = <0x4 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+
+					macaddr_factory_a: macaddr@a {
+						compatible = "mac-base";
+						reg = <0xa 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition@380000 {
+				label = "FIP";
+				reg = <0x380000 0x200000>;
+				read-only;
+			};
+
+			partition@580000 {
+				label = "ubi";
+				reg = <0x580000 0x7200000>;
+			};
+		};
+	};
+};
+
+&switch {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			label = "lan1";
+		};
+
+		port@1 {
+			reg = <1>;
+			label = "lan2";
+		};
+
+		port@2 {
+			reg = <2>;
+			label = "lan3";
+		};
+
+		port@6 {
+			reg = <6>;
+			ethernet = <&gmac0>;
+			phy-mode = "2500base-x";
+
+			fixed-link {
+				speed = <2500>;
+				full-duplex;
+				pause;
+			};
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+};

+ 282 - 0
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts

@@ -0,0 +1,282 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "mt7981.dtsi"
+
+/ {
+	model = "Nokia EA0326GMP";
+	compatible = "nokia,ea0326gmp", "mediatek,mt7981";
+
+	aliases {
+		serial0 = &uart0;
+
+		led-boot = &led_power;
+		led-failsafe = &led_power;
+		led-running = &led_power;
+		led-upgrade = &led_power;
+		label-mac-device = &gmac1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0 0x40000000 0 0x10000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_power: power {
+			label = "green:power";
+			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_green {
+			label = "green:wan";
+			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_red {
+			label = "red:wan";
+			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
+		};
+
+		lan {
+			label = "green:lan";
+			gpios = <&pio 7 GPIO_ACTIVE_LOW>;
+		};
+
+		wifi {
+			label = "green:wifi";
+			gpios = <&pio 8 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		wps {
+			label = "green:wps";
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac@0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+
+		nvmem-cells = <&macaddr_factory_28 0>;
+		nvmem-cell-names = "mac-address";
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+
+	gmac1: mac@1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+
+		nvmem-cells = <&macaddr_factory_28 3>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&mdio_bus {
+	switch: switch@0 {
+		compatible = "mediatek,mt7531";
+		reg = <31>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand@0 {
+		compatible = "spi-nand";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "BL2";
+				reg = <0x0000000 0x0100000>;
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u-boot-env";
+				reg = <0x0100000 0x0080000>;
+			};
+
+			factory: partition@180000 {
+				label = "Factory";
+				reg = <0x0180000 0x0200000>;
+				read-only;
+			};
+
+			partition@380000 {
+				label = "FIP";
+				reg = <0x0380000 0x0200000>;
+				read-only;
+			};
+
+			partition@580000 {
+				label = "Config";
+				reg = <0x0580000 0x0200000>;
+				read-only;
+			};
+
+			partition@780000 {
+				label = "Config2";
+				reg = <0x0780000 0x0200000>;
+				read-only;
+			};
+
+			partition@980000 {
+				compatible = "linux,ubi";
+				label = "ubi";
+				reg = <0x980000 0x6e00000>;
+
+				volumes {
+					ubi_rootdisk: ubi-volume-fit {
+						volname = "fit";
+					};
+				};
+			};
+		};
+	};
+};
+
+&switch {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@1 {
+			reg = <1>;
+			label = "lan1";
+		};
+
+		port@2 {
+			reg = <2>;
+			label = "lan2";
+		};
+
+		port@3 {
+			reg = <3>;
+			label = "lan3";
+		};
+
+		port@6 {
+			reg = <6>;
+			label = "cpu";
+			ethernet = <&gmac0>;
+			phy-mode = "2500base-x";
+
+			fixed-link {
+				speed = <2500>;
+				full-duplex;
+				pause;
+			};
+		};
+	};
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <8>;
+			mediatek,pull-up-adv = <0>; /* bias-disable */
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <8>;
+			mediatek,pull-up-adv = <0>; /* bias-disable */
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	status = "okay";
+
+	mediatek,mtd-eeprom = <&factory 0x0>;
+	nvmem-cells = <&macaddr_factory_28 1>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	nvmem-layout {
+		compatible = "fixed-layout";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		macaddr_factory_28: macaddr@28 {
+			compatible = "mac-base";
+			reg = <0x28 0x6>;
+			#nvmem-cell-cells = <1>;
+		};
+	};
+};

+ 92 - 42
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981-sl-3000-emmc.dts → devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-sl-3000-emmc.dts

@@ -1,29 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
 #include "mt7981.dtsi"
 
 / {
-	model = "SL-3000 eMMC bootstrap version";
+	model = "SL-3000 eMMC bootstrap versions";
 	compatible = "sl,3000-emmc", "mediatek,mt7981";
 
-	chosen {
-		bootargs = "console=ttyS0,115200n1 loglevel=8 \
-			    earlycon=uart8250,mmio32,0x11002000 \
-			    root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
-	};
-
 	aliases {
+		serial0 = &uart0;
 		led-boot = &status_red_led;
 		led-failsafe = &status_red_led;
 		led-running = &status_green_led;
 		led-upgrade = &status_blue_led;
 	};
 
-	memory {
+	chosen {
+		bootargs = "root=PARTLABEL=rootfs rootwait";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
 	};
 
-        leds {
-                compatible = "gpio-leds";
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		button-mesh {
+			label = "mesh";
+			linux,code = <BTN_9>;
+			linux,input-type = <EV_SW>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+		};
+
+		button-reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
 
                 status_red_led: led-0 {
                         label = "red:status";
@@ -40,30 +63,6 @@
                         gpios = <&pio 12 GPIO_ACTIVE_LOW>;
 		};
 	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-		reset {
-			label = "reset";
-			linux,code = <KEY_RESTART>;
-			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-		};
-
-		mesh {
-			label = "mesh";
-			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
-			linux,code = <BTN_9>;
-			linux,input-type = <EV_SW>;
-		};
-	};
-};
-
-&uart0 {
-	status = "okay";
-};
-
-&watchdog {
-	status = "okay";
 };
 
 &eth {
@@ -146,13 +145,6 @@
 	};
 };
 
-&xhci {
-	mediatek,u3p-dis-msk = <0x0>;
-	phys = <&u2port0 PHY_TYPE_USB2>,
-		   <&u3port0 PHY_TYPE_USB3>;
-	status = "okay";
-};
-
 &mmc0 {
 	bus-width = <8>;
 	cap-mmc-highspeed;
@@ -164,8 +156,38 @@
 	pinctrl-0 = <&mmc0_pins_default>;
 	pinctrl-1 = <&mmc0_pins_uhs>;
 	vmmc-supply = <&reg_3p3v>;
-	non-removable;
 	status = "okay";
+
+	card@0 {
+		compatible = "mmc-card";
+		reg = <0>;
+
+		block {
+			compatible = "block-device";
+
+			partitions {
+				block-partition-factory {
+					partname = "factory";
+
+					nvmem-layout {
+						compatible = "fixed-layout";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						eeprom_factory_0: eeprom@0 {
+							reg = <0x0 0x1000>;
+						};
+
+						macaddr_factory_4: macaddr@4 {
+							compatible = "mac-base";
+							reg = <0x4 0x6>;
+							#nvmem-cell-cells = <1>;
+						};
+					};
+				};
+			};
+		};
+	};
 };
 
 &pio {
@@ -183,3 +205,31 @@
 		};
 	};
 };
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+
+	band@1 {
+		reg = <1>;
+		nvmem-cells = <&macaddr_factory_4 1>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};

+ 314 - 0
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-sl-3000.dts

@@ -0,0 +1,314 @@
+/dts-v1/;
+
+#include "mt7981.dtsi"
+
+/ {
+	model = "SL-3000";
+	compatible = "sl,3000", "mediatek,mt7981";
+
+	aliases {
+		led-boot = &led_run;
+		led-failsafe = &led_blue;
+		led-running = &led_green;
+		led-upgrade = &led_blue;
+		serial0 = &uart0;
+		label-mac-device = &wan;
+	};
+
+	chosen {
+	        bootargs = "root=PARTLABEL=rootfs rootwait";
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_run: RGB_RED {
+			label = "RGB_RED";
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+		led_green: RGB_GREEN {
+			label = "RGB_GREEN";
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+
+		led_blue: RGB_BLUE {
+			label = "RGB_BLUE";
+			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
+
+	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;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+
+	status = "okay";
+
+	gmac0: mac@0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+		nvmem-cells = <&macaddr_factory_4 (-1)>;
+		nvmem-cell-names = "mac-address";
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+};
+
+&mdio_bus {
+	switch0: switch@1f {
+		compatible = "mediatek,mt7531";
+		reg = <31>;
+		dsa,member = <0 0>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
+&switch0 {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			label = "lan1";
+		};
+
+		port@1 {
+			reg = <1>;
+			label = "lan2";
+		};
+
+		port@2 {
+			reg = <2>;
+			label = "lan3";
+		};
+
+		wan: port@3 {
+			reg = <3>;
+			label = "wan";
+			nvmem-cells = <&macaddr_factory_4 (-2)>;
+			nvmem-cell-names = "mac-address";
+		};
+
+		port@6 {
+			reg = <6>;
+			ethernet = <&gmac0>;
+			phy-mode = "2500base-x";
+
+			fixed-link {
+				speed = <2500>;
+				full-duplex;
+				pause;
+			};
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&mmc0_pins_default>;
+	pinctrl-1 = <&mmc0_pins_uhs>;
+	bus-width = <8>;
+	max-frequency = <52000000>;
+	cap-mmc-highspeed;
+	vmmc-supply = <&reg_3p3v>;
+	non-removable;
+	status = "okay";
+};
+
+&spi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2_flash_pins>;
+	status = "okay";
+
+	spi_nor@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <52000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@00000 {
+				label = "BL2";
+				reg = <0x00000 0x0100000>;
+			};
+			partition@100000 {
+				label = "u-boot-env";
+				reg = <0x0100000 0x0080000>;
+			};
+			factory: partition@180000 {
+				label = "Factory";
+				reg = <0x180000 0x0200000>;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_factory_4: macaddr@4 {
+						compatible = "mac-base";
+						reg = <0x4 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+			partition@380000 {
+				label = "FIP";
+				reg = <0x380000 0x0200000>;
+			};
+			partition@580000 {
+				label = "firmware";
+				reg = <0x580000 0x1900000>;
+			};
+			partition@1e80000 {
+				label = "Product";
+				reg = <0x1e80000 0x20000>;
+			};
+			partition@1ea0000 {
+				label = "Custom";
+				reg = <0x1ea0000 0x160000>;
+			};
+		};
+	};
+};
+
+&pio {
+	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>;
+		};
+	};
+
+	mmc0_pins_default: mmc0-pins-default {
+		mux {
+			function = "flash";
+			groups = "emmc_45";
+		};
+
+		conf-cmd-dat {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
+				"SPI0_CS",  "SPI0_HOLD", "SPI0_WP",
+				"SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
+			input-enable;
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+
+		conf-clk {
+			pins = "SPI1_CS";
+			drive-strength = <MTK_DRIVE_6mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+		};
+
+		conf-rst {
+			pins = "PWM0";
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+	};
+
+	mmc0_pins_uhs: mmc0-pins-uhs {
+		mux {
+			function = "flash";
+			groups = "emmc_45";
+		};
+
+		conf-cmd-dat {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
+				"SPI0_CS",  "SPI0_HOLD", "SPI0_WP",
+				"SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
+			input-enable;
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+
+		conf-clk {
+			pins = "SPI1_CS";
+			drive-strength = <MTK_DRIVE_6mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+		};
+
+		conf-rst {
+			pins = "PWM0";
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+	};
+};
+
+&wifi {
+	mediatek,mtd-eeprom = <&factory 0x0>;
+
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};

+ 217 - 0
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-umi-uax3000e.dts

@@ -0,0 +1,217 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981.dtsi"
+
+/ {
+	model = "UMI UAX3000E eMMC version";
+	compatible = "umi,uax3000e", "mediatek,mt7981";
+
+	chosen {
+		bootargs = "root=PARTLABEL=rootfs rootwait";
+		stdout-path = "serial0:115200n8";
+	};
+
+	aliases {
+		led-boot = &red_led;
+		led-failsafe = &red_led;
+		led-running = &green_led;
+		led-upgrade = &blue_led;
+		serial0 = &uart0;
+	};
+
+	memory {
+		reg = <0 0x40000000 0 0x40000000>;
+	};
+
+        gpio-leds {
+                compatible = "gpio-leds";
+
+                red_led: led-0 {
+                        label = "red:power";
+                        gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+                };
+
+                green_led: led-1 {
+                        label = "green:wan";
+                        gpios = <&pio 34 GPIO_ACTIVE_LOW>;
+                };
+                
+		blue_led: led-2 {
+			label = "blue:status";
+			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac@0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+
+
+	gmac1: mac@1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+	};
+};
+
+&mdio_bus {
+	switch: switch@1f {
+		compatible = "mediatek,mt7531";
+		reg = <31>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
+&switch {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			label = "lan1";
+		};
+
+		port@1 {
+			reg = <1>;
+			label = "lan2";
+		};
+
+		port@2 {
+			reg = <2>;
+			label = "lan3";
+		};
+
+		port@6 {
+			reg = <6>;
+			ethernet = <&gmac0>;
+			phy-mode = "2500base-x";
+
+			fixed-link {
+				speed = <2500>;
+				full-duplex;
+				pause;
+			};
+		};
+	};
+};
+
+&mmc0 {
+	bus-width = <8>;
+	cap-mmc-highspeed;
+	max-frequency = <52000000>;
+	no-sd;
+	no-sdio;
+	non-removable;
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&mmc0_pins_default>;
+	pinctrl-1 = <&mmc0_pins_uhs>;
+	vmmc-supply = <&reg_3p3v>;
+	status = "okay";
+
+	card@0 {
+		compatible = "mmc-card";
+		reg = <0>;
+
+		block {
+			compatible = "block-device";
+
+			partitions {
+				block-partition-factory {
+					partname = "factory";
+
+					nvmem-layout {
+						compatible = "fixed-layout";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						eeprom_factory_0: eeprom@0 {
+							reg = <0x0 0x1000>;
+						};
+
+						macaddr_factory_24: macaddr@24 {
+							compatible = "mac-base";
+							reg = <0x24 0x6>;
+							#nvmem-cell-cells = <1>;
+						};
+						
+						macaddr_factory_0a: macaddr@0a {
+							compatible = "mac-base";
+							reg = <0x0a 0x6>;
+							#nvmem-cell-cells = <1>;
+						};
+					};
+				};
+			};
+		};
+	};
+};
+
+&pio {
+	mmc0_pins_default: mmc0-pins-default {
+		mux {
+			function = "flash";
+			groups = "emmc_45";
+		};
+	};
+
+	mmc0_pins_uhs: mmc0-pins-uhs {
+		mux {
+			function = "flash";
+			groups = "emmc_45";
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+};

+ 0 - 2
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts

@@ -21,8 +21,6 @@
 	};
 
 	chosen {
-		bootargs = "root=/dev/fit0 rootwait";
-		rootdisk = <&ubi_rootdisk>;
 		stdout-path = "serial0:115200n8";
 	};
 

+ 13 - 18
devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch

@@ -10,36 +10,28 @@
  	h3c,magic-nx30-pro|\
  	nokia,ea0326gmp|\
  	zbtlink,zbt-z8103ax)
-@@ -137,6 +137,12 @@ mediatek_setup_macs()
- 	bananapi,bpi-r4)
- 		wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
- 		;;
-+	cmcc,rax3000m-emmc|\
-+	cmcc,xr30-emmc)
-+		wan_mac=$(mmc_get_mac_binary factory 0x2a)
-+		lan_mac=$(mmc_get_mac_binary factory 0x24)
-+		label_mac=$wan_mac
-+		;;
- 	h3c,magic-nx30-pro)
- 		wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
- 		lan_mac=$(macaddr_add "$wan_mac" 1)
 
 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
 +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
-@@ -13,6 +13,9 @@ case "$FIRMWARE" in
+@@ -13,9 +13,14 @@ case "$FIRMWARE" in
  		ln -sf /tmp/tp_data/MT7981_EEPROM.bin \
  			/lib/firmware/$FIRMWARE
  		;;
-+	cmcc,rax3000m-emmc|\
-+	cmcc,xr30-emmc|\
-+	sl,3000-emmc|\
++        sl,3000-emmc|\
++        umi,uax3000e|\
  	ubnt,unifi-6-plus)
  		caldata_extract_mmc "factory" 0x0 0x1000
  		;;
++        sl,3000)
++		caldata_extract_mtd "Factory" 0x0 0x1000
++		;;
+ 	esac
+ 	;;
+ "mediatek/mt7986_eeprom_mt7975_dual.bin")
 
 --- a/target/linux/mediatek/image/filogic.mk
 +++ b/target/linux/mediatek/image/filogic.mk
-@@ -280,7 +280,64 @@ define Device/cmcc_rax3000m
+@@ -280,7 +280,67 @@ define Device/cmcc_rax3000m
    ARTIFACT/nand-preloader.bin := mt7981-bl2 spim-nand-ddr4
    ARTIFACT/nand-bl31-uboot.fip := mt7981-bl31-uboot cmcc_rax3000m-nand
  endef
@@ -70,6 +62,9 @@
 +  DEVICE_DTS_DIR := ../dts
 +  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
 +	e2fsprogs f2fsck mkf2fs losetup kmod-fs-f2fs kmod-mmc
++  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
++  KERNEL_INITRAMFS := kernel-bin | lzma | \
++	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 +endef
 +TARGET_DEVICES += cmcc_rax3000m-emmc

+ 2 - 1
devices/mediatek_filogic/patches/16-komi-a31.patch

@@ -271,12 +271,13 @@ diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/t
 index b5e5eca6afd12..33e52743d5bfe 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
-@@ -40,6 +40,8 @@
+@@ -40,6 +40,9 @@
  	abt,asr3000|\
  	cmcc,rax3000m*|\
  	cmcc,xr30*|\
 +	konka,komi-a31|\
 +	imou,lc-hx3001|\
++	umi,uax3000e|\
  	h3c,magic-nx30-pro|\
  	zbtlink,zbt-z8103ax)
  		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1

+ 0 - 24
devices/mediatek_filogic/patches/20-ea0326gmp.patch

@@ -21,27 +21,3 @@
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  endef
  TARGET_DEVICES += nokia_ea0326gmp
- 
-
---- a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
-+++ b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
-@@ -164,6 +164,10 @@
- 		spi-tx-bus-width = <4>;
- 		spi-rx-bus-width = <4>;
- 
-+		mediatek,nmbm;
-+		mediatek,bmt-max-ratio = <1>;
-+		mediatek,bmt-max-reserved-blocks = <64>;
-+
- 		partitions {
- 			compatible = "fixed-partitions";
- 			#address-cells = <1>;
-@@ -223,7 +227,7 @@
- 			partition@980000 {
- 				compatible = "linux,ubi";
- 				label = "ubi";
--				reg = <0x980000 0x7680000>;
-+				reg = <0x980000 0x6e00000>;
- 
- 				volumes {
- 					ubi_rootdisk: ubi-volume-fit {

+ 5 - 2
devices/mediatek_filogic/patches/24-nradio-c8-660.patch

@@ -89,13 +89,16 @@
 
 --- a/package/boot/uboot-envtools/files/mediatek_filogic
 +++ b/package/boot/uboot-envtools/files/mediatek_filogic
-@@ -60,7 +60,8 @@ glinet,gl-mt2500|\
+@@ -60,7 +60,11 @@ glinet,gl-mt2500|\
  glinet,gl-mt6000|\
  glinet,gl-x3000|\
  glinet,gl-xe3000|\
 -huasifei,wh3000)
 +huasifei,wh3000|\
-+nradio,c8-668gl)
++nradio,c8-668gl|\
++sl,3000|\
++sl,3000-emmc|\
++umi,uax3000e)
  	local envdev=$(find_mmc_part "u-boot-env")
  	ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
  	;;

+ 3 - 2
devices/mediatek_filogic/patches/25-platform.patch

@@ -1,6 +1,6 @@
 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
-@@ -66,30 +66,18 @@ platform_do_upgrade() {
+@@ -66,31 +66,19 @@ platform_do_upgrade() {
  	local board=$(board_name)
  
  	case "$board" in
@@ -11,6 +11,7 @@
  	bananapi,bpi-r4-poe|\
  	cmcc,a10-ubootmod|\
 -	cmcc,rax3000m|\
+ 	cudy,tr3000-v1-ubootmod|\
  	gatonetworks,gdsp|\
 -	h3c,magic-nx30-pro|\
 -	jcg,q30-pro|\
@@ -31,7 +32,7 @@
  	xiaomi,mi-router-ax3000t-ubootmod|\
  	xiaomi,redmi-router-ax6000-ubootmod|\
  	xiaomi,mi-router-wr30u-ubootmod|\
-@@ -160,13 +148,6 @@ platform_do_upgrade() {
+@@ -169,13 +157,6 @@ platform_do_upgrade() {
  			;;
  		esac
  		;;

+ 37 - 67
devices/mediatek_filogic/patches/34-sl-3000.patch

@@ -8,10 +8,10 @@
 +define Device/sl_3000
 +  DEVICE_VENDOR := SL
 +  DEVICE_MODEL := 3000
-+  DEVICE_DTS := mt7981-sl-3000
++  DEVICE_DTS := mt7981b-sl-3000
 +  DEVICE_DTS_DIR := ../dts
 +  SUPPORTED_DEVICES := sl,3000
-+  DEVICE_PACKAGES := $(MT7981_USB_PKGS) f2fsck losetup mkf2fs kmod-fs-f2fs kmod-mmc
++  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware f2fsck losetup mkf2fs kmod-fs-f2fs kmod-mmc
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 +endef
 +TARGET_DEVICES += sl_3000
@@ -19,10 +19,10 @@
 +define Device/sl_3000-emmc
 +  DEVICE_VENDOR := SL
 +  DEVICE_MODEL := 3000 eMMC
-+  DEVICE_DTS := mt7981-sl-3000-emmc
++  DEVICE_DTS := mt7981b-sl-3000-emmc
 +  DEVICE_DTS_DIR := ../dts
 +  SUPPORTED_DEVICES := sl,3000-emmc
-+  DEVICE_PACKAGES := $(MT7981_USB_PKGS) f2fsck losetup mkf2fs kmod-fs-f2fs kmod-mmc
++  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware f2fsck losetup mkf2fs kmod-fs-f2fs kmod-mmc
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 +endef
 +TARGET_DEVICES += sl_3000-emmc
@@ -45,85 +45,55 @@
 +TARGET_DEVICES += kst_wf3000a
 +
 
---- a/package/boot/uboot-envtools/files/mediatek_filogic
-+++ b/package/boot/uboot-envtools/files/mediatek_filogic
-@@ -94,6 +94,11 @@
- 		;;
- 	esac
- 	;;
-+cmcc,xr30-emmc|\
-+sl,3000|\
-+sl,3000-emmc)
-+	ubootenv_add_uci_config "/dev/mmcblk0p1" "0x0" "0x80000" "0x80000"
-+	;;
- comfast,cf-e393ax)
- 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000"
- 	;;
-
 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
-@@ -86,6 +86,9 @@
- 	arcadyan,mozart|\
- 	cmcc,rax3000m-emmc|\
- 	cmcc,xr30-emmc|\
-+	cmcc,xr30-emmc |\
-+	*sl,3000* |\
-+	*sl,3000-emmc* |\
- 	glinet,gl-mt2500|\
- 	glinet,gl-mt6000|\
- 	glinet,gl-x3000|\
+@@ -107,6 +107,7 @@ platform_do_upgrade() {
+ 	glinet,gl-xe3000|\
+ 	huasifei,wh3000|\
+ 	huasifei,wh3000-pro|\
++ 	sl,3000*|\
+ 	smartrg,sdg-8612|\
+ 	smartrg,sdg-8614|\
+ 	smartrg,sdg-8622|\
+@@ -234,6 +235,7 @@ platform_copy_config() {
+ 	huasifei,wh3000|\
+ 	huasifei,wh3000-pro|\
+ 	jdcloud,re-cp-03|\
++	sl,3000*|\
+ 	smartrg,sdg-8612|\
+ 	smartrg,sdg-8614|\
+ 	smartrg,sdg-8622|\
 
 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
 +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
-@@ -40,6 +40,8 @@
- 	ikuai,q3000|\
+@@ -41,6 +41,8 @@ mediatek_setup_interfaces()
  	jcg,q30-pro|\
+ 	keenetic,kn-3811|\
  	qihoo,360t7|\
 +	kst,wf3000a|\
 +	sl,3000*|\
  	routerich,ax3000|\
  	routerich,ax3000-ubootmod)
  		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" wan
-@@ -198,6 +200,42 @@
- 		wan_mac=$label_mac
- 		lan_mac=$(macaddr_add "$label_mac" 1)
+@@ -136,6 +138,21 @@ mediatek_setup_interfaces()
+ 	tplink,re6000xd)
+ 		ucidef_set_interface_lan "lan1 lan2 eth1"
  		;;
-+	sl,3000)
-+		local wifi_mac="$(mtd_get_mac_binary Factory 0x04)"
-+		wan_mac=$(macaddr_add $wifi_mac -2)
-+		lan_mac=$(macaddr_add $wifi_mac -1)
-+		local b0dat="$(l1dat if2dat ra0)"
-+		local b1dat="$(l1dat if2dat rax0)"
-+		if [ -f ${b0dat} ] && ! grep -q "MacAddress=" ${b0dat}; then
-+			local b0mac="$(macaddr_add $wifi_mac)"
-+			echo "MacAddress=$b0mac" >> ${b0dat}
-+		fi
-+		if [ -f ${b1dat} ] && ! grep -q "MacAddress=" ${b1dat}; then
-+			local b1mac="$(macaddr_add $wifi_mac 1)"
-+			echo "MacAddress=$b1mac" >> ${b1dat}
-+		fi
-+		;;
-+	sl,3000-emmc)
-+		local wifi_mac="$(mmc_get_mac_binary factory 0x04)"
-+		wan_mac=$(macaddr_add $wifi_mac -2)
-+		lan_mac=$(macaddr_add $wifi_mac -1)
-+		local b0dat="$(l1dat if2dat ra0)"
-+		local b1dat="$(l1dat if2dat rax0)"
-+		if [ -f ${b0dat} ] && ! grep -q "MacAddress=" ${b0dat}; then
-+			local b0mac="$(macaddr_add $wifi_mac)"
-+			echo "MacAddress=$b0mac" >> ${b0dat}
-+		fi
-+		if [ -f ${b1dat} ] && ! grep -q "MacAddress=" ${b1dat}; then
-+			local b1mac="$(macaddr_add $wifi_mac 1)"
-+			echo "MacAddress=$b1mac" >> ${b1dat}
-+		fi
-+		;;
-+	kst,wf3000a|\
-+	newland,nl-wr8103)
++	kst,wf3000a)
 +		local wifi_mac=$(mtd_get_mac_binary Factory 0x4)
 +		lan_mac=$(macaddr_add $wifi_mac -1)
 +		wan_mac=$(macaddr_add $wifi_mac -2)
 +		;;
++ 	sl,3000)
++ 		lan_mac=$(mtd_get_mac_binary Factory 0x04)		
++ 		wan_mac=$(macaddr_add "$lan_mac" -2)
++ 		label_mac=$lan_mac
++ 		;;
++ 	sl,3000-emmc)
++ 		lan_mac=$(mmc_get_mac_binary factory 0x04)		
++ 		wan_mac=$(macaddr_add "$lan_mac" -2)
++ 		label_mac=$lan_mac
++ 		;;
  	xiaomi,mi-router-ax3000t|\
  	xiaomi,mi-router-ax3000t-ubootmod|\
- 	xiaomi,mi-router-wr30u|\
+ 	xiaomi,mi-router-wr30u|\

+ 105 - 0
devices/mediatek_filogic/patches/99-newland.patch

@@ -0,0 +1,105 @@
+--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+@@ -12,6 +12,7 @@ mediatek_setup_interfaces()
+ 	cmcc,rax3000m|\
+ 	h3c,magic-nx30-pro|\
+ 	netis,nx31|\
++	newland,nl-wr8103|\
+ 	nokia,ea0326gmp|\
+ 	mercusys,mr80x-v3|\
+ 	routerich,ax3000-v1|\
+@@ -190,6 +191,11 @@ mediatek_setup_macs()
+ 		lan_mac=$(mtd_get_mac_ascii u-boot-env mac)
+ 		label_mac=$lan_mac
+ 		;;
++	newland,nl-wr8103)
++ 		label_mac=$(mtd_get_mac_binary Factory 0x04)		
++ 		wan_mac=$(macaddr_add "$label_mac" -2)
++ 		lan_mac=$label_mac
++ 		;;
+ 	qihoo,360t7)
+ 		lan_mac=$(mtd_get_mac_ascii factory lanMac)
+ 		wan_mac=$(macaddr_add "$lan_mac" 1)
+
+--- 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
+@@ -181,6 +181,26 @@ case "$board" in
+ 		[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
+ 		[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
+ 		;;
++        sl,3000)
++		label_mac=$(mtd_get_mac_binary Factory 0x04)
++		[ "$PHYNBR" = "0" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress
++		[ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
++		;;
++        sl,3000-emmc)
++		label_mac=$(mmc_get_mac_binary factory 0x04)
++		[ "$PHYNBR" = "0" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress
++		[ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
++		;;
++        umi,uax3000e)
++		addr=$(mmc_get_mac_binary factory 0x24)
++		[ "$PHYNBR" = "0" ] && macaddr_add $addr > /sys${DEVPATH}/macaddress
++		[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
++		;;
++        newland,nl-wr8103)
++		addr=$(mtd_get_mac_binary Factory 0x0A)
++		[ "$PHYNBR" = "0" ] && macaddr_add $addr > /sys${DEVPATH}/macaddress
++		[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
++		;;
+ 	routerich,ax3000|\
+ 	routerich,ax3000-ubootmod|\
+ 	zbtlink,zbt-z8102ax|\
+
+--- a/target/linux/mediatek/image/filogic.mk
++++ b/target/linux/mediatek/image/filogic.mk
+@@ -1426,6 +1426,38 @@ define Device/netis_nx31
+ endef
+ TARGET_DEVICES += netis_nx31
+ 
++define Device/newland_nl-wr8103
++  DEVICE_VENDOR := Newland
++  DEVICE_MODEL := NL-WR8103
++  DEVICE_DTS := mt7981b-newland-nl-wr8103
++  DEVICE_DTS_DIR := ../dts
++  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
++  UBINIZE_OPTS := -E 5
++  BLOCKSIZE := 128k
++  PAGESIZE := 2048
++  IMAGE_SIZE := 116736k
++  KERNEL_IN_UBI := 1  
++  IMAGES += factory.bin
++  IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
++  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
++endef
++TARGET_DEVICES += newland_nl-wr8103
++
++define Device/umi_uax3000e
++  DEVICE_VENDOR := UMI
++  DEVICE_MODEL := UAX3000E
++  DEVICE_DTS := mt7981b-umi-uax3000e
++  DEVICE_DTS_DIR := ../dts
++  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware \
++	kmod-usb-net-cdc-mbim kmod-usb-net-qmi-wwan kmod-usb-serial-option \
++	kmod-usb3 blkid blockdev fdisk f2fsck mkf2fs kmod-mmc mmc-utils
++  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
++  KERNEL_INITRAMFS := kernel-bin | lzma | \
++	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
++  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
++endef
++TARGET_DEVICES += umi_uax3000e
++
+ define Device/nokia_ea0326gmp
+   DEVICE_VENDOR := Nokia
+   DEVICE_MODEL := EA0326GMP
+
+--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
++++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+@@ -113,6 +113,7 @@ platform_do_upgrade() {
+ 	smartrg,sdg-8632|\
+ 	smartrg,sdg-8733|\
+ 	smartrg,sdg-8733a|\
++	umi,uax3000e|\
+ 	smartrg,sdg-8734)
+ 		CI_KERNPART="kernel"
+ 		CI_ROOTPART="rootfs"

+ 0 - 63
devices/mediatek_filogic/patches/F35SQA001G.patch

@@ -1,63 +0,0 @@
-From 2d813c84eb52371ee7222c502b85867c8891aac5 Mon Sep 17 00:00:00 2001
-From: Bohdan Chubuk <[email protected]>
-Date: Mon, 11 Nov 2024 02:04:29 +0200
-Subject: [PATCH] generic: 6.6: mtd: spinand: add support for FORESEE
- F35SQA001G
-
-Add support for FORESEE F35SQA001G SPI NAND.
-
-Similar to F35SQA002G, but differs in capacity.
-Datasheet:
-  -  https://cdn.ozdisan.com/ETicaret_Dosya/704795_871495.pdf
-
-Tested on Xiaomi AX3000T flashed with OpenWRT.
-
-Signed-off-by: Bohdan Chubuk <[email protected]>
----
- ...d-add-support-for-FORESEE-F35SQA001G.patch | 37 +++++++++++++++++++
- 1 file changed, 37 insertions(+)
- create mode 100644 target/linux/generic/pending-6.6/495-mtd-spinand-add-support-for-FORESEE-F35SQA001G.patch
-
-diff --git a/target/linux/generic/pending-6.6/495-mtd-spinand-add-support-for-FORESEE-F35SQA001G.patch b/target/linux/generic/pending-6.6/495-mtd-spinand-add-support-for-FORESEE-F35SQA001G.patch
-new file mode 100644
-index 0000000000000..8cf20332be348
---- /dev/null
-+++ b/target/linux/generic/pending-6.6/495-mtd-spinand-add-support-for-FORESEE-F35SQA001G.patch
-@@ -0,0 +1,37 @@
-+From b763f9c21084aa01825e21759beeb357eea16a7f Mon Sep 17 00:00:00 2001
-+From: Bohdan Chubuk <[email protected]>
-+Date: Sun, 10 Nov 2024 22:47:08 +0200
-+Subject: [PATCH] mtd: spinand: add support for FORESEE F35SQA001G
-+
-+Add support for FORESEE F35SQA001G SPI NAND.
-+
-+Similar to F35SQA002G, but differs in capacity.
-+Datasheet:
-+  -  https://cdn.ozdisan.com/ETicaret_Dosya/704795_871495.pdf
-+
-+Tested on Xiaomi AX3000T flashed with OpenWRT.
-+
-+Signed-off-by: Bohdan Chubuk <[email protected]>
-+---
-+ drivers/mtd/nand/spi/foresee.c | 10 ++++++++++
-+ 1 file changed, 10 insertions(+)
-+
-+--- a/drivers/mtd/nand/spi/foresee.c
-++++ b/drivers/mtd/nand/spi/foresee.c
-+@@ -81,6 +81,16 @@ static const struct spinand_info foresee
-+ 		     SPINAND_HAS_QE_BIT,
-+ 		     SPINAND_ECCINFO(&f35sqa002g_ooblayout,
-+ 				     f35sqa002g_ecc_get_status)),
-++	SPINAND_INFO("F35SQA001G",
-++		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x71, 0x71),
-++		     NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
-++		     NAND_ECCREQ(1, 512),
-++		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
-++					      &write_cache_variants,
-++					      &update_cache_variants),
-++		     SPINAND_HAS_QE_BIT,
-++		     SPINAND_ECCINFO(&f35sqa002g_ooblayout,
-++				     f35sqa002g_ecc_get_status)),
-+ };
-+ 
-+ static const struct spinand_manufacturer_ops foresee_spinand_manuf_ops = {

+ 9 - 23
devices/mediatek_filogic/patches/Winbond-NMBM-fix.patch

@@ -1,28 +1,6 @@
-From 0560802d2f5c2bb4346551950e806f77944cf419 Mon Sep 17 00:00:00 2001
-From: Mikhail Zhilkin <[email protected]>
-Date: Sun, 17 Nov 2024 16:30:31 +0000
-Subject: [PATCH] kernel: quick fix for nmbm with Winbond W25N01KV
-
-Fixes: https://github.com/openwrt/openwrt/issues/16972
-
-Signed-off-by: Mikhail Zhilkin <[email protected]>
----
- target/linux/generic/files/drivers/mtd/nand/mtk_bmt_nmbm.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt_nmbm.c b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt_nmbm.c
-index a896e49ec04751..6ec9b388076dea 100644
 --- a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt_nmbm.c
 +++ b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt_nmbm.c
-@@ -2197,10 +2197,15 @@ static int nmbm_attach(struct nmbm_instance *ni)
- 		return -EINVAL;
- 	}
- 
-+	nlog_info(ni, "ni->signature.spare_size: %u [0x%02x]\n",
-+		ni->signature.spare_size, ni->signature.spare_size);
-+	nlog_info(ni, "bmtd.mtd->oobsize: %u [0x%02x]\n",
-+		bmtd.mtd->oobsize, bmtd.mtd->oobsize);
-+
+@@ -2200,11 +2200,15 @@ static int nmbm_attach(struct nmbm_instance *ni)
  	if (ni->signature.nand_size != bmtd.total_blks << bmtd.blk_shift ||
  	    ni->signature.block_size != bmtd.blk_size ||
  	    ni->signature.page_size != bmtd.pg_size ||
@@ -31,3 +9,11 @@ index a896e49ec04751..6ec9b388076dea 100644
  		nlog_err(ni, "NMBM configuration mismatch\n");
  		return -EINVAL;
  	}
+ 
++	if (ni->signature.spare_size < bmtd.mtd->oobsize)
++		nlog_warn(ni, "NMBM spare size (%u) is less than mtd oob size (%u)\n",
++			 ni->signature.spare_size, bmtd.mtd->oobsize);
++
+ 	success = nmbm_load_existing(ni);
+ 	if (!success)
+ 		return -ENODEV;

+ 68 - 0
devices/mediatek_filogic/patches/ax6s.patch

@@ -0,0 +1,68 @@
+--- a/target/linux/mediatek/image/mt7622.mk
++++ b/target/linux/mediatek/image/mt7622.mk
+@@ -438,18 +438,10 @@ define Device/xiaomi_redmi-router-ax6s
+   UBINIZE_OPTS := -E 5
+   BLOCKSIZE := 128k
+   PAGESIZE := 2048
+-  KERNEL := kernel-bin | gzip
+-  KERNEL_INITRAMFS := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
++  KERNEL_SIZE := 6144k
+   KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+-  IMAGES := sysupgrade.itb
+-  IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
+-  ARTIFACTS := ubi-loader.itb
+-  ARTIFACT/ubi-loader.itb := uboot-bin xiaomi_redmi-router-ax6s-ubi-loader | lzma | uboot-fit lzma
+-ifneq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),)
+-  ARTIFACTS += factory.bin
+-  ARTIFACT/factory.bin := uboot-bin xiaomi_redmi-router-ax6s-ubi-loader | lzma | uboot-fit lzma | pad-to 512k | ubinize-image fit squashfs-sysupgrade.itb
+-endif
+-  DEVICE_COMPAT_VERSION := 2.0
+-  DEVICE_COMPAT_MESSAGE := Flash layout changes require a manual reinstall using factory.bin.
++  IMAGES += factory.bin
++  IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi
++  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+ endef
+ TARGET_DEVICES += xiaomi_redmi-router-ax6s
+
+--- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
++++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
+@@ -22,8 +22,7 @@
+ 
+ 	chosen {
+ 		stdout-path = "serial0:115200n8";
+-		rootdisk = <&ubi_rootfs>;
+-		bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512 ubi.block=0,fit root=/dev/fit0";
++		bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512";
+ 	};
+ 
+ 	memory {
+@@ -297,8 +296,8 @@
+ 			};
+ 
+ 			partition@2c0000 {
+-				label = "ubi-loader";
+-				reg = <0x2c0000 0x80000>;
++				label = "kernel";
++				reg = <0x2c0000 0x600000>;
+ 			};
+ 
+ 			/* ubi partition is the result of squashing
+@@ -308,16 +307,9 @@
+ 			 * - overlay
+ 			 * - obr
+ 			 */
+-			partition@340000 {
++			partition@8c0000 {
+ 				label = "ubi";
+-				reg = <0x340000 0x7280000>;
+-				compatible = "linux,ubi";
+-
+-				volumes {
+-					ubi_rootfs: ubi-volume-fit {
+-						volname = "fit";
+-					};
+-				};
++				reg = <0x8c0000 0x6d00000>;
+ 			};
+ 		};
+ 	};

+ 45 - 47
devices/mediatek_filogic/patches/tr3000-mod.patch

@@ -1,76 +1,74 @@
 --- a/target/linux/mediatek/image/filogic.mk
 +++ b/target/linux/mediatek/image/filogic.mk
-@@ -633,6 +633,36 @@ define Device/cudy_re3000-v1
+@@ -754,30 +754,20 @@ define Device/cudy_tr3000-v1
  endef
- TARGET_DEVICES += cudy_re3000-v1
+ TARGET_DEVICES += cudy_tr3000-v1
  
+-define Device/cudy_tr3000-v1-ubootmod
 +define Device/cudy_tr3000-mod
-+  DEVICE_VENDOR := Cudy
-+  DEVICE_MODEL := TR3000
+   DEVICE_VENDOR := Cudy
+   DEVICE_MODEL := TR3000
+-  DEVICE_VARIANT := v1 (OpenWrt U-Boot layout)
+-  DEVICE_DTS := mt7981b-cudy-tr3000-v1-ubootmod
 +  DEVICE_VARIANT := v1 112M
 +  DEVICE_DTS := mt7981b-cudy-tr3000-mod
-+  DEVICE_DTS_DIR := ../dts
-+  UBINIZE_OPTS := -E 5
-+  BLOCKSIZE := 128k
-+  PAGESIZE := 2048
-+  KERNEL_IN_UBI := 1
+   DEVICE_DTS_DIR := ../dts
+   DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
+   UBINIZE_OPTS := -E 5
+   BLOCKSIZE := 128k
+   PAGESIZE := 2048
+   KERNEL_IN_UBI := 1
+-  UBOOTENV_IN_UBI := 1
+-  IMAGES := sysupgrade.itb
+-  KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+-  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 | append-metadata
+-  ARTIFACTS := preloader.bin bl31-uboot.fip
+-  ARTIFACT/preloader.bin := mt7981-bl2 cudy-tr3000-v1
+-  ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot cudy_tr3000-v1
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-+  DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
-+endef
+ endef
+-TARGET_DEVICES += cudy_tr3000-v1-ubootmod
 +TARGET_DEVICES += cudy_tr3000-mod
-+
-+define Device/cudy_tr3000-v2-mod
-+  DEVICE_VENDOR := Cudy
-+  DEVICE_MODEL := TR3000
-+  DEVICE_VARIANT := v2 256MB
-+  DEVICE_DTS := mt7981b-cudy-tr3000-v2-mod
-+  DEVICE_DTS_DIR := ../dts
-+  UBINIZE_OPTS := -E 5
-+  BLOCKSIZE := 128k
-+  PAGESIZE := 2048
-+  KERNEL_IN_UBI := 1
-+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-+  DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
-+endef
-+TARGET_DEVICES += cudy_tr3000-v2-mod
-+
- define Device/cudy_tr3000-v1
+ 
+ define Device/cudy_wr3000-v1
    DEVICE_VENDOR := Cudy
-   DEVICE_MODEL := TR3000
 
 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
 +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
-@@ -78,7 +78,7 @@ mediatek_setup_interfaces()
- 		ucidef_set_interface_lan "eth0"
- 		;;
+@@ -91,7 +91,7 @@ mediatek_setup_interfaces()
  	cudy,m3000-v1|\
--	cudy,tr3000-v1|\
-+	cudy,tr3000*|\
+ 	cudy,tr3000-256mb-v1|\
+ 	cudy,tr3000-v1|\
+-	cudy,tr3000-v1-ubootmod|\
++	cudy,tr3000-mod|\
  	glinet,gl-mt2500|\
  	glinet,gl-mt3000|\
  	glinet,gl-x3000|\
 
 --- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
 +++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
-@@ -1,7 +1,7 @@
- set_preinit_iface() {
- 	case $(board_name) in
+@@ -3,7 +3,7 @@ set_preinit_iface() {
  	cudy,m3000-v1|\
--	cudy,tr3000-v1|\
-+	cudy,tr3000*|\
+ 	cudy,tr3000-256mb-v1|\
+ 	cudy,tr3000-v1|\
+-	cudy,tr3000-v1-ubootmod|\
++	cudy,tr3000-mod|\
  	glinet,gl-mt3000|\
- 	openembed,som7981)
- 		ip link set eth1 up
+ 	openembed,som7981|\
+ 	wavlink,wl-wn573hx3)
 
 --- 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
-@@ -77,7 +77,7 @@ case "$board" in
- 	cudy,ap3000-v1|\
- 	cudy,m3000-v1|\
+@@ -80,7 +80,7 @@ case "$board" in
  	cudy,re3000-v1|\
--	cudy,tr3000-v1|\
-+	cudy,tr3000*|\
+ 	cudy,tr3000-256mb-v1|\
+ 	cudy,tr3000-v1|\
+-	cudy,tr3000-v1-ubootmod|\
++	cudy,tr3000-mod|\
  	cudy,wr3000e-v1|\
  	cudy,wr3000s-v1|\
  	cudy,wr3000h-v1|\
-

+ 13 - 0
devices/qualcommax_ipq50xx/.config

@@ -4,3 +4,16 @@ CONFIG_TARGET_qualcommax_ipq50xx=y
 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_ALL_PROFILES=y
 
+CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-mgr=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-match=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-map-t=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-netlink=n
+
+CONFIG_PACKAGE_kmod-qca-nss-cfi-cryptoapi=n
+CONFIG_PACKAGE_kmod-qca-nss-crypto=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-tlsmgr=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-dtlsmgr=n
+

+ 2 - 4
devices/qualcommax_ipq50xx/diy.sh

@@ -4,9 +4,9 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-rm -rf package/boot package/kernel/qca* package/firmware/ipq-wifi package/firmware/ath11k-firmware target/linux/qualcommax target/linux/generic package/devel/perf
+rm -rf package/boot package/kernel/qca* package/firmware/ipq-wifi target/linux/qualcommax target/linux/generic package/devel/perf
 
-git_clone_path master https://github.com/coolsnowwolf/lede target/linux/qualcommax target/linux/generic package/boot package/qca package/firmware/ipq-wifi package/firmware/ath11k-firmware
+git_clone_path master https://github.com/coolsnowwolf/lede target/linux/qualcommax target/linux/generic package/boot package/qca package/firmware/ipq-wifi
 
 wget -N https://github.com/coolsnowwolf/lede/raw/master/include/kernel-6.6 -P include/
 
@@ -17,5 +17,3 @@ target/linux/qualcommax/Makefile
 
 sed -i "/ECM_INTERFACE_MAP_T_ENABLE/d"  package/qca/qca-nss-ecm/Makefile
 
-make defconfig
-sed -i "s/\(CONFIG_PACKAGE_kmod-qca.*\)=m/\1=n/g" .config

+ 7 - 0
devices/qualcommax_ipq60xx/.config

@@ -4,3 +4,10 @@ CONFIG_TARGET_qualcommax_ipq60xx=y
 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_ALL_PROFILES=y
 
+CONFIG_PACKAGE_kmod-qca-nss-drv-ipsecmgr=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-mgr=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-ovpn-link=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-match=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-map-t=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-tunipip6=n
+CONFIG_PACKAGE_kmod-qca-nss-drv-netlink=n

+ 2 - 4
devices/qualcommax_ipq60xx/diy.sh

@@ -4,9 +4,9 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-rm -rf package/boot package/kernel/qca* package/firmware/ipq-wifi package/firmware/ath11k-firmware target/linux/qualcommax target/linux/generic package/devel/perf
+rm -rf package/boot package/kernel/qca* package/firmware/ipq-wifi target/linux/qualcommax target/linux/generic package/devel/perf
 
-git_clone_path master https://github.com/coolsnowwolf/lede target/linux/qualcommax target/linux/generic package/boot package/qca package/firmware/ipq-wifi package/firmware/ath11k-firmware
+git_clone_path master https://github.com/coolsnowwolf/lede target/linux/qualcommax target/linux/generic package/boot package/qca package/firmware/ipq-wifi
 
 wget -N https://github.com/coolsnowwolf/lede/raw/master/include/kernel-6.6 -P include/
 
@@ -17,5 +17,3 @@ target/linux/qualcommax/Makefile
 
 sed -i "/ECM_INTERFACE_MAP_T_ENABLE/d"  package/qca/qca-nss-ecm/Makefile
 
-make defconfig
-sed -i "s/\(CONFIG_PACKAGE_kmod-qca.*\)=m/\1=n/g" .config

+ 0 - 2
devices/qualcommax_ipq60xx/patches/fix.patch

@@ -9,5 +9,3 @@
  endef
  
  define KernelPackage/ipt-ipopt/description
-
- 

+ 12 - 0
devices/qualcommax_ipq60xx/patches/zn-m2.patch

@@ -20,3 +20,15 @@
  	BLOCKSIZE := 128k
  	PAGESIZE := 2048
  	SOC := ipq6000
+diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax18.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax18.dts
+index e887ff87a..b539d8dbb 100644
+--- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax18.dts
++++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax18.dts
+@@ -213,6 +213,6 @@
+ };
+ 
+ &wifi {
+-	status = "disabled";
++	status = "okay";
+ 	qcom,ath11k-fw-memory-mode = <2>;
+ };