Files
INAGAKI Hiroshi 0cbdab5038 qualcommax: add support for I-O DATA WN-DAX3000GR
I-O DATA WN-DAX3000GR is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based
on IPQ5018.

Specification:

- SoC             : Qualcomm IPQ5018
- RAM             : DDR3 512 MiB
- Flash           : SPI-NAND 128 MiB (Macronix MX35UF1G24AD-Z4I)
- WLAN            : 2.4/5 GHz 2T2R
  - 2.4 GHz       : Qualcomm IPQ5018 (SoC)
  - 5 GHz         : Qualcomm Atheros QCN6102
- Ethernet        : 5x 10/100/1000 Mbps
  - wan (phy)     : Qualcomm IPQ5018 (SoC)
  - lan (switch)  : Qualcomm Atheros QCA8337
- LEDs/Keys (GPIO): 7x/5x
- UART            : through-hole on PCB (J3)
  - assignment    : 3.3V, TX, RX, NC, GND from tri-angle marking
  - settings      : 115200n8
- USB             : USB 2.0 Type-A (through-hole on PCB, "J6")
- Power           : 12 VDC, 1A (Typ. 930 mA)

Flash instruction using factory.bin image:

1. Boot WN-DAX3000GR with router mode
2. Access to the WebUI ("http://192.168.0.1/") on the device and open
   the firmware update page ("ファームウェア")
3. Select the OpenWrt factory.bin image and click update ("更新") 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 rootfs

   bootconfig_rw_index 0:bootconfig rootfs

3. Set the index to inverted value

   bootconfig_rw_index 0:bootconfig rootfs <value>
   bootconfig_rw_index 0:bootconfig1 rootfs <value>

   example:

   - step2 returned "0":

     bootconfig_rw_index 0:bootconfig rootfs 1
     bootconfig_rw_index 0:bootconfig1 rootfs 1

   - step2 returned "1":

     bootconfig_rw_index 0:bootconfig rootfs 0
     bootconfig_rw_index 0:bootconfig1 rootfs 0

4. Reboot

Partition Layout (Stock FW, bootconfig(rootfs)=1):

0x000000000000-0x000000080000 : "0:SBL1"
0x000000080000-0x000000100000 : "0:MIBIB"
0x000000100000-0x000000140000 : "0:BOOTCONFIG"
0x000000140000-0x000000180000 : "0:BOOTCONFIG1"
0x000000180000-0x000000280000 : "0:QSEE"
0x000000280000-0x000000380000 : "0:QSEE_1"
0x000000380000-0x0000003c0000 : "0:DEVCFG"
0x0000003c0000-0x000000400000 : "0:DEVCFG_1"
0x000000400000-0x000000440000 : "0:CDT"
0x000000440000-0x000000480000 : "0:CDT_1"
0x000000480000-0x000000500000 : "0:APPSBLENV"
0x000000500000-0x000000640000 : "0:APPSBL"
0x000000640000-0x000000780000 : "0:APPSBL_1"
0x000000780000-0x000000880000 : "0:ART"
0x000000880000-0x000000900000 : "0:TRAINING"
0x000000900000-0x000003c40000 : "rootfs_1"
0x000003c40000-0x000003fc0000 : "Config"
0x000003fc0000-0x000007300000 : "rootfs"
0x000007300000-0x000007680000 : "Config_2"
0x000007680000-0x000007700000 : "idmkey"
0x000007700000-0x000007c00000 : "Reserved"
0x000007c00000-0x000007c80000 : "FWHEADER"
0x000007c80000-0x000007d00000 : "Factory"

Known Issues:

- This device has a Macronix MX35UF1G24AD SPI-NAND chip registered as
  oobsize=128 in Linux Kernel. But using BCH8 breaks I/O on the chip
  with the following errors, so this support uses BCH4 instead.

  [    1.542261] 0x000000480000-0x000000500000 : "0:appsblenv"
  [    1.547959] 1 fixed-partitions partitions found on MTD device 0:appsblenv
  [    1.551265] Creating 1 MTD partitions on "0:appsblenv":
  [    1.558096] 0x000000000000-0x000000040000 : "env-data"
  [    1.627282] u-boot-env-layout 79b0000.qpic-nand:flash@0:partitions:partition-0-appsblenv:partition@0:nvmem-layout: probe with driver u-boot-env-layout failed with error -74

  root@OpenWrt:~# strings /dev/mtdblock10
  [   77.806720] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
  [   77.807554] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
  [   77.815977] I/O error, dev mtdblock10, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 0
  [   77.824721] I/O error, dev mtdblock10, sector 16 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0
  [   77.834095] I/O error, dev mtdblock10, sector 24 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
  [   77.843278] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
  [   77.851577] Buffer I/O error on dev mtdblock10, logical block 0, async page read

Notes:

- This device has dual-boot feature and it's managed by the index in the
  0:bootconfig and 0:bootconfig1 partitions.

- There are through-holes on PCB for USB 2.0, but it cannot be accessed
  without disassembly of the housing. So it's not enabled in this
  support.

- WN-DAX3000GR has the "bt_fw" volume in the firmware UBI in addition to
  the volumes that will be removed in the section of ELECOM WRC-X3000GS2
  in /lib/upgrade/platform.sh.
  That volume is unnecessary for OpenWrt and add
  `remove_oem_ubi_volume bt_fw` to remove that volume when sysupgrade.
  (that function doesn't anything without errors if no specified volume)

MAC Addresses:

LAN    : 50:41:B9:xx:xx:64 (0:APPSBLENV, "ethaddr"/"eth1addr" (text))
WAN    : 50:41:B9:xx:xx:66 (0:APPSBLENV, "eth0addr" (text))
2.4 GHz: 50:41:B9:xx:xx:64 (0:APPSBLENV, "wifi0"    (text))
5 GHz  : 50:41:B9:xx:xx:65 (0:APPSBLENV, "wifi1"    (text))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19053
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-12 10:54:34 +02:00
..