Help completing dts for ZyXEL WRE6505 (mt7620a + mt7610e)

-I'm successfully booting a ramdisk via tftp on this device, but hardware is still a bit scrambled.
Here's dmesg from the current effort:

root@OpenWrt:/# dmesg
[    0.000000] Linux version 4.14.132 (root@086644cdc31f) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10602-679a01f)) #0 Thu Jul 25 14:17:51 2019
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is ZyXEL WRE6505
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 804df760, node_mem_map 81000040
[    0.000000]   Normal zone: 144 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x4a0 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600n8 root=/dev/ram0 rootfstype=ramfs rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00030110
[    0.000000] Readback ErrCtl register=00030110
[    0.000000] Memory: 56448K/65536K available (3913K kernel code, 187K rwdata, 892K rodata, 3128K init, 213K bss, 9088K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015471] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087720] pid_max: default: 32768 minimum: 301
[    0.097169] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110187] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.130566] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.150054] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.162269] pinctrl core: initialized pinctrl subsystem
[    0.173123] NET: Registered protocol family 16
[    0.664718] PCI host bridge /pcie@10140000 ranges:
[    0.674119]  MEM 0x0000000020000000..0x000000002fffffff
[    0.684489]   IO 0x0000000010160000..0x000000001016ffff
[    0.713409] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.724449] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.737493] PCI host bridge to bus 0000:00
[    0.745491] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.759211] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.770937] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.784437] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.800231] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.800271] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.800287] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.800367] pci 0000:00:00.0: supports D1
[    0.800378] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.800642] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.816662] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.816719] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.816870] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.817102] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.817150] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.817285] pci 0000:01:00.1: supports D1
[    0.817296] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.817518] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.817536] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.817590] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.830646] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.844455] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.857954] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.871461] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.884960] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.898457] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.908308] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.926267] clocksource: Switched to clocksource systick
[    0.938004] NET: Registered protocol family 2
[    0.947469] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.961247] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.973832] TCP: Hash tables configured (established 1024 bind 1024)
[    0.986612] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.998135] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.010875] NET: Registered protocol family 1
[    1.019516] PCI: CLS 0 bytes, default 32
[    2.866291] random: fast init done
[    4.538207] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    4.550975] Crashlog allocated RAM at address 0x3f00000
[    4.563313] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    4.583224] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.594729] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    4.705887] io scheduler noop registered
[    4.713596] io scheduler deadline registered (default)
[    4.724547] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.738155] console [ttyS0] disabled
[    4.745151] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    4.764927] console [ttyS0] enabled
[    4.778696] bootconsole [early0] disabled
[    4.795111] cacheinfo: Failed to find cpu0 device node
[    4.805380] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    4.818738] libphy: Fixed MDIO Bus: probed
[    4.838774] gsw: setting port4 to ephy mode
[    4.847185] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 4 link up (100Mbps/Full duplex)
[    4.865436] mtk_soc_eth 10100000.ethernet: generated random MAC address 3a:ad:de:c1:37:a5
[    4.881829] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    4.894339] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    4.911370] rt2880_wdt 10000120.watchdog: Initialized
[    4.922917] NET: Registered protocol family 10
[    4.936007] Segment Routing with IPv6
[    4.943487] NET: Registered protocol family 17
[    4.952423] 8021q: 802.1Q VLAN Support v1.8
[    4.980408] Freeing unused kernel memory: 3128K
[    4.989466] This architecture does not have kernel memory protection.
[    5.017471] init: Console is alive
[    5.024498] init: - watchdog -
[    5.056955] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.082219] usbcore: registered new interface driver usbfs
[    5.093313] usbcore: registered new interface driver hub
[    5.104058] usbcore: registered new device driver usb
[    5.120092] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.135048] ehci-platform: EHCI generic platform driver
[    5.148551] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.162399] ohci-platform: OHCI generic platform driver
[    5.175329] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.194108] init: - preinit -
[    5.390768] 8021q: adding VLAN 0 to HW filter on device eth0
[    6.567379] procd: - early -
[    6.573329] procd: - watchdog -
[    6.783558] procd: - watchdog -
[    6.790129] procd: - ubus -
[    6.803408] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.827060] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.840347] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.854244] procd: - init -
[    7.338452] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.383750] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    7.408462] urngd: jent-rng init failed, err: 2
[    7.427899] Loading modules backported from Linux version v5.2-rc7-0-g6fbc7275c7a9
[    7.443060] Backport generated by backports.git v5.2-rc7-1-0-g021a6ba1
[    7.460498] ip_tables: (C) 2000-2006 Netfilter Core Team
[    7.481131] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    7.561887] xt_time: kernel timezone is -0000
[    7.635102] PPP generic driver version 2.4.2
[    7.646778] NET: Registered protocol family 24
[    7.685412] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[    7.706017] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[    7.724288] rt2800_wmac 10180000.wmac: Falling back to user helper
[    7.789664] firmware soc_wmac.eeprom: firmware_loading_store: map pages failed
[    7.804344] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.
[    7.821253] rt2800_wmac: probe of 10180000.wmac failed with error -11
[    7.861067] kmodloader: done loading kernel modules from /etc/modules.d/*
[   24.698142] 8021q: adding VLAN 0 to HW filter on device eth0
[   24.733441] br-lan: port 1(eth0.1) entered blocking state
[   24.744278] br-lan: port 1(eth0.1) entered disabled state
[   24.755436] device eth0.1 entered promiscuous mode
[   24.765037] device eth0 entered promiscuous mode
[   24.851862] br-lan: port 1(eth0.1) entered blocking state
[   24.862656] br-lan: port 1(eth0.1) entered forwarding state
[   24.873996] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   25.762835] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   60.076913] random: crng init done
[   60.083701] random: 7 urandom warning(s) missed due to ratelimiting

Here's the current (skeleton) dts:

/dts-v1/;

#include "mt7620a.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
        compatible = "zyxel,wre6505", "ralink,mt7620a-soc";
        model = "ZyXEL WRE6505";

        chosen {
                bootargs = "console=ttyS0,57600n8 root=/dev/ram0 rootfstype=ramfs";
        };


        pinctrl {
                state_default: pinctrl0 {
                        gpio {
                                ralink,group = "uartf";
                                ralink,function = "gpio";
                        };
                };
        };

};

&pcie {
        status = "okay";
};

It boots, and I only get serial console access with the pinctrl entry present. I would like to be able to know what to put in the dts so that the eth and wifi adaptors (when the wifi works) correctly assign their MACs from the factory settings, instead of a randomly generated one.

-I have full serial console access to the existing firmware, kernel 2.6.36. I can perform a large number of commands there to get extra info about the hardware and addresses, but don't really know where to look. :frowning:

Here is its bootlog:

Starting kernel ...



LINUX started...

 THIS IS ASIC
Linux version 2.6.36 (root@fedora23) (gcc version 3.4.2) #58 Mon Sep 11 15:23:05 CST 2017

 The CPU feqenuce set to 580 MHz
 PCIE: bypass PCIe DLL.
 PCIE: Elastic buffer control: Addr:0x68 -> 0xB4
 disable all power about PCIe
CPU revision is: 00019650 (MIPS 24Kc)
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00004000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00004000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock5 console=ttyS1,57600 root=/dev/mtdblock5 rootfstype=squashfs
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=00020110
Readback ErrCtl register=00020110
Memory: 61660k/65536k available (2447k kernel code, 3876k reserved, 497k data, 148k init, 0k highmem)
NR_IRQS:128
console [ttyS1] enabled
Calibrating delay loop... 386.04 BogoMIPS (lpj=772096)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 512
Ralink gpio driver initialized
led=29, on=2, off=2, blinks,=4000, reset=1, time=4000
Create successful!!!
NET: Registered protocol family 16
RALINK_GPIOMODE = 1a171d
RALINK_GPIOMODE = 18171d
PPLL_CFG1=0xe6c000
MT7620 PPLL lock
PPLL_DRV =0x80080504
start PCIe register access
RALINK_PCI_PCICFG_ADDR = 1000f0

*************** MT7620 PCIe RC mode *************
bio: create slab <bio-0> at 0
vgaarb: loaded
pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
pci 0000:00:00.0: BAR 1: set to [mem 0x20200000-0x2020ffff] (PCI address [0x20200000-0x2020ffff]
pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
pci 0000:01:00.0: BAR 0: set to [mem 0x20000000-0x200fffff] (PCI address [0x20000000-0x200fffff]
pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
pci 0000:01:00.1: BAR 0: set to [mem 0x20100000-0x201fffff] (PCI address [0x20100000-0x201fffff]
pci 0000:00:00.0: PCI bridge to [bus 01-01]
pci 0000:00:00.0:   bridge window [io  disabled]
pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
pci 0000:00:00.0:   bridge window [mem pref disabled]
BAR0 at slot 0 = 0
bus=0x0, slot = 0x0
res[0]->start = 0
res[0]->end = 0
res[1]->start = 20200000
res[1]->end = 2020ffff
res[2]->start = 0
res[2]->end = 0
res[3]->start = 0
res[3]->end = 0
res[4]->start = 0
res[4]->end = 0
res[5]->start = 0
res[5]->end = 0
bus=0x1, slot = 0x0
res[0]->start = 20000000
res[0]->end = 200fffff
res[1]->start = 0
res[1]->end = 0
res[2]->start = 0
res[2]->end = 0
res[3]->start = 0
res[3]->end = 0
res[4]->start = 0
res[4]->end = 0
res[5]->start = 0
res[5]->end = 0
bus=0x1, slot = 0x0
res[0]->start = 20100000
res[0]->end = 201fffff
res[1]->start = 0
res[1]->end = 0
res[2]->start = 0
res[2]->end = 0
res[3]->start = 0
res[3]->end = 0
res[4]->start = 0
res[4]->end = 0
res[5]->start = 0
res[5]->end = 0
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
Load Ralink Timer0 Module
Load Ralink Timer1 Module
squashfs: version 4.0 (2009/01/31) Phillip Lougher
fuse init (API version 7.15)
msgmni has been set to 120
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x10000500 (irq = 37) is a 16550A
serial8250: ttyS1 at MMIO 0x10000c00 (irq = 12) is a 16550A
brd: module loaded
deice id : c2 20 17 c2 20 (2017c220)
MX25L6405D(c2 2017c220) (8192 Kbytes)
mtd .name = raspi, .size = 0x00800000 (0M) .erasesize = 0x00000008 (0K) .numeraseregions = 65536
Creating 6 MTD partitions on "raspi":
0x000000000000-0x000000800000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000170000 : "Kernel"
0x000000170000-0x000000800000 : "RootFS"
rdm_major = 253
SMACCR1 -- : 0x0000588b
SMACCR0 -- : 0xf39a9d3c
Ralink APSoC Ethernet Driver Initilization. v3.0  256 rx/tx descriptors allocated, mtu = 1500!
SMACCR1 -- : 0x0000588b
SMACCR0 -- : 0xf39a9d3c
PROC INIT OK!
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
NET: Registered protocol family 24
PPTP driver version 0.8.5
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (963 buckets, 3852 max)
IPVS: Registered protocols ()
IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
IPVS: ipvs loaded.
GRE over IPv4 demultiplexor driver
gre: can't add protocol
ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone
TCP cubic registered
NET: Registered protocol family 17
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
L2TP IP encapsulation support (L2TPv3)
L2TP netlink interface
L2TP ethernet pseudowire support (L2TPv3)
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
Freeing unused kernel memory: 148k freed

init started: BusyBox v1.12.1 (2017-03-29 11:17:30 CST)

starting pid 21, tty '': '/etc_ro/rcS'
Algorithmics/MIPS FPU Emulator v1.5
devpts: called with bogus options
mount: mounting none on /proc/bus/usb failed: No such file or directory
Welcome to
    _______  _______  ___     __  ____   _  _   ___
    |  ___  \|   __  ||   |   |__||    \ | || | /  /
    | |___| ||  |__| ||   |__  __ |     \| || |/  /
    |   _   /|   _   ||      ||  || |\     ||     \
    |__| \__\|__| |__||______||__||_| \____||_|\___\

   	             =System Architecture Department=

Start nvram
modprobe: /etc/modprobe.d: No such file or directorynvmtd_init: 41

Creating 1 MTD partitions on "ALL":
0x0000007f0000-0x000000800000 : "EDINVRAM"
Creating 1 MTD partitions on "ALL":
0x0000007e0000-0x0000007f0000 : "EDIENVRAM"
modprobe: /etc/modprobe.d: No such file or directory
edi_nvram_init: 1049
nvload, 296: crc ok :len=65536;44c15483:44c15483
Start basic
Password for 'root' changed
Password for 'admin' changed
Fri Dec  1 01:01:00 GMT 2000
Set: phy[0].reg[0] = 3900
Set: phy[1].reg[0] = 3900
Set: phy[2].reg[0] = 3900
Set: phy[3].reg[0] = 3900
MTD Type: 3
MTD total size: 800000 bytes
MTD erase size: 10000 bytes
buf[0] = 0x8c
buf[1] = 0x88
buf[2] = 0xff
buf[3] = 0x07
buf[4] = 0x00
buf[5] = 0x0b
buf[6] = 0x00
buf[7] = 0x00
buf[8] = 0x00
buf[9] = 0x0e
buf[10] = 0x00
buf[11] = 0x00
buf[12] = 0x00
buf[13] = 0x0d
buf[14] = 0x00
buf[15] = 0x00
buf[16] = 0xff
buf[17] = 0xff
buf[18] = 0x00
buf[19] = 0x00
e2p=0x42==[0x07ff]
Start cmd_agent
Start lan
wifi_24G_configured():line-116-->e[0;32;31mretval=0

e[mlan haha1 ip route add 192.168.1.2 via 0.0.0.0 dev br0Start wl

==========Enable 2G Wireless==========
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
device ra0 is not a slave of br0
interface ra1 does not exist!
interface ra2 does not exist!
interface ra3 does not exist!
interface apcli0 does not exist!
device eth2 is not a slave of br1
device eth2 is already a member of a bridge; can't enslave it to bridge br0.
Start wl5g

==========Enable 5G Wireless==========
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
device rai0 is not a slave of br1
interface rai1 does not exist!
interface rai2 does not exist!
interface rai3 does not exist!
interface apclii0 does not exist!
device rai0 is not a slave of br0
device rai0 is not a slave of br1
Start wlap
start_ap_wlan,1088,This is repeater mode, no start wlap !
Start wlap5g
start_wlanap_5g,1438,This is repeater mode, no start wl5gap !
Start sysmode
Start udhcpd
Start web
udhcp server (v0.9.8) started
Adding password for admin.
socket: Bad file descriptor
mini_httpd: started as root without requesting chroot(), warning only
Start ntp
Start crontab
tock.stdtime.gov.tw: Unknown host
Dec  1 01:01:14 crond[271]: crond (busybox 1.12.1) started, log level 8


Start system_probe
Start netbios
Start dnrd
Notice: caching turned off
Start hjdns
Start genpin
Start wl_backup
start_wl_backup():backup.....
wlanap2GApCliAuthMode=0
wlanap2GApCliEncrypType=0
wlanap2GApCliSsid=
wlanap2Gchannel=0
wlanap2GApCliCTBssid=
wlanap2GApCliDefaultKeyID=1
wlanap2GApCliKeyType=0
wlanap2GApCliWPAPSK=
wlanap2GApCliKey1Str=
wlanap2GApCliKey2Str=
wlanap2GApCliKey3Str=
wlanap2GApCliKey4Str=
sys_mode_client_bandBackup=2Start wl5g_backup
start_wl5g_backup():backup.....
wlanap5GApCliAuthMode=0
wlanap5GApCliEncrypType=0
wlanap5GApCliSsid=
wlanap5Gchannel=0
wlanap5GApCliCTBssid=
wlanap5GApCliDefaultKeyID=1
wlanap5GApCliKeyType=0
wlanap5GApCliWPAPSK=
wlanap5GApCliKey1Str=
wlanap5GApCliKey2Str=
wlanap5GApCliKey3Str=
wlanap5GApCliKey4Str=
sys_mode_client_bandBackup=2Start zy1905
Restart crontab
Start doSiteSurvey
** zy1905 Version : 20150908 **
@@ get_zy1905_debuglevel(111): zy1905_dbg=1

@@ getFirmwareVersion(2261): 

@@ getHostname(2295): 

** zy1905 lib Version : 20151001 **
@@ zyNetCtrl_WPS_setWPSConfig(563): 

Dec  1 01:01:15 crond[323]: crond (busybox 1.12.1) started, log level 8


Restart wl5g
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
device rai0 is not a slave of br1
interface rai1 does not exist!
interface rai2 does not exist!
interface rai3 does not exist!

==========Enable 5G Wireless==========
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
ifconfig: ioctl 0x8913 failed: No such device
ioctl error
device rai0 is not a slave of br1
interface rai1 does not exist!
interface rai2 does not exist!
interface rai3 does not exist!
device apclii0 is not a slave of br1
device rai0 is not a slave of br0
device rai0 is not a slave of br1
Restart sysmode

starting pid 407, tty '/dev/ttyS1': '/bin/sh'


BusyBox v1.12.1 (2017-03-29 11:17:30 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# 

Here is my target/linux/ramips/image/mt7620.mk addition:

define Device/zyxel_wre6505
  MTK_SOC := mt7620a
  IMAGE_SIZE := 7872k
  DEVICE_VENDOR := ZyXEL
  DEVICE_MODEL := WRE6505
  KERNEL := $(KERNEL_DTB) | uImage lzma
  DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option \
kmod-sdhci-mt7620
  SUPPORTED_DEVICES += zyxel_wre6505
endef
TARGET_DEVICES += zyxel_wre6505

I need help to complete the dts file for this hardware - I don't know exactly what I'm doing to complete it correctly.

Does this hardware combination present problems which prevent it from ever 'really working'?

It looks like you've gotten quite far already! You've got OpenWrt running on the device and probably can SSH into it.

What isn't working properly?

Do you have the "mach" file from the OEM source? It can reveal GPIO assignments and the like which are helpful.

Edit: I didn't see the GPL Corresponding Source on the website, but did find https://www.zyxel.com/form/gpl_oss_software_notice.shtml to request it.

Wireshark shows the eth adaptor I tftp boot via, trying to get an IP via DHCP. Ping doesn't work there yet, so I guess the device thinks the eth port is the 'WAN' port.

There is no OEM source for this device as best I can tell.

What's currently not working (I've experimented with various gpio settings and copied from other dts files, no joy):

-nothing

Fixed

-auto eth/wifi firmware loading
-2.4G wifi
-5G wifi
-LEDs
-pushbuttons (WPS)

Edit: made a request for the source code :slight_smile:

This is common with bring-up of single-port devices. Changing etc/board.d/02_network for your board should allow that to be configured as "LAN" on boot. While I haven't used MediaTek-based devices myself, from target/linux/ath79/base-files/etc/board.d/02_network

        case "$board" in
        adtran,bsap1800-v2|\
        adtran,bsap1840|\
[...]
        wd,mynet-wifi-rangeextender|\
        winchannel,wb2000)
                ucidef_set_interface_lan "eth0"
                ;;

Oh! Thank you. That worked :slight_smile: recompiles kernel and image

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr D2:44:10:2F:A4:D9
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::d044:10ff:fe2f:a4d9/64 Scope:Link
          inet6 addr: fd07:2ce8:4f54::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:184 (184.0 B)  TX bytes:1784 (1.7 KiB)

eth0      Link encap:Ethernet  HWaddr D2:44:10:2F:A4:D9
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1490 (1.4 KiB)  TX bytes:3343 (3.2 KiB)
          Interrupt:5

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:544 (544.0 B)  TX bytes:544 (544.0 B)

root@OpenWrt:/# ping 192.168.1.5
PING 192.168.1.5 (192.168.1.5): 56 data bytes
64 bytes from 192.168.1.5: seq=0 ttl=64 time=0.980 ms
64 bytes from 192.168.1.5: seq=1 ttl=64 time=0.740 ms

Still random MACs tho.

I also have a 512 byte MT7620_AP_2T2R-4L_V13.BIN from the OEM firmware. The chips on the board are definitely [mt7620a + mt7610e]

1 Like

They're often tucked away in a partition somewhere, at least on QCA-based devices.

hexdump -C

on the Config and Factory partitions might be insightful. See ramips_setup_macs() in 02_network

I didn't see partition definitions in linux/arch/mips/boot/dts/ralink/mt7620a.dtsi or your DTS -- that should help a variety of things if it's not there. Take a look at a similar device's DTS for clues as to how to define them, as well as https://openwrt.org/docs/guide-developer/defining-firmware-partitions#defining_software_partitions_in_all_dts_targets

Potentially some firmware or cal data. Perhaps someone with more ramips experience can comment.

I'll dig in those partitions. When I had those MTD partitions defined as below, nothing was (correctly) detected - I think the MTD device also depends on another device on the PCIe like gpio or so(?). More guess-work in the dts.

&spi0 {
        status = "okay";

        m25p80@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <1000000>;

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        bootloader: partition@0 { //bootloader
                                label = "u-boot";
                                reg = <0x0 0x30000>;
                                read-only;
                        };

                        config: partition@30000 { //config
                                label = "u-boot-env";
                                reg = <0x30000 0x10000>;
                                read-only;
                        };

                        factory: partition@40000 {
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
                        };

                        kernel: partition@50000 {
                                compatible = "denx,uimage";
                                label = "kernel";
                                reg = <0x50000 0x120000>;
                                //reg = <0x50000 0x7b0000>;
                        };

                        rootfs: partition@170000 {
                                label = "rootfs";
                                reg = <0x170000 0x690000>;
                                read-only;
                        };
                };
        };
};

Things don't look quite like what I would expect for "normal" OpenWrt partitioning there. OpenWrt patches the kernel to auto-split the firmware partition. Take a look at mt7620a_glinet_gl-mt300n.dts as one example (mentioned only as an example because I've worked with a couple GL.iNet QCA-based devices).

Based on the GL-MT300N as a template, if I've transcribed and done the math correctly

&spi0 {
        status = "okay";

        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        partition@0 {
                                label = "u-boot";
                                reg = <0x0 0x30000>;
                                read-only;
                        };

                        partition@30000 {
                                label = "u-boot-env";
                                reg = <0x30000 0x10000>;
                        };

                        factory: partition@40000 {
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
                        };

                        firmware: partition@50000 {
                                compatible = "denx,uimage";
                                label = "firmware";
                                reg = <0x50000 0x7b0000>;
                        };
                };
        };
};

Edit: package/boot/uboot-envtools/files/ramips is where you can configure the location of the U-Boot environment for the tooling. The package is generally not needed for run-time use. There are several utility functions that can extract the MAC address "directly"

1 Like

Judging from other ZyXEL devices (well, the nbg6817), u-boot-env is probably the location for the main MAC address, with the additional ones derived from it.

1 Like

Excellent. Thank you.

The OEM firmware kernel prints this at boot:

MX25L6405D(c2 2017c220) (8192 Kbytes)
mtd .name = raspi, .size = 0x00800000 (0M) .erasesize = 0x00000008 (0K) .numeraseregions = 65536
Creating 6 MTD partitions on "raspi":
0x000000000000-0x000000800000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000170000 : "Kernel"
0x000000170000-0x000000800000 : "RootFS"

and a cat /proc/mtd there also yields

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00800000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00120000 00010000 "Kernel"
mtd5: 00690000 00010000 "RootFS"
mtd6: 00010000 00010000 "EDINVRAM"
mtd7: 00010000 00010000 "EDIENVRAM"

So I'm sure the address values I wrote were correct.

Are there any values I can derive, infer, or simply pull from the OEM firmware in /proc by doing cat /proc/????

Short answer: yes.

OEM firmware prints

Ralink gpio driver initialized
led=29, on=2, off=2, blinks,=4000, reset=1, time=4000
Create successful!!!
NET: Registered protocol family 16
RALINK_GPIOMODE = 1a171d
RALINK_GPIOMODE = 18171d

So pushing those mode values through gpiodump yields:

#./gpiodump 0x1a171d

GPIOMODE = 0x001a171d
  SUTIF_SHARE_MODE     = 0, disabled       [default]
  WDT_RST_MODE         = 0, WDT_RST_N      [default]
  PA_G_GPIO_MODE       = 1, GPIO           [default]
  ND_SD_GPIO_MODE      = 2, GPIO           [default]
  PERST_GPIO_MODE      = 2, GPIO           [default]
  EPHY_LED_GPIO_MODE   = 0, normal         [default]
  WLED_GPIO_MODE       = 0, normal
  SPI_REFCLK0_MODE     = 1, GPIO           [default]
  SPI_GPIO_MODE        = 0, normal         [default]
  RGMII2_GPIO_MODE     = 1, GPIO           [default]
  RGMII1_GPIO_MODE     = 1, GPIO           [default]
  MDIO_GPIO_MODE       = 2, GPIO           [default]
  UARTL_GPIO_MODE      = 0, normal
  UARTF_SHARE_MODE     = 7, GPIO           [default]
  I2C_GPIO_MODE        = 1, GPIO           [default]


# ./gpiodump 0x18171d
GPIOMODE = 0x0018171d
  SUTIF_SHARE_MODE     = 0, disabled       [default]
  WDT_RST_MODE         = 0, WDT_RST_N      [default]
  PA_G_GPIO_MODE       = 1, GPIO           [default]
  ND_SD_GPIO_MODE      = 2, GPIO           [default]
  PERST_GPIO_MODE      = 0, PERST_N
  EPHY_LED_GPIO_MODE   = 0, normal         [default]
  WLED_GPIO_MODE       = 0, normal
  SPI_REFCLK0_MODE     = 1, GPIO           [default]
  SPI_GPIO_MODE        = 0, normal         [default]
  RGMII2_GPIO_MODE     = 1, GPIO           [default]
  RGMII1_GPIO_MODE     = 1, GPIO           [default]
  MDIO_GPIO_MODE       = 2, GPIO           [default]
  UARTL_GPIO_MODE      = 0, normal
  UARTF_SHARE_MODE     = 7, GPIO           [default]
  I2C_GPIO_MODE        = 1, GPIO           [default]

This worked a treat - thank you :slight_smile:

[    4.586673] spi spi0.0: force spi mode3
[    4.595213] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    4.605039] 4 fixed-partitions partitions found on MTD device spi0.0
[    4.617708] Creating 4 MTD partitions on "spi0.0":
[    4.627284] 0x000000000000-0x000000030000 : "u-boot"
[    4.638141] 0x000000030000-0x000000040000 : "u-boot-env"
[    4.649684] 0x000000040000-0x000000050000 : "factory"
[    4.660678] 0x000000050000-0x000000800000 : "firmware"

Depending on what is in the U-Boot environment, something like

lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)

may resolve the MAC-address issue.

deleted. figured it out.

hexdump on mtd2 looks like a winner. The MAC 58 8b f3 9a 9d 3c is in the 00000020 row as well as at 0x4

Edit:
addr 0x00-0x01 is 7620 - this is the firmware for the 7620 2.4G wireless part.
addr 0x8000-0x8001 is 7610 - this is the firmware for the 7610 5G wireless part.

root@OpenWrt:/# hexdump  -C /dev/mtd2
00000000  20 76 05 01 58 8b f3 9a  9d 3c ff ff ff ff ff ff  | v..X....<......|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000020  ff ff ff ff ff ff ff ff  58 8b f3 9a 9d 3c 00 0c  |........X....<..|
00000030  43 76 20 66 22 0c 00 20  00 ff 77 01 55 77 a8 aa  |Cv f".. ..w.Uw..|
00000040  8c 88 ff ff 0a 00 00 00  00 00 00 00 00 00 ff ff  |................|
00000050  82 00 0d 0d 0d 0d 0d 0d  0d 0d 0d 0d 0d 0d 0d 02  |................|
00000060  0f 03 03 03 03 03 10 03  03 03 03 03 10 03 82 f0  |................|
00000070  ea ed 7c 0b 0a 0e 00 00  ff ff ff ff ff ff ff ff  |..|.............|
00000080  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000d0  1c ff ff ff ff ff ff ff  ff ff ff ff ff ff 05 05  |................|
000000e0  03 03 02 00 03 03 02 00  03 03 02 00 00 07 04 00  |................|
000000f0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00008000  10 76 00 01 58 8b f3 9a  9d 3d 10 76 c3 14 00 00  |.v..X....=.v....|
00008010  00 00 10 76 c3 14 00 00  00 00 00 0c 43 46 00 01  |...v........CF..|
00008020  ff ff ff 1f ef ff 30 3e  3c 9b ff ff ff ff ff ff  |......0><.......|
00008030  ff ff ff ff 11 fd 02 00  ff ff 7f 01 ff ff 99 99  |................|
00008040  8c 88 ff 07 00 0b 00 00  00 0e 00 00 00 0d 00 00  |................|
00008050  ff ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00008060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 ff ff  |................|
00008070  ff ff ff ff ff ff ff ff  08 08 07 07 07 06 06 05  |................|
00008080  05 05 04 04 04 04 05 05  06 06 06 07 07 07 08 08  |................|
00008090  09 09 0a 0a 09 09 09 0a  0a 0a 0a 00 ff ff ff ff  |................|
000080a0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000080c0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ef  |................|
000080d0  1a fa 00 82 00 ff ff ff  ff ff ff ff ff ff 04 04  |................|
000080e0  01 01 04 00 01 01 04 00  01 01 04 00 01 01 04 00  |................|
000080f0  80 80 80 80 f6 f9 fc 04  7f 7f 7f 7f 7f 7f 80 80  |................|
00008100  80 80 80 f3 f9 0a 7f 7f  7f 7f 7f 7f 80 f7 00 00  |................|
00008110  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00008120  04 04 04 00 04 04 04 00  00 00 00 00 00 00 00 ff  |................|
00008130  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00008200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00010000

This corresponds to the factory partition

So roughly in target/linux/ramips/base-files/etc/board.d/02_network

...
        zyxel,wre6505)
                lan_mac=$(mtd_get_mac_binary factory 4)
                wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 1)
...

Additionally, it would seem that this would also achieve the same result. Which should be used?

                wan_mac=$(mtd_get_mac_binary factory 0x8004)

Edit: added these to 02_network and no dice. But running those scripts pulls the correct MACs.

OK - permanent MACs problem solved. Added the following to the dts target/linux/ramips/dts/mt7620a_zyxel_wre6505.dts:

        ethernet@10100000 {
                mtd-mac-address = <&factory 0x4>;
        };

Edit: trying something similar for wifi. I added rt2800-pci-firmware kmod-rt2800-pci to the target/linux/ramips/image/mt7620.mk and even make menuconfig to elect in the rt2800-pci-firmware - no dice yet.

[    7.638200] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[    7.658874] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[    7.677144] rt2800_wmac 10180000.wmac: Falling back to user helper
[    7.742784] firmware soc_wmac.eeprom: firmware_loading_store: map pages failed
[    7.757464] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.
[    7.774374] rt2800_wmac: probe of 10180000.wmac failed with error -11
[    7.814168] kmodloader: done loading kernel modules from /etc/modules.d/*
1 Like

So with the 0-3 gpios defined in the dts, kernel like so

&gpio0 {
        status = "okay";
};

&gpio1 {
        status = "okay";
};

&gpio2 {
        status = "okay";
};

&gpio3 {
        status = "okay";
};

yields:

[    0.492943] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.503982] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.516556] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.527555] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.540147] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.551149] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.563722] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.574544] rt2880_gpio 10000688.gpio: registering 1 irq handlers

Some of those are 'busy' when probed, but nothing reveals any LEDs :confused:

Pick off the Ethernet MAC from sysfs, mac_addr_add, and stuff into the wireless MAC


Edit: For someone else finding this later:

$(macaddr_add "$(cat /sys/class/net/eth0/address)" <some offset>)

Didn't feel right to do that. I found this old link.

So I did this in the dts

        wmac@10180000 {
                ralink,mtd-eeprom = <&factory 0>;
        };

and kernel goes woooosh

[    7.644667] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    7.659144] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    7.674600] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected

So I did this in the dts

        wmac@10180000 {
                ralink,mtd-eeprom = <&factory 0x8000>;
        };

and kernel goes

[    7.886071] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    7.900545] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    7.916004] ieee80211 phy0: rt2800_init_eeprom: Error - Invalid RF chipset 0x7610 detected
[    7.932486] ieee80211 phy0: rt2x00lib_probe_dev: Error - Failed to allocate device
root@OpenWrt:/# iwinfo
wlan0     ESSID: unknown
          Access Point: 58:8B:F3:9A:9D:3C
          Mode: Client  Channel: unknown (unknown)
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: unknown
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: 14C3:7620 14C3:000C [MediaTek MT7620]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

Bringing up wireless normally service network restart gives:

[  478.924420] ieee80211 phy0: rt2800_rf_self_txdc_cal: Info - RF Tx self calibration start
[  478.941103] ieee80211 phy0: rt2800_rf_self_txdc_cal: Info - RF Tx self calibration end
[  481.931970] ieee80211 phy0: rt2800_loft_iq_calibration: Info - LOFT Calibration Done!
[  481.951560] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Start!
[  481.979504] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Done! CH = 0, (gain= d, phase=3f)
[  481.998632] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Start!
[  482.026124] ieee80211 phy0: rt2800_iq_search: Info - IQCalibration Done! CH = 1, (gain= 0, phase=3c)
[  482.044365] ieee80211 phy0: rt2800_loft_iq_calibration: Info - TX IQ Calibration Done!
[  482.073706] ieee80211 phy0: rt2800_rxiq_calibration: Info - RXIQ G_imb=0, Ph_rx=-1
[  482.099055] ieee80211 phy0: rt2800_rxiq_calibration: Info - RXIQ G_imb=2, Ph_rx=3

Gonna have to play a bit to get the 7610e 5G part right.

1 Like

Where does the bridge init stuff go? It seems clear already that the LAN and WiFi will (have to) share a MAC. At least in this 'AP' mode it has.

OEM firmware has:



# ifconfig -a
apcli0    Link encap:Ethernet  HWaddr 5A:8B:F3:9A:9D:3C  
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

apclii0   Link encap:Ethernet  HWaddr 5A:8B:F3:98:9D:3D  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

apclii1   Link encap:Ethernet  HWaddr 5A:8B:F3:98:9D:3D  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br0       Link encap:Ethernet  HWaddr 58:8B:F3:9A:9D:3C  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:3584 (3.5 KiB)

br1       Link encap:Ethernet  HWaddr 58:8B:F3:9A:9D:3D  
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:3520 (3.4 KiB)

eth2      Link encap:Ethernet  HWaddr 58:8B:F3:9A:9D:3C  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:3860 (3.7 KiB)
          Interrupt:3 

lo        Link encap:Local Loopback  
          LOOPBACK  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra0       Link encap:Ethernet  HWaddr 58:8B:F3:9A:9D:3C  
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:4 

rai0      Link encap:Ethernet  HWaddr 58:8B:F3:9A:9D:3D  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:13 

# ls /sys/class/net
apclii1  apcli0   br0      ra0      lo
apclii0  br1      rai0     eth2
# ls /sys/class/net/eth2
brport            dormant           link_mode         dev_id
statistics        duplex            type              addr_len
tx_queue_len      speed             features          addr_assign_type
flags             carrier           ifindex           subsystem
mtu               broadcast         iflink            uevent
operstate         address           ifalias
# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.588bf39a9d3c	no		apcli0
							eth2
							ra0
							rai0
br1		8000.588bf39a9d3d	no		apclii0