I-O DATA WN-DEAX1800GR is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based
on MT7621A.
Specification:
- SoC : MediaTek MT7621A
- RAM : DDR3 256 MiB (Nanya NT5CC128M16JR-EK)
- Flash : RAW NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN : 2.4/5 GHz (MediaTek MT7915)
- Ethernet : 5x 10/100/1000 Mbps
- Switch : MT7530 (SoC)
- LEDs/Keys : 6x/3x
- UART : through-hole on PCB (J2)
- assignment: 3.3V, GND, TX, RX from "1" marking
- settings : 115200n8
- Power : 12 VDC, 1 A
Flash instruction using initramfs-factory image:
1. Boot WN-DEAX1800GR normally
2. Access to "http://192.168.0.1/" and open firmware update page
("ファームウェア")
3. Select the OpenWrt initramfs-factory.bin image and click update
("更新") button to perform firmware update
4. On the initramfs image, perform sysupgrade with the
squashfs-sysupgrade.bin image
5. Wait ~120 seconds to complete flashing
Note:
- This device has 2x OS images on the flash storage. In this support,
the first one will be used.
Warning:
- Do not use "saveenv" command on U-Boot CLI.
This device has wrong u-boot-env data. The actual length of individual
env data installed to the device is 0x1000 (4 KiB), but installed
U-Boot requires 0x20000 (128 KiB). So U-Boot determines the data is
invalid. Then, if you perform saving environment data with saveenv on
U-Boot CLI, installed env data will be overwritten with too few
default values without individual values (SSID, password, MAC
addresses, etc...).
MAC addresses:
LAN : 50:41:B9:xx:xx:F4 (Config, ethaddr (text))
WAN : 50:41:B9:xx:xx:F6 (Config, wanaddr (text))
2.4 GHz: 50:41:B9:xx:xx:F4 (Config, rmac (text) / Factory, 0x4 (hex))
5 GHz : 50:41:B9:xx:xx:F5 (none)
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
I-O DATA devices manufactured by MSTC (MitraStar Technology Corp.)
have some important flags for booting, "bootnum" and "debugflag".
The almost devices have both flags but some devices have only
"bootnum" flag.
So optimize helper functions in iodata.sh to set each flags.
- both:
- WN-AX1167GR2
- WN-AX2033GR
- WN-DX1167R
- WN-DX1200GR
- WN-DX2033GR
- "bootnum" only
- WN-DEAX1800GR
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Telenor quirks
--------------
The operator specific firmware running on the Telenor branded
ZyXEL EX5700 includes U-Boot modifications affecting the OpenWrt
installation.
Notable changes to U-Boot include
- environment is stored in RAM and reset to defaults when power
cycled
- dual partition scheme with "nomimal" or "rescue" systems, falling
back to "rescue" unless the OS signals success in 3 attempts
- several runtime additions to the device-tree
Some of these modifications have side effects requiring workarounds
- U-Boot modifies /chosen/bootargs in an unsafe manner, and will crash
unless this node exists
- U-Boot verifies that the selected rootfs UBI volume exists, and
refuses to boot if it doesn't. The chosen "rootfs" volume must contain
a squashfs signature even for tftp or initramfs booting.
- U-Boot parses the "factoryparams" UBI volume, setting the "ethaddr"
variable to the label mac. But "factoryparams" does not always
exist. Instead there is a "RIP" volume containing all the factory
data. Copying the "RIP" volume to "factoryparams" will fix this
Hardware
--------
SOC: MediaTek MT7986
RAM: 1GB DDR4
FLASH: 512MB SPI-NAND (Mikron xxx)
WIFI: Mediatek MT7986 802.11ax 5 GHz
Mediatek MT7916 DBDC 802.11ax 2.4 + 6 GHz
ETH: MediaTek MT7531 Switch + SoC
3 x builtin 1G phy (lan1, lan2, lan3)
2 x MaxLinear GPY211C 2.5 N-Base-T phy (lan4, wan)
USB: 1 x USB 3.2 Enhanced SuperSpeed port
UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC)
Installation
------------
1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
reachable at 192.168.1.2/24. Rename the image to C0A80101.img.
2. Connect the TFTP server to lan1, lan2 or lan3. Connect to the serial
console, Interrupt the autoboot process by pressing ESC when prompted.
3. Download and boot the OpenWrt initramfs image.
$ env set uboot_bootcount 0
$ env set firmware nominal
$ tftpboot
$ bootm
4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
using scp and install using sysupgrade.
$ sysupgrade -n <path-to-sysupgrade.bin>
Missing features
----------------
- The "lan1", "lan2" and "lan3" port LEDs are driven by the switch but
OpenWrt does not correctly configure the output.
- The "lan4" and "wan" port LEDs are driven by the GPH211C phys and
not configured by OpenWrt.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Implement the functionality of
target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch
in userspace, since the driver patch has been rejected as a generic solution:
https://github.com/openwrt/openwrt/pull/11435
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Netgear Nighthawk RAX120v2 AX WIFI router with 5 1G and 1 5G ports.
The majority of the code is based on @jewwest's PR #11830.
Specifications:
* CPU: Qualcomm IPQ8074 Quad core Cortex-A53 2.2GHz
* RAM: 1024MB of DDR3 (Nanya NT5CC256M16EP-EK × 2)
* Flash: SPI-NAND 512 MiB (Winbond W29N04GZBIBA)
* Ethernet: 4x 10/100/1000 Mbps LAN,
1x 10/100/1000 Mbps WAN (Qualcomm QCA8075),
1x 10/100/1000/2500/5000 Mbps LAN/WAN (Aquantia AQR111B0 PHY)
* Wi-Fi:
* 2.4 GHz: Qualcomm QCN5024 4x4
* 2x 5 GHz: Qualcomm QCN5054 4x4
* USB: 2x USB 3.0
* LEDs: Power, 2.4GHz & 5GHz Radio, WPS, WAN, USB1 & USB2, 5G LAN
* Keys: LEDs On/Off, Power, Reset, RFKILL, WPS
* UART: Marked J9003 VCC TX RX GND, beginning from "1". 3.3v, 115200n8
* Power: 19 VDC, 3.1 A
Installation:
* Flashing OpenWrt is done in two steps:
a) Flash *-squashfs-web-ui-factory.img from stock UI (thanks to @wangyu-).
This writes an initramfs based OpenWrt image onto the RAX120v2
b) From OpenWrt flash the *-squashfs-sysupgrade.bin using LuCI or the commandline
* U-Boot allows booting an initramfs image via TFTP:
- Set ip of your PC to 192.168.1.100
- At the serial console interrupt boot at "Hit any key to stop autoboot:"
- In u-boot run `tftpsrv`
- On your PC send the OpenWrt initramfs image:
tftp 192.168.1.1 -m binary -c put openwrt-ipq807x-generic-netgear_rax120v2-initramfs-uImage.itb
Make 5G Aquantia phy work:
For the 5G port labeled 'lan5' to work a firmware is needed. This can be loaded in
u-boot by writing the firmware to the correct mtd partition.
The firmware file found in the Netgear stock firmware under /lib/firmware/ named
'AQR-G3_v4.3.C-AQR_DNI_DR-EQ35AX8-R-prov1_ID23888_VER1311.cld' is needed and has to
be converted to a MBN file.
The `mkheader.py` script used here can be found in the Netgear V1.2.8.40 GPL source,
under 'git_home/u-boot.git/tools/mkheader.py'
Convert the CLD file to MBN using:
$ python2 mkheader.py 0x44000000 0x13 <*.cld file> aqr_4.3.C.mbn
This MBN file can then be flashed to the MTD partition to be used by u-boot.
The necessary files can also be found in
https://github.com/boretom/openwrt-fork/tree/rax120v2/aquantia-firmware
* Write MBN file to MTD partition to be loaded automatically by u-boot:
U-boot automatically tries to load the firmware from nand at address 0x7e00000 which
corresponds to `/dev/mtd25` in OpenWrt.
- find ETHPHYFW partition while running OpenWrt (expected: /dev/mtd25)
$ fgrep -i 'ethphyfw' /proc/mtd
mtd25: 00080000 00020000 "ethphyfw
- copy mbn file to /tmp/ folder of the router
$ scp aqr-v4.3.C.mbn 192.168.1.1:/tmp/
- write mbn file to ethphyfw partition
$ mtd write /tmp/aqr_v4.3.C.mbn /dev/mtd25
Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.
References to RAX120v2 GPL source:
https://www.downloads.netgear.com/files/GPL/RAX120-V1.2.8.40_gpl_src.zip
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>
qca8k driver we are currently based of is rather out of date and is lacking
support for setting the ageing time or fast ageing so until we update the
driver lets just backport support for those from qca8k.
Signed-off-by: Robert Marko <robimarko@gmail.com>
The ZTE MF287 Pro is a LTE router used (exclusively?) by the network
operator "3". It is very similar to the MF287+, but the hardware layout
and partition layout have changed quite a bit.
Specifications
==============
SoC: IPQ4018
RAM: 256MiB
Flash: 8MiB SPI-NOR + 128MiB SPI-NAND
LAN: 4x GBit LAN
LTE: ZTE Cat12
WiFi: 802.11a/b/g/n/ac SoC-integrated
USB: 1x 2.0
MAC addresses
=============
LAN: from config + 2
WiFi 1: from config
WiFi 2: from config + 1
Installation
============
Option 1 - TFTP
---------------
TFTP installation using UART is preferred. Disassemble the device and
connect serial. Put the initramfs image as openwrt.bin to your TFTP server
and configure a static IP of 192.168.1.100. Load the initramfs image by
typing:
setenv serverip 192.168.1.100
setenv ipaddr 192.168.1.1
tftpboot 0x82000000 openwrt.bin
bootm 0x82000000
From this intiramfs boot you can take a backup of the currently installed
partitions as no vendor firmware is available for download:
ubiattach -m17
cat /dev/ubi0_0 > /tmp/ubi0_0
cat /dev/ubi0_1 > /tmp/ubi0_1
Copy the files /tmp/ubi0_0 and /tmp/ubi0_1 somewhere save.
Once booted, transfer the sysupgrade image and run sysupgrade. You might
have to delete the stock volumes first:
ubirmvol /dev/ubi0 -N ubi_rootfs
ubirmvol /dev/ubi0 -N kernel
Option 2 - From stock firmware
------------------------------
The installation from stock requires an exploit first. The exploit consists
of a backup file that forces the firmware to download telnetd via TFTP from
192.168.0.22 and run it. Once exploited, you can connect via telnet and
login as admin:admin.
The exploit will be available at the device wiki page.
Once inside the stock firmware, you can transfer the -factory.bin file to
/tmp by using "scp" from the stock frmware or "tftp".
ZTE has blocked writing to the NAND. Fortunately, it's easy to allow write
access - you need to read from one file in /proc. Once done, you need to
erase the UBI partition and flash OpenWrt. Before performing the operation,
make sure that mtd13 is the partition labelled "rootfs" by calling
"cat /proc/mtd".
Complete commands:
cd /tmp
tftp -g -r factory.bin 192.168.0.22
cat /proc/driver/sensor_id
flash_erase /dev/mtd17 0 0
dd if=/tmp/factory.bin of=/dev/mtdblock17 bs=131072
Afterwards, reboot your device and you should have a working OpenWrt
installation.
Restore Stock
=============
Option 1 - via UART
-------------------
Boot an OpenWrt initramfs image via TFTP as for the initial installation.
Transfer the two backed-up files to your box to /tmp.
Then, run the following commands - replace $kernel_length and $rootfs_size
by the size of ubi0_0 and ubi0_1 in bytes.
ubiattach -m 17
ubirmvol /dev/ubi0 -N kernel
ubirmvol /dev/ubi0 -N rootfs
ubirmvol /dev/ubi0 -N rootfs_data
ubimkvol /dev/ubi0 -N kernel -s $kernel_length
ubimkvol /dev/ubi0 -N ubi_rootfs -s $rootfs_size
ubiupdatevol /dev/ubi0_0 /tmp/ubi0_0
ubiupdatevol /dev/ubi0_1 /tmp/ubi0_1
Option 2 - from within OpenWrt
------------------------------
This option requires to flash an initramfs version first so that access
to the flash is possible. This can be achieved by sysupgrading to the
recovery.bin version and rebooting. Once rebooted, you are again in a
default OpenWrt installation, but no partition is mounted.
Follow the commands from Option 1 to flash back to stock.
LTE Modem
=========
The LTE modem is similar to other ZTE devices and controls some more LEDs
and battery management.
Configuring the connection using uqmi works properly, the modem
provides three serial ports and a QMI CDC ethernet interface.
Other Notes
===========
Contrary to the stock firmware, the USB port on the back can be used.
There is one GPIO Switch "Power button blocker" which, if enabled, does not
trigger a reset of the SoC if the modem reboots. If disabled, the SoC is
rebooted along with the modem. The modem can be rebooted via the exported
GPIO "modem-reset" in /sys/class/gpio.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Backport patch adding support for LED PHY directly in PHY ops struct.
Add new PHYLIB_LEDS config and refresh patches.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
ASUS RT-AC3100 is ASUS RT-AC88U without the external switch.
OpenWrt forum users effortless and ktmakwana have confirmed that there are
revisions with either 4366b1 or 4366c0 wireless chips.
Therefore, include firmware for 4366b1 along with 4366c0. This way, all
hardware revisions of the router will be supported by having brcmfmac use
the firmware file for the wireless chip it detects.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
This reverts commit 79af0593a3.
A hack adjusting fw_devlink value was added to workaround issue with
probing device drivers caused by of_platform_populate(). With upstream
mtd commit (the one adding OF_POPULATED) backported there is no need for
that hack anymore.
Ref: 3eebb91317 ("kernel: backport proper fix for mtd preventing devices probing")
Ref: #10232
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
DK01 and DK04 board support has been in a form of 2 patches that we have
been carrying for a long time.
Both of the patches contain weird changes, dont follow any DT syntax and I
honestly doubt they are even valid.
DK01 and DK04 also have not been converted to DSA even after a long time
and I doubt that anybody in the community even has these boards as they are
QCA reference boards that are not even obtainable anymore.
Since patches for these 2 boards have been just causing us pain when trying
to update the kernel to a new major release or even point releases lets
remove the support for these boards, and if there are users they can easily
be reinstated.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Teltonika RUTX currently is the only device pulling in DK01 DTSI and thus
preventing removal of DK01 and DK04 support.
So, lets add the missing nodes from DK01 DTSI and use the SoC DTSI instead.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Lets add a proper commit title and description to the SCM cold boot
patch so it applies with a git apply or git-am.
Signed-off-by: Robert Marko <robimarko@gmail.com>
SCM SDI disable support is pending upstream, so lets use that instead.
Since the board check needs to be split out, export it with a header so
it applies with git-am.
Signed-off-by: Robert Marko <robimarko@gmail.com>
This change makes it possible to use the GPIO_OPEN_DRAIN /
GPIO_OPEN_SOURCE Flags when exporting GPIOs via dts.
We need to emulate the open-source or open-drain functionalities for the
initial value, because the used functions (gpiod_direction_output_raw)
do not take this into account.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
The kernel FSL_ENETC_QOS option is only a compile time
option, it does not result in a separate module being built.
Set it to 'y' to resolve a warning from the kernel compile:
.config:2654:warning: symbol value 'm' invalid for FSL_ENETC_QOS
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Fixes: c3151b6f04 ("armvirt: 64: add support for other SystemReady-compatible vendors")
When comparing the generated OpenWrt .config to the Linux arm64
defconfig, I noticed these SATA controllers were not included.
As they may be used as a boot drive, they should be built into
the kernel.
CONFIG_SATA_MVEBU is for Marvell platforms.
CONFIG_SATA_QORIQ is for NXP Layerscape.
CONFIG_SATA_SIL24 is for Arm's Juno development board, see Linux
kernel commit d7c38ff1cd86 ("arm64: defconfig: Add Juno SATA
controller").
Signed-off-by: Mathew McBride <matt@traverse.com.au>
This MDIO driver was already being built, but not installed due
to being selected by the ThunderX Ethernet driver.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
The initial armv8 module incorrectly labelled the Thunder(v1) as
supporting the ThunderX2, when they have different drivers.
Add kmod-octeon-tx2 to support the newer devices.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
This turns on various PCI related options which are enabled
in the Linux kernel arch/arm64/configs/defconfig but not
yet in the OpenWrt config.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
These are used by common Broadcom SoC's like
the BCM2711 (RPi4) and iProc network processor.
Tested on the RPi4B using the Raspberry Pi
UEFI+ACPI firmware[1].
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[1] - https://github.com/pftf/RPi4
This is part of an effort to reduce differences between
the OpenWrt armsr/armv8 config and Linux arm64 defconfig.
This enables CONFIG_ARCH_BCM and downstream
CONFIG_ARCH_BCM2835 (= BCM2711 like Raspberry Pi 4)
and CONFIG_ARCH_BCM_IPROC (Broadcom iProc packet processors).
The broadband specific SoC's (ARCH_BCMBCA) are left out
as it is assumed these will not be doing EFI boot.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Renesas markets several embedded Arm64 SoCs in the
RZ series (RZ/G, RZ/V), so should be enabled in
a general purpose target.
Automotive (R-Car) SoC's are not enabled by this change.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Due to an error on my part, Anton Antonov's
i.MX changes[1] did not fully make it into my
armvirt kernel 6.1 EFI pull request. I have updated
them using the options he supplied[1] as well
as comparing to the Linux arm64 defconfig.
The notable exception is:
CONFIG_USB_DWC3_OF_SIMPLE currently disabled
due to an issue with i.MX8P and i.MX8Q.
Fixes: 3efb3b8 ("armvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support")
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[1] - ccf826c344
A review of the generated OpenWrt kernel .config
vs the Linux arm64 defconfig showed that this
option was not being enabled, as it is disabled
in OpenWrt's generic config.
ACPI_BUTTON is needed to report and respond to
power button events, so it should be enabled.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
To bring the armsr/armv8 kernel configuration closer to the Linux
arm64 defconfig, synchronize options related to CPU features
(especially more recent Armv8.X variants), scheduler, EFI vars,
CMA and scheduler options.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
x86/64 enables support for KVM so I can't see a reason why
not on armsr/armv8 as well.
Arm CPU errata workaround items related to virtualization
are also enabled by this change.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
To reduce differences with the Linux arm64 defconfig,
sync the enabled erratum items with defconfig.
There are still some options not selected due to
CONFIG_KVM or other options not enabled in OpenWrt
by default.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
This compiles the CONFIG_PTP_1588_CLOCK support into the kernel binary
and activates the drivers for KVM and VMware which allow syncing the
host time with the VM when OpenWrt is running in a VM. With this change
the CONFIG_HYPERV_UTILS driver is now build into the kernel, because it
depends on the PTP framework being compiled in. CONFIG_HYPERV_UTILS was
build as a module, but not packages before.
Fixes: #13277
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This activates PCI Express ASPM control in Linux. Without this option it
is completely controlled by the BIOS, now Linux will take over and apply
some workarounds if needed.
Fixes: #13248
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It seems that the Meraki bootloader does not respect the kernel ARM booting
specification[1] that requires that address where DTB is located needs to
be 64-bit aligned and often places the DTB on a non 64-bit aligned address
and then kernel fails to find the DTB magic and fails to boot.
Even worse, there is no prints until early printk is enabled and then its
visible that kernel is trying to find the ATAG-s as DTB was not found or
is invalid.
Unifi 6 devices had the same issue and it can be solved by passing the
load adress as part of the FIT image.
It seems that the vendor was aware of the issue and is always relocating
the DTB to 0x89000000, so lets just do the same.
Now that booting is reliable, reenable default images for the Meraki MR33
and MR74 devices.
Reviewed-by: Lech Perczak lech.perczak@gmail.com
Signed-off-by: Robert Marko <robimarko@gmail.com>
ipq40xx was converted to DSA and swconfig is not being included at all in
the default packages so there is no need to drop it from device packages.
Signed-off-by: Robert Marko <robimarko@gmail.com>
MR33 and MR74 share pretty much everything in the image recipe, so lets
extract a common recipe to avoid duplication.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Rename two patches which were only accepted in Linux 6.2, but were
marked as if they were accepted in Linux 6.1.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
the Marvell 10G PHY driver is no way specific to ARM SystemReady
systems, it frequently occurs on SFP+ copper modules and is useful on
many targets.
Hence it been added to package/kernel/linux/modules/netdevices and we
can remove the now redundant target-specific module.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
A dependency of the MT7988 MMC host controller on the SoC's RTC clock
being running has been discovered. Mark RTC clock as critical to fix
MMC host on MT7988.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The Bananapro board has an Ampak 6181 onboard (BCM43362/1), enable
the firmware files in the device profile, and add wpad-basic-mbedtls.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
The X-Powers AC100 is a multi-function IC used to provide RTC
and audio codec via RSB (reduced serial bus, an Allwinner-
speciality). On some boards using the A80/A83T SoCs, aside
from the RTC functionality, the RTC is used as a clocksource
for the Ampak WiFi/BT modules.
Add modules for the core MFD support and the RTC.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
This has been a part of modified upstream patch but got lost on major
kernel bump to 5.15, so bring it back.
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
[Add patch for kernel 6.1 too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The v6.1 kernel has moved around the options for the RTL8366RB
DSA switch used in the DIR-685 so it was missing when building
the kernel. Fix it up by adding the right Kconfig options.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>