ELECOM WRC-X6000GSD is a 4804Mbps 4xMIMO 2.4/5 GHz 11ax (Wi-Fi 6) router
with 2.5Gbps WAN (stock: 1Gbps max.), based on MT7986B
Specification:
- SoC : MediaTek MT7986BLA
- RAM : DDR3 512 MiB (SoC)
- Flash : Winbond 128MiB SPI NAND (W25N01GVZEIG)
- WLAN : 2.4/5 GHz 4T4R (MediaTek MT7986)
- Ethernet : 5x 10/100/1000(/2500) Mbps
- wan : Maxlinear Ethernet GPY211C (max. 2500M)
- lan : MediaTek MT7531 (max. 1000M)
- LEDs/Keys (GPIO): 11x/4x
- UART : through-hole on PCB (J1)
- assignment : 3.3V, TX, RX, NC, GND from tri-angle marking
- settings : 115200n8
- Power : 12 VDC, 2 A
Flash layout:
dev: offset size name
mtd0: 0x00000000 0x00100000 "BL2"
mtd1: 0x00100000 0x00080000 "Ubootenv"
mtd2: 0x00180000 0x00200000 "Factory"
mtd3: 0x00380000 0x00200000 "FIP"
mtd4: 0x00580000 0x00020000 "Fwheader"
mtd5: 0x005a0000 0x03200000 "ubi"
mtd6: 0x037a0000 0x00380000 "Config"
mtd7: 0x03b20000 0x00020000 "Fwheader_2"
mtd8: 0x03b40000 0x03200000 "ubi_2"
mtd9: 0x06d40000 0x00380000 "Config_2"
mtd10: 0x070c0000 0x00100000 "persist"
mtd11: 0x071c0000 0x00040000 "Mrd"
mtd12: 0x07200000 0x00380000 "Backup"
Flash instruction using factory.bin image:
1. Boot WRC-X6000GSD in router mode normally
2. Access to the WebUI ("http://192.168.2.1/") on the device
-> その他設定 (Other settings)
-> フォームウェア更新 (Update firmware)
-> ローカルファイル指定 (Specify local file)
3. Select the OpenWrt factory.bin image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing
Switching to the stock firmware:
1. Load the elecom.sh script
. /lib/upgrade/elecom.sh
2. Check the current index of firmware partition
mstc_rw_bootnum
3. Set the bootnum to opposite value between 1 and 2
mstc_rw_bootnum value
example:
- step2 returned "1": mstc_rw_bootnum 2
- step2 returned "2": mstc_rw_bootnum 1
4. Reboot, to stock FW
5. Flash the stock FW to fuly revert back to original.
Notes:
- With the stock firmware, it will flash to another partition and
toggle boot to that partition when any firmware is flashed.
For example when booting on ubi, the new firmware will be flashed
to ubi_2 and the router will boot from ubi_2 afterwards.
The 5th byte of the Persist partition is the boot value (0x01 or 0x02).
- bootmenu_delay=0 is set from factory so uboot menu is hidden by
default.
- The hardware of WRC-X6000GSD is almost identical to WRC-X6000QS, but
WAN (labeled as "INTERNET") port is limited to 1000 Mbps on stock FW.
On OpenWrt FW, 2500 Mbps connection is available on that port.
MAC Addresses:
LAN : 38:97:A4:xx:xx:58 (Factory, 0x2A(hex)/Ubootenv, "ethaddr"(text))
WAN : 38:97:A4:xx:xx:5B (Factory, 0x24(hex))
2.4GHz: 38:97:A4:xx:xx:59 (Factory, 0x4(hex))
5GHz : 38:97:A4:xx:xx:5A (Factory, 0xA(hex)
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
ELECOM WRC-X6000QS is a 4804Mbps 4xMIMO 2.4/5 GHz 11ax (Wi-Fi 6) router
with 2.5Gbps WAN, based on MT7986b
Specification:
- SoC : MediaTek MT7986B
- RAM : DDR3 512 MiB
- Flash : Winbond 128MiB SPI NAND
- WLAN : 2.4/5 GHz 4T4R (MediaTek MT7986)
- Ethernet : 5x 10/100/1000 Mbps
- wan : Maxlinear Ethernet GPY211C
- lan : MediaTek MT7531
- LEDs/Keys (GPIO): 11x/4x
- UART : through-hole on PCB (J1)
- assignment : 3.3V, TX, RX, NC, GND from tri-angle marking
- settings : 115200n8
- Power : 12 VDC, 2 A
Flash layout:
dev: offset size name
mtd0: 0x00000000 0x00100000 "BL2"
mtd1: 0x00100000 0x00080000 "Ubootenv"
mtd2: 0x00180000 0x00200000 "Factory"
mtd3: 0x00380000 0x00200000 "FIP"
mtd4: 0x00580000 0x00020000 "Fwheader"
mtd5: 0x005a0000 0x03200000 "ubi"
mtd6: 0x037a0000 0x00380000 "Config"
mtd7: 0x03b20000 0x00020000 "Fwheader_2"
mtd8: 0x03b40000 0x03200000 "ubi_2"
mtd9: 0x06d40000 0x00380000 "Config_2"
mtd10: 0x070c0000 0x00100000 "persist"
mtd11: 0x071c0000 0x00040000 "Mrd"
mtd12: 0x07200000 0x00380000 "Backup"
UBI layout:
name: size:
kernel 0x00364000 dynamic
rootfs 0x00FFC000 dynamic
rootfs_data 0x01A47000 dynamic
Flash instruction using factory.bin image:
1. Boot WRC-X6000QS in router mode normally
2. Access to the WebUI ("http://192.168.2.1/") on the device
-> その他設定 (Other settings)
-> フォームウェア更新 (Update firmware)
-> ローカルファイル指定 (Specify local file)
3. Select the OpenWrt factory.bin image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing
Switching to the stock firmware:
1. Load the elecom.sh script
. /lib/upgrade/elecom.sh
2. Check the current index of firmware partition
mstc_rw_bootnum
3. Set the bootnum to opposite value between 1 and 2
mstc_rw_bootnum value
example:
- step2 returned "1": mstc_rw_bootnum 2
- step2 returned "2": mstc_rw_bootnum 1
4. Reboot, to stock FW
5. Flash the stock FW to fuly revert back to original.
Note 1: With the stock firmware, it will flash to another partition and
toggle boot to that partition when any firmware is flashed.
For example when booting on ubi, the new firmware will be flashed
to ubi_2 and the router will boot from ubi_2 afterwards.
The 5th byte of the Persist partition is the boot value (0x01 or 0x02).
During my tests, it never switched to another boot partition if the
firmware failed boot. So if openwrt doesn't boot,
UART might be required to recover.
Note 2: bootmenu_delay=0 is set from factory so uboot menu is hidden.
[original work]
Signed-off-by: Yuhei Amemiya <minihui@me.com>
[fixes, improvements]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22926
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Device support for zbt-z8103ax-d
Model D DTS is identical to Model C zbt-z8103ax-c.
Both models share same motherboard.
Difference between models is
- Model C is a cylinder shape enclosure
containing internal antennas.
- Model D is a sandwich shape enclosure
with 6 external antennas.
Specifications:
SoC: MediaTek MT7981B
RAM: 256MiB
Flash: Winbond SPI-NAND 128 MiB
Switch: 1 WAN, 3 LAN (Gigabit) MediaTek MT7531
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7981B 2.4Ghz & 5.8Ghz
Led Layout from left to right:
Power
Mesh (RGB Led, user controllable, default set to OpenWrt Status)
WLAN 2.4G (user controllable)
WAN (user controllable)
LAN3
LAN2
LAN1
WLAN 5G (user controllable)
Installation:
A. Through U-Boot menu:
- Prepare your connecting computer to use static IP
(legacy notation) 192.168.1.10 netmask 255.255.255.0
(CIDR notation) 192.168.1.10/24
- Power down the router and hold in the Reset button.
- While holding in the button power up the router again.
- Hold the button in for 10 seconds and then release.
- Use your browser to go to 192.168.1.1
- If you see a GUI allowing for flashing firmware you are at the right spot.
- Upload the **Factory** image file.
Note: U-Boot GUI it can be used to recover from an incorrect firmware flash.
B. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled (modified by the seller),
you can easily upgrade by going to the dashboard (192.168.1.1)
and then navigate to
System -> Backup/Flash firmware, then flash the firmware
MAC Addresses:
MAC Addresses were found in Factory partition:
offset 0x4 F8:5E:3C:xx:xx:aa --> Router Label -2
offset 0xa F8:5E:3C:xx:xx:bb --> Router Label -1
offset 0x24 F8:5E:3C:xx:xx:cc --> Router Label +1
offset 0x2a F8:5E:3C:xx:xx:yy --> printed on Router Label
Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/21626
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Nand has a valid mediatek nand badblock management (NMBM) signature.
Gets used for non-UBI partions BL2, u-boot-env, Factory and FIT.
Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/21626
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add patches to improve support for using 3rd-party DSA switches
like MaxLinear MxL862xx with MediaTek's mtk_eth_soc being the
conduit. This involves reorganizing hardware queues to avoid
overlap (currently dp->index is used -- if there is more than one
DSA switch this is problematic), and correctly programming flows
of the non-MTK DSA users ports in the PPE offloading engine.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Use the upstream properties to describe the USXGMII PCS polarity as
the downstream mediatek,pnswap{,-rx,tx} was dropped.
This board was the only user.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
LINK_INBAND_ENABLE isn't valid for 5GBase-R/10GBase-R modes which
by definition don't support any in-band an. Correctly report
LINK_INBAND_DISABLE to fix 10G fiber SFP modules no longer working.
While at it also get rid of downstream pn-swap properties in favor
of using the upstream schema.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Device support for zbt-z8106ax-s
Specifications:
SoC: MediaTek MT7981B
RAM: 256MiB
Flash: Winbond SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit) MediaTek MT7531
Buttons: Reset
Power: DC 12V 1A
WiFi: MT7981B 2.4Ghz & 5Ghz
USB 3
M2 slot to hold LTE modem
1 nano SIM slot (user controllable)
Hardware watchdog (confirmed to work)
Router comes in a plastic tower with all antennas internal.
- 4 antennas for LTE 4G/5G communication
- 2 antennas for Wifi 2.4 GHz
- 2 antennas for Wifi 5 GHz
Led Layout:
Power (green, user controllable, default set to OpenWrt Status)
Mobile (green, user controllable)
WLAN 2.4G (green, user controllable)
WLAN 5G (green, user controllable)
WAN (amber, user controllable, set to show eth1)
LAN1 (amber, hardware controlled)
LAN2 (amber, hardware controlled)
LAN3 (amber, hardware controlled)
LAN4 (amber, hardware controlled)
SIM Slot:
Controlled via exported GPIO named SIM.
echo "0" > /sys/class/gpio/sim/value
- turns off sim slot labelled SIM
echo "1" > /sys/class/gpio/sim/value
- turns on sim slot labelled SIM
---
Installation:
A. Through U-Boot menu:
- Prepare your connecting computer to use a static IP in
network 192.168.1.0/24 like
a) 192.168.1.10 netmask 255.255.255.0 (legacy notation)
b) 192.168.1.10/24 (CIDR notation)
- Power down the router and hold in the Reset button.
- While holding in the button power up the router again.
- Hold the button in for 10 seconds and then release.
- Use your browser to go to 192.168.1.1
- If you see a GUI allowing for flashing firmware then you got the right spot.
- Upload the **Factory** image file.
Note: U-Boot GUI it can be used to recover from an incorrect firmware flash.
B. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled (modified by vendor),
you can easily upgrade by going to the dashboard (192.168.1.1) and
then navigate to "System" -> "Backup/Flash firmware"
Flash OpenWRT firmware.
Important: Take care to deselect (untick) option
"keep settings". Settings done by vendor are incompatible with
versions 24.10 or 25.12.
MAC Addresses:
MAC Addresses were found in Factory partition:
offset 0x4 F8:5E:3C:xx:xx:aa --> Router Label -2
offset 0xa F8:5E:3C:xx:xx:bb --> Router Label -1
offset 0x24 F8:5E:3C:xx:xx:cc --> Router Label +1
offset 0x2a F8:5E:3C:xx:xx:yy --> printed on Router Label
Hardware Watchdog:
Device features a GPIO controlled hardware watchdog.
Verfied by removing procd controlled watchdog and
seeing device rebooting.
---
Notes:
The zbt-z8106ax-s could be ordered from vendor with a variety of modems.
Mine came with a 4G LTE modem Quectel EC200A.
Quectel firmware was at EC200AEUHAR01A30M16.
Choices for ordering with 5G LTE were available.
Modem communication is set to ethernet control mode (ECM) by vendor.
Package modemmanager works fine with Quectel EC200A.
You may also decide to use FUjR/Qmodem github repository
to have it manage LTE modem.
Please take note that internal switch port named lan5 isn't
wired to LTE modem in model S as opposed to model T.
Just removing lan5 from DTS did cause unwanted reboots whenever
a cable is plugged into LAN ports 1-4. Disabling port lan5
in DTS however works fine. No unwanted reboots due to
plug/unplug cable into any lan or wan port.
Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/22912
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Import pending series introducing support for standalone PCS drivers.
This has previously already been used by the airoha target, and is
also the base for the closer-to-upstream patches for MediaTek MT7988
10G SerDes support.
In order to not having to diverge from upstream also backport series
for standardized handling for PHY and PCS SerDes pair polarity.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Pawlik figured out that a stale patch hunk breaks one of the
two 10G SerDes PCS ports of MT7988. Remove the hunk to make 10G
Ethernet work on both SerDes PCS with Linux 6.18.
Testing was done using a Aquantia AQR113C SFP+ module.
Signed-off-by: Daniel Pawlik <pawlik.dan@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Adapt kernel configuration of the mt7629 subtarget for Linux 6.18.
This was only compile-tested as I don't have the hardward.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The by-now-upstream driver for the built-in 2.5GE PHY of the MediaTek
MT7988 and MT7987 SoC loads firmware at probe time.
Build the driver as a module in order to make sure the driver only
attempts to load the firmware by the time the rootfs with the firmware
file has become available.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Upstream changes to phylink require to make some small changes to our
downstream Airoha AN8855 DSA driver, so it build with Linux 6.18.
The efuse driver is upstream by now and can be dropped.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Delete patches merged upstream and refresh the remaining patches.
Import pending patchset to fix read-out-of-bounds bug in clk driver
while at it, as it makes maintaining the downstream clk driver for
MT7987 easier.
Replace downstream patch for Fidelix FM35X1GA SPI-NAND chip with
upstream commit replacing it (Dosilicon DS35Q1GA is indentical).
Several additional fixes were needed for MT7623N, especially to get
HDMI and the Mali-450 GPU working again...
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.
For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
BUFFALO WSR-3000AX4P is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
MT7981B.
Specification:
- SoC : MediaTek MT7981B
- RAM : DDR4 512 MiB (ESMT M16U4G16256A-KJBG)
- Flash : SPI-NAND 128 MiB (Winbond W25N01GVZEIG)
- WLAN : 2.4/5 GHz 2T2R (MediaTek MT7981B (SoC))
- Ethernet : 4x 10/100/1000 Mbps
- switch : MediaTek MT7531A
- LEDs/Keys (GPIO): 6x/4x
- UART : through-hole on PCB (J1)
- assignment : 3.3V, GND, TX, RX from tri-angle marking
- settings : 115200n8
- Power : 12 VDC, 1.5 A (Max. 14.4 W)
Flash instruction using initramfs image:
1. Prepare a TFTP server with 192.168.11.2
2. Rename initramfs image to "linux.ubi-recovery" and put it to the TFTP
directory
3. Hold the "AOSS" button and power on WSR-3000AX4P, release after 7~
seconds
4. The bootloader automatically downloads the initramfs image and boots
with it
5. After booting, upload a sysupgrade image to the device and perform
sysupgrade with it
6. Wait ~100 seconds to complete flashing
Reverting to stock image:
1. Download a official firmware and decrypt it by buffalo-enc
example:
buffalo-enc -i <official .bin> -o fw.dec -d -O 0xC8 -l
2. Upload the decrypted image to the device
3. Flash the image to the UBI in "ubi_kernel" partition on the device
example:
. /lib/upgrade/common.sh
. /lib/upgrade/nand.sh
CI_UBIPART="ubi_kernel" nand_do_flash_file fw.dec
4. Reboot the device
reboot
Notes:
- WSR-3000AX4P has 2x OS images ("ubi"/"Kernel2"), but the second one
is only for backup and not used for booting.
image handling on the bootloader:
- "ubi" is broken : "Kernel2" --(copy)--> "ubi"
- "Kernel2" is broken : "ubi" --(copy)--> "Kernel2"
- "ubi" != "Kernel2" :
- boot_select=0: "ubi" --(copy)--> "Kernel2"
- boot_select=1: "Kernel2" --(copy)--> "ubi", set boot_select to '0'
MAC Addresses:
LAN : EC:5A:31:xx:xx:50 (board_data, "mac" (text))
WAN : EC:5A:31:xx:xx:50
2.4GHz: EC:5A:31:xx:xx:52
5GHz : EC:5A:31:xx:xx:59
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22587
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Enable ascii-env NVMEM driver (CONFIG_NVMEM_LAYOUT_ASCII_ENV) on
mediatek/filogic subtarget, to handle ascii-based MAC addresses
in key-value format stored to the mtd partition.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22587
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Device support for zbt-z8106ax-t
Vendor Zbtlink advertizes this device as model Z8106AX-M2-T
on their website www.zbtlink.com. Device label sticked on
enclosure however states this is model Z8106AX version -T.
I made firmware selector to show this device as
- ZBT-Z8106AX-T to match information printed on the label and
- ZBT-Z8106AX-M2-T to match information found on vendors web pages.
Specifications:
SoC: MediaTek MT7981B
RAM: 256MiB
Flash: Winbond SPI-NAND 128 MiB
Switch: 1 WAN, 4 LAN (Gigabit) MediaTek MT7531
Buttons: Reset
Power: DC 12V-32V 1A
WiFi: MT7981B 2.4Ghz & 5Ghz
USB 3
M2 slot to hold LTE modem
2x nano SIM slots (user controllable)
Router comes in a flat metal box with all antennas detachable.
- 4 antennas for LTE 4G/5G communication
- 2 antennas for Wifi 2.4 GHz
- 2 antennas for Wifi 5 GHz
Power supply could be between 12V and 32V.
This serves both cars equipped with 12V batteries
and trucks equipped with 24V batteries.
Led Layout:
Power (green, user controllable, default set to OpenWrt Status)
Mobile (green, user controllable)
WLAN 2.4G (green, user controllable)
WLAN 5G (green, user controllable)
WAN (amber, user controllable, set to show eth1)
LAN1 (amber, hardware controlled)
LAN2 (amber, hardware controlled)
LAN3 (amber, hardware controlled)
LAN4 (amber, hardware controlled)
SIM Slots:
Controlled via exported GPIO named SIM.
echo "0" > /sys/class/gpio/sim/value
- selects upper sim slot labelled SIM1
echo "1" > /sys/class/gpio/sim/value
- selects lower sim slot labelled SIM2
Slot SIM2 is set as default and matches label on Router enclosure
---
Installation:
A. Through U-Boot menu:
- Prepare your connecting computer to use a static IP in
network 192.168.1.0/24 like
a) 192.168.1.10 netmask 255.255.255.0 (legacy notation)
b) 192.168.1.10/24 (CIDR notation)
- Power down the router and hold in the Reset button.
- While holding in the button power up the router again.
- Hold the button in for 10 seconds and then release.
- Use your browser to go to 192.168.1.1
- If you see a GUI allowing for flashing firmware then you got the right spot.
- Upload the **Factory** image file.
Note: U-Boot GUI it can be used to recover from an incorrect firmware flash.
B. Through OpenWrt Dashboard:
If your router comes with OpenWrt preinstalled (modified by vendor),
you can easily upgrade by going to the dashboard (192.168.1.1) and
then navigate to "System" -> "Backup/Flash firmware"
Flash OpenWRT firmware and take care to deselect (untick) option
"keep settings". Settings done by vendor are incompatible with
versions 24.10 or 25.12.
MAC Addresses:
MAC Addresses were found in Factory partition:
offset 0x4 F8:5E:3C:xx:xx:aa --> Router Label -2
offset 0xa F8:5E:3C:xx:xx:bb --> Router Label -1
offset 0x24 F8:5E:3C:xx:xx:cc --> Router Label +1
offset 0x2a F8:5E:3C:xx:xx:yy --> printed on Router Label
Hardware Watchdog:
Device features a GPIO controlled hardware watchdog.
Verfied by removing procd controlled watchdog and
seeing device rebooting.
---
Notes:
The zbt-z8106ax-t could be ordered from vendor with a variety of modems.
Mine came with a Quectel RM520N-GL. Quectel firmware was at RM520NGLAAR01A07M4G.
This level of firmware made some trouble connecting with some of my
SIM cardproviders.
Newer firmware level RM520NGLAAR01A08M4G_01.205.01.205 was available searching
github repositories. Upgrading my RM520-GL allowed to get successful connects
that did fail with older Quectel firmware.
Modem communication is set to ethernet control mode (ECM) by vendor.
Vendor takes advantage of ECM by wiring modem to internal switch port WWAN.
OpenWRT network configuration wants to define two network interfaces
- Network interface covering USB0 set with high metric
- Network interface covering WWAN set with low metric
Network interface covering WWAN would be preferred default route.
Please take note that internal switch port wired to LTE modem is named LAN5
in vendor provided firmwares. OpenWRT however names port as WWAN to better
describe purpose of port. WWAN is suggested to be assigned to firewall zone WAN.
Did use package qmodem from github repository FUjR/QModem to manage RM520N-GL LTE modem.
Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/21834
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add missing patch description, so all patches of the mediatek target can
be applied to a kernel tree using 'git am'.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Fix a long standing bug in the mediatek-cci-devfreq driver which leads
to the driver switching off the CPU power regulator in case of another
resource not being ready in time -- a classic probe-order race condition.
As a work-around it would of course just as well be possible to set the
CPU regulator as 'regulator-always-on' (and not just 'regulator-boot-on'),
but practically all MT7988 devices have copy&pasted the PMIC device tree
hunk which sets only 'regulator-boot-on').
Hence, in order not having to fix all device trees, a proper fix in the
driver is preferred.
Fixes: #683
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Specification:
The device is similar to the M30 but has only one LAN port and no WAN port.
- MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
- 512MB RAM
- 128MB NAND flash with two UBI partitions with identical size
- 1 multi color LED (red, green, blue, white) connected via GCA230718
- 2 buttons (WPS, reset, LED)
- 1 1Gbit LAN port
Disassembly:
- There are two screws at the power connector which must be removed. Afterwards the top case can be removed (it is clipped on, so some tools are required).
Serial Interface:
- The serial interface can be connected to the 4 pin holes on the board. Do NOT connect VCC.
- The pins are labelled on the PCB (RX, TX, GND)
- Settings: 115200, 8N1
MAC addresses:
- LAN MAC is stored in partition "Odm" at offset 0x8f
- WLAN MAC (2.4 GHz and 5GHz) is LAN MAC + 1
Reverting back to OEM firmware:
- There is currently no easy way to revert back to the OEM image
- The methods from M30 and M60 doesn't seem to work anymore
- If you plan to revert back to OEM firmware later, do the following steps before flashing OpenWrt:
- Boot from initramfs as described in "Flashing via U-Boot" but don't flash anything
- Instead, make a backup of UBI and UBI1 partition
- The created dumps must be written to the initial partitions to revert back to OEM
Flashing via Recovery Web Interface:
- Set your IP address to 192.168.200.10, subnetmask 255.255.255.0
- Press the reset button while powering on the device
- Keep the reset button pressed until the LED blinks red
- Open a Chromium based and goto http://192.168.200.50/ (recovery web interface)
- Download openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-squashfs-recovery.bin
- Note: The recovery web interface always reports successful flashing, even if it fails
- After flashing, the recovery web interface will try to forward the browser to 192.168.0.1 (can be ignored)
- If flashing was successful, OpenWrt is accessible via 192.168.1.1
- The recovery image boots an initramfs image, flash the sys upgrade image to get to „normal“ OpenWrt mode
Flashing via U-Boot:
- Open the case, connect to the UART console
- Set your IP address to 192.168.200.2, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
- Run a tftp server which provides openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-initramfs-kernel.bin
- Supply the board with 12V
- Select "7. Load image" in the U-Boot menu
- Enter image file, tftp server IP and device IP (if they differ from the default).
- TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
- The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
- Perform a sysupgrade using openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-squashfs-sysupgrade.bin
- Reboot the device. OpenWrt should start from flash now
Flashing via OEM web interface is not possible, as it will change the active partition and OpenWrt is only running on the first UBI partition.
Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
A previous commit wrongly renamed a patch file omitting the final 'h'
character. Rename it to again have the correct '.patch' suffix.
Fixes: c23b9256f0 ("mediatek: replace patches with upstream version")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
When CONFIG_TARGET_PER_DEVICE_ROOTFS is enabled (as in buildbot builds),
the final per-device rootfs is assembled at root.squashfs+pkg=<hash> rather
than root.squashfs. The gen_netgear_rootfs_node.sh script was always hashing
root.squashfs (the base rootfs without device-specific packages), causing the
size and hash in the FIT node to not match the actual rootfs written to the
UBI volume, resulting in boot failure on buildbot-produced images.
Fix by using the per-device rootfs path when TARGET_PER_DEVICE_ROOTFS is set,
consistent with how include/image.mk handles the same distinction elsewhere.
Fixes: 46ab9f3f1c ("filogic: add support for Netgear EAX17")
Signed-off-by: Jascha Sundaresan <flizarthanon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22839
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Some Banana Pi BPI-R4 BE14 WiFi modules are shipped with zeroed
tx_power fields in EEPROM (2G/5G/6G). This leads to low transmit power
on affected bands.
This overlay provides known-good EEPROM data (including correct tx_power
values for 2G/5G/6G bands) dumped from a working BE14 module.
To enable BE14 overlay, add into u-boot bootconf_extra
parameter: 'mt7988a-bananapi-bpi-r4-wifi-be14'.
You can use example script:
overlay="mt7988a-bananapi-bpi-r4-wifi-be14"
current="$(fw_printenv -n bootconf_extra 2>/dev/null)"
if [ -n "${current}" ]; then
fw_setenv bootconf_extra "${current}#${overlay}"
else
fw_setenv bootconf_extra "${overlay}"
fi
Earlier proposal proposed in [1] was fallback to default values if
invalid EEPROM content is detected.
[1] https://github.com/openwrt/openwrt/pull/19503/
Fixes: https://github.com/openwrt/openwrt/issues/17489
Signed-off-by: Daniel Pawlik <pawlik.dan@gmail.com>
This commit adds support for Huasifei WH3000 Pro NAND version.
There is an eMMC already supported in OpenWrt. The only difference is NAND chip.
This commit adds common .dtsi and separate .dts
for eMMC and nand versions.
**Huasifei WH3000 Pro NAND**
Portable Wi-Fi 6 travel router based on MediaTek MT7981A SoC. MT7981B+MT7976CN+RTL8221B Dual Core 1.3GHZ with 5G modems module and PWM Fan.
**Specifications**
SoC: Filogic 820 MT7981A (1.3GHz)
RAM: DDR4 1GB
Flash: 256mb Winbond SPI NAND
WiFi: 2.4GHz and 5GHz with 3 antennas
Ethernet:
1x WAN (10/100/1000M)
1x LAN (10/100/1000/2500M)
USB: 1x USB 3.0 port
Two buttons: reset and mode (BTN_0)
LEDS: blue, red, blue+red=pink
UART: 3.3V, TX, RX, GND / 115200 8N1
M.2 (WWAN) slot
**Installation via U-Boot rescue**
1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1
2. Connect to the WAN port and hold the reset button while booting the device.
3. Wait for the LED to blink 5 times, and release the reset button.
4. Open U-boot web page on your browser at http://192.168.1.1
5. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
6. Wait for the router to flash the new firmware.
7. Wait for the router to reboot itself.
**Installation via sysupgrade**
Just flash sysupgrade file via [LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash) without saving the settings.
**Installation via SSH**
Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1` and issue a command:
```
sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000-pro-nand-squashfs-sysupgrade.bin
```
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22694
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This symbol is selected by CONFIG_BPF, which was already enabled
on generic config-6.12.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22730
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport upstream patch that adds node for thermal driver.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/22646
Signed-off-by: Robert Marko <robimarko@gmail.com>
The board is exactly identical to the ASUS RT-AX52, I've literally not changed a single thing.
Only AX52 is AX1800, PRO is AX3000.
SOC: MediaTek MT7981b
RAM: 256MB DDR3
FLASH: 128MB SPI-NAND (Winbond W25N01GV)
WIFI: Mediatek MT7981b DBDC 802.11ax 2.4/5 GHz
ETH: MediaTek MT7531 Switch
UART: 3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC)
Use the compiled asus_rt-ax52-pro-initramfs.trx file from the this repo.
Connect the PC via LAN to one of the yellow router ports and wait until your PC to get a DHCP lease.
Browse to http://192.168.50.1 or http://www.asusrouter.com/
If your router is brand new, finish the setup process and log into the Web-UI.
Navigate to Administration → Firmware Upgrade or use this link http://www.asusrouter.com/Advanced_FirmwareUpgrade_Content.asp.
Upload the .trx file to router
Wait for it to reboot
trx image is initramfs version. You must upgrade to squashfs version.
Browse to http://192.168.1.1/cgi-bin/luci/admin/system/flash
Upload asus_rt-ax52-pro-squashfs-sysupgrade.bin and use sysupgrade -n
Wait for it to reboot
SSH to 192.168.1.1 and set a root password, or browse to http://192.168.1.1
-------Revert to stock asus firmware ---------:
1: Download the rt-ax52 firmware from ASUS official website. Save the firmware to tftp server directory and rename to RT-AX52.trx
2: Connect the PC with TFTP server to the RT-AX52. Set a static ip on the ethernet interface of your PC. (ip address: 192.168.1.70, subnet mask:255.255.255.0)
3: Conect to the serial console, power on again, interrupt the autoboot process by pressing '4' when prompted. $ ubi remove linux
$ ubi remove jffs2
$ ubi remove rootfs
$ ubi remove rootfs_data
$ ubi create linux 0x45fe000
$ reset
then the dut will reboot,interrupt the autoboot process by pressing '2' when prompted. 2: Load System code then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) $: enter y
you will see the follow, type enter directly:
Input device IP (192.168.1.1) ==:
Input server IP (192.168.1.70) ==:
Input Linux Kernel filename (RT-AX52.trx) ==:
4: wait for the device run up
Signed-off-by: Emre Yavuzalp <emreyavuzalp2@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21905
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Remove unnecessary properties as there is no
reg property in child node.
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22592
Signed-off-by: Robert Marko <robimarko@gmail.com>
This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.
1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1
3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-preloader.bin BL2
mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000h-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.
Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>
This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.
1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdata" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1
3. Write new OpenWrt (U-Boot Layout) "BL2" and "FIP":
mtd -e BL2 write openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-preloader.bin BL2
mtd -e FIP write openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC: "192.168.1.254", gateway "192.168.1.1"
5. Serve openwrt-mediatek-filogic-cudy_wr3000e-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean "/dev/mtd5" ubi partition to utilize maximum of free space:
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
9. Perform sysupgrade.
Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21943
Signed-off-by: Robert Marko <robimarko@gmail.com>