Support for Mikrotik RB3011UiAS-RM?

I'm not sure I follow, ROS is Router OS isn't it? Or by any chance you mean the Robot OS? Also do I need to decrypt the brd and add the headers for that firmware?

And last question, are you aware of any effort in reverse engineering the wil6210.fw? I myself have done some attempts but without much success.

Thanks!

Its RouterOS, you cant use the firmware file from it.
Mikrotik has a newer and patched firmware and it cant be used with the upstream driver.
Use the one from linux-firmware.

Board file however can be used if the header is patched.

Dont even attempt to reverse engineer it, its way too complex and does anything RF related like in ath10k etc

BTW, I have a RB3011UiAS-RM, I'd like to run OpenWrt on it and ready to help with the support as soon as I'll replace it with another router.

We also found that the hardware version of the wil6210 is different in the wAP x3 than in the wAP:

root@OpenWrt:~# cat /sys/kernel/debug/ieee80211/phy0/wil6210/hw_version 
0x00000002

In the wAP it is 0x00000001 as well as in the Talon AD7200. Do you know anything about this?

Hm, it looks like a never revision.
Driver should tell you which model it is in the bootlog.

Here is the bootlog:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.108 (gef@qwijibbo) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r11679+1-7c6a5b9443)) #0 SMP Thu Jan 23 11:35:10 2020
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Mikrotik RouterBOARD LHGG-60ad
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 65024
[    0.000000] free_area_init_node: node 0, pgdat c1022080, node_mem_map cfdf9000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65024 pages, LIFO batch:15
[    0.000000] random: get_random_bytes called from start_kernel+0x88/0x3c0 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu @cfdb0000 s29324 r8192 d23924 u61440
[    0.000000] pcpu-alloc: s29324 r8192 d23924 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64512
[    0.000000] Kernel command line: 
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 243816K/260096K available (4267K kernel code, 138K rwdata, 1176K rodata, 7168K init, 228K bss, 16280K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc072ad48   (5260 kB)
[    0.000000]       .init : 0xc0900000 - 0xc1000000   (7168 kB)
[    0.000000]       .data : 0xc1000000 - 0xc1022980   ( 139 kB)
[    0.000000]        .bss : 0xc1024000 - 0xc105d258   ( 229 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns
[    0.000007] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[    0.000024] Switching to timer-based delay loop, resolution 20ns
[    0.000244] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000265] pid_max: default: 32768 minimum: 301
[    0.000406] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000426] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001060] CPU: Testing write buffer coherency: ok
[    0.001798] Setting up static identity map for 0x80300000 - 0x80300060
[    0.001948] Hierarchical SRCU implementation.
[    0.002614] smp: Bringing up secondary CPUs ...
[    0.005367] smp: Brought up 1 node, 4 CPUs
[    0.005388] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.005397] CPU: All CPU(s) started in SVC mode.
[    0.009302] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.009464] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009490] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.009709] pinctrl core: initialized pinctrl subsystem
[    0.010753] NET: Registered protocol family 16
[    0.011091] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.012158] cpuidle: using governor ladder
[    0.012204] cpuidle: using governor menu
[    0.026521] usbcore: registered new interface driver usbfs
[    0.026588] usbcore: registered new interface driver hub
[    0.026669] usbcore: registered new device driver usb
[    0.026726] pps_core: LinuxPPS API ver. 1 registered
[    0.026736] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.026762] PTP clock support registered
[    0.027904] clocksource: Switched to clocksource arch_sys_counter
[    0.028735] NET: Registered protocol family 2
[    0.029349] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.029391] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.029442] TCP: Hash tables configured (established 2048 bind 2048)
[    0.029558] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.029596] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.029795] NET: Registered protocol family 1
[    0.029839] PCI: CLS 0 bytes, default 64
[    0.117028] No memory allocated for crashlog
[    0.117254] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    0.120645] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.120661] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.126396] io scheduler noop registered
[    0.126418] io scheduler deadline registered (default)
[    0.127639] OF: PCI: host bridge /soc/pci@40000000 ranges:
[    0.127676] OF: PCI:    IO 0x40200000..0x402fffff -> 0x40200000
[    0.127696] OF: PCI:   MEM 0x40300000..0x40ffffff -> 0x40300000
[    0.347914] qcom-pcie 40000000.pci: link up
[    0.348095] qcom-pcie 40000000.pci: PCI host bridge to bus 0000:00
[    0.348119] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.348136] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0x40200000-0x402fffff])
[    0.348150] pci_bus 0000:00: root bus resource [mem 0x40300000-0x40ffffff]
[    0.348206] pci 0000:00:00.0: [17cb:1001] type 01 class 0x060400
[    0.348244] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    0.348300] pci 0000:00:00.0: PME# supported from D0 D3hot
[    0.348493] PCI: bus0: Fast back to back transfers disabled
[    0.348695] pci 0000:01:00.0: [1ae9:0310] type 00 class 0x028000
[    0.348853] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.349560] PCI: bus1: Fast back to back transfers disabled
[    0.349614] pci 0000:00:00.0: BAR 8: assigned [mem 0x40400000-0x405fffff]
[    0.349631] pci 0000:00:00.0: BAR 0: assigned [mem 0x40300000-0x40300fff 64bit]
[    0.349655] pci 0000:01:00.0: BAR 0: assigned [mem 0x40400000-0x405fffff 64bit]
[    0.349720] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    0.349736] pci 0000:00:00.0:   bridge window [mem 0x40400000-0x405fffff]
[    0.350485] pcieport 0000:00:00.0: AER enabled with IRQ 59
[    0.351901] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[    0.351920] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[    0.352570] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.352650] tcsr 1953000.ess_tcsr: setting ess interface select = 1
[    0.352724] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.352951] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.353508] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.353555] msm_serial 78af000.serial: uartclk = 1843200
[    0.353606] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 25, base_baud = 115200) is a MSM
[    0.353633] msm_serial: console setup on port #0
[    0.953484] console [ttyMSM0] enabled
[    0.958376] msm_serial: driver initialized
[    0.966079] loop: module loaded
[    0.967136] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.975145] random: fast init done
[    0.978969] m25p80 spi0.0: w25q128jv (16384 Kbytes)
[    0.979267] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.984004] Creating 5 MTD partitions on "spi0.0":
[    0.990629] 0x000000080000-0x00000008e000 : "RouterBoot"
[    0.995895] 0x00000008e000-0x00000008f000 : "hard_config"
[    1.001323] 0x000000090000-0x0000000a0000 : "dts_config"
[    1.006506] 0x0000000bd000-0x0000000be000 : "soft_config"
[    1.011947] 0x000000100000-0x000001000000 : "firmware"
[    1.018071] libphy: ipq40xx_mdio: probed
[    1.030716] mdio_bus 90000.mdio: MDIO device at address 1 is missing.
[    1.031098] mdio_bus 90000.mdio: MDIO device at address 2 is missing.
[    1.036487] mdio_bus 90000.mdio: MDIO device at address 3 is missing.
[    1.042952] mdio_bus 90000.mdio: MDIO device at address 4 is missing.
[    1.049545] libphy: Fixed MDIO Bus: probed
[    1.197932] EDMA using MAC@ - using
[    1.197951] 96:27:b0:fd:41:4b
[    1.299736] i2c /dev entries driver
[    1.329157] NET: Registered protocol family 10
[    1.330768] Segment Routing with IPv6
[    1.332603] NET: Registered protocol family 17
[    1.336625] 8021q: 802.1Q VLAN Support v1.8
[    1.340675] Registering SWP/SWPB emulation handler
[    1.350362] hctosys: unable to open rtc device (rtc0)
[    1.361621] Freeing unused kernel memory: 7168K
[    1.446784] init: Console is alive
[    1.447016] init: - watchdog -
[    1.456780] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.469488] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.488498] init: - preinit -
[    1.722608] random: jshn: uninitialized urandom read (4 bytes read)
[    1.760300] random: jshn: uninitialized urandom read (4 bytes read)
[    1.835025] random: jshn: uninitialized urandom read (4 bytes read)
[    2.065686] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    5.209220] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[    5.209316] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    5.239644] procd: - early -
[    5.239786] procd: - watchdog -
[    5.889001] procd: - watchdog -
[    5.891840] procd: - ubus -
[    5.920138] urandom_read: 5 callbacks suppressed
[    5.920146] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.951903] random: ubusd: uninitialized urandom read (4 bytes read)
[    5.963050] procd: - init -
[    6.085981] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.089823] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    6.095936] Loading modules backported from Linux version v4.19.23-0-g67d52fae61c1
[    6.096706] Backport generated by backports.git v4.19.23-1-0-g480a925a
[    6.105789] ip_tables: (C) 2000-2006 Netfilter Core Team
[    6.115423] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[    6.146484] xt_time: kernel timezone is -0000
[    6.161112] PPP generic driver version 2.4.2
[    6.162080] NET: Registered protocol family 24
[    6.170687] wil6210 0000:01:00.0: wil6210 device found [1ae9:0310] (rev 2) bar size 0x200000
[    6.171134] wil6210 0000:01:00.0: enabling device (0140 -> 0142)
[    6.178373] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_pcie_probe: CSR at [mem 0x40400000-0x405fffff 64bit] -> 0xd0f80000
[    6.184538] wil6210 0000:01:00.0: Direct firmware load for wil6210_sparrow_plus.fw failed with error -2
[    6.196814] wil6210 0000:01:00.0: Falling back to user helper
[    6.243906] firmware wil6210_sparrow_plus.fw: firmware_loading_store: map pages failed
[    6.244235] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_set_capabilities: Board hardware is Sparrow D0, flash exist
[    6.256743] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
[    6.262899] wil6210 0000:01:00.0: using dma mask 48
[    6.328606] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[    6.329057] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_get_bl_info: Boot Loader build 255.255.0.7253
[    6.344356] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_set_oob_mode: oob_mode to 0
[    6.361259] kmodloader: done loading kernel modules from /etc/modules.d/*
[   24.753163] br-lan: port 1(eth0) entered blocking state
[   24.753212] br-lan: port 1(eth0) entered disabled state
[   24.757594] device eth0 entered promiscuous mode
[   24.765681] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   27.849767] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[   27.850691] br-lan: port 1(eth0) entered blocking state
[   27.856157] br-lan: port 1(eth0) entered forwarding state
[   27.865543] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 9341.049550] ess_edma c080000.edma: eth0: GMAC Link is down
[ 9341.059542] br-lan: port 1(eth0) entered disabled state
[ 9343.129764] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[ 9343.130918] br-lan: port 1(eth0) entered blocking state
[ 9343.136153] br-lan: port 1(eth0) entered forwarding state
[ 9364.969543] ess_edma c080000.edma: eth0: GMAC Link is down
[ 9364.983553] br-lan: port 1(eth0) entered disabled state
[ 9366.010076] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[ 9366.013316] br-lan: port 1(eth0) entered blocking state
[ 9366.016474] br-lan: port 1(eth0) entered forwarding state
[ 9382.649549] ess_edma c080000.edma: eth0: GMAC Link is down
[ 9382.665165] br-lan: port 1(eth0) entered disabled state
[ 9384.729782] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[ 9384.730939] br-lan: port 1(eth0) entered blocking state
[ 9384.736178] br-lan: port 1(eth0) entered forwarding state
[11428.773871] random: crng init done
[11508.409634] ess_edma c080000.edma: eth0: GMAC Link is down
[11508.425386] br-lan: port 1(eth0) entered disabled state
[11510.489808] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[11510.491081] br-lan: port 1(eth0) entered blocking state
[11510.496202] br-lan: port 1(eth0) entered forwarding state
[11540.400631] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[11540.448765] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[11540.449183] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[11540.461879] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[11540.469548] wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
[11540.518974] wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC b8:69:f4:d5:81:5e; 0 MID's
[11540.519065] wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 10 ms. HW version 0x00000002
[11540.528108] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
[11540.537527] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
[11540.547219] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
[11540.557179] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
[11540.566719] wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
[11540.580096] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[14118.321179] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[14118.321589] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[14118.390927] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[14118.390997] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[14118.403358] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[14149.431786] wil6210 0000:01:00.0: wil6210 device found [1ae9:0310] (rev 2) bar size 0x200000
[14149.432344] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_pcie_probe: CSR at [mem 0x40400000-0x405fffff 64bit] -> 0xd1300000
[14149.439484] wil6210 0000:01:00.0: Direct firmware load for wil6210_sparrow_plus.fw failed with error -2
[14149.451920] wil6210 0000:01:00.0: Falling back to user helper
[14149.495306] firmware wil6210_sparrow_plus.fw: firmware_loading_store: map pages failed
[14149.495611] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_set_capabilities: Board hardware is Sparrow D0, flash exist
[14149.508131] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
[14149.514248] wil6210 0000:01:00.0: using dma mask 48
[14149.578668] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[14149.579132] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_get_bl_info: Boot Loader build 255.255.0.7253
[14149.594517] wil6210 0000:01:00.0 (unnamed net_device) (uninitialized): wil_set_oob_mode: oob_mode to 0
[22503.446102] br-lan: port 1(eth0) entered disabled state
[22503.451702] device eth0 left promiscuous mode
[22503.451828] br-lan: port 1(eth0) entered disabled state
[22503.541737] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[22503.677802] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[22503.678637] br-lan: port 1(eth0) entered blocking state
[22503.683952] br-lan: port 1(eth0) entered disabled state
[22503.689610] device eth0 entered promiscuous mode
[22503.696760] br-lan: port 1(eth0) entered blocking state
[22503.699017] br-lan: port 1(eth0) entered forwarding state
[22559.849712] ess_edma c080000.edma: eth0: GMAC Link is down
[22559.864152] br-lan: port 1(eth0) entered disabled state
[22594.169888] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[22594.171057] br-lan: port 1(eth0) entered blocking state
[22594.176290] br-lan: port 1(eth0) entered forwarding state
[55530.969951] ess_edma c080000.edma: eth0: GMAC Link is down
[55530.980131] br-lan: port 1(eth0) entered disabled state
[55534.090166] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[55534.091329] br-lan: port 1(eth0) entered blocking state
[55534.096559] br-lan: port 1(eth0) entered forwarding state
[91182.942262] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[91182.989574] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[91182.989989] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[91183.002620] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[91183.010348] wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
[91183.058520] wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC b8:69:f4:d5:81:5e; 0 MID's
[91183.058612] wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 0 ms. HW version 0x00000002
[91183.067672] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
[91183.077126] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
[91183.086657] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
[91183.096627] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
[91183.106172] wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
[91183.118621] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[91196.996173] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[91197.061766] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[91197.061833] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[91197.074201] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[91197.082447] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[91197.139340] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[91197.139751] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[91197.152306] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[91197.160498] wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
[91197.208399] wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC b8:69:f4:d5:81:5e; 0 MID's
[91197.208490] wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 0 ms. HW version 0x00000002
[91197.217525] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
[91197.227011] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
[91197.236529] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
[91197.246520] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
[91197.256056] wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
[91197.293896] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=2, ev-
[91197.294056] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=ff:ff:ff:ff:ff:ff, reason=2, ev-
[91197.301986] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[91197.383707] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[91197.384132] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[91197.396749] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[91197.404964] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[91197.459332] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[91197.459743] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[91197.472294] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[91197.480110] wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
[91197.529670] wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC b8:69:f4:d5:81:5e; 0 MID's
[91197.529759] wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 10 ms. HW version 0x00000002
[91197.538780] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
[91197.548223] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
[91197.558460] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
[91197.568325] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
[91197.577403] wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
[91197.699292] wil6210 0000:01:00.0 wlan0: wmi_call: wmi_call(0x0822->0x1821) timeout 100 msec
[91197.729217] wil6210 0000:01:00.0 wlan0: wmi_call: wmi_call(0x0919->0x1919) timeout 20 msec
[91197.734499] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=2, ev-
[91197.739655] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=ff:ff:ff:ff:ff:ff, reason=3, ev-
[91197.939172] wil6210 0000:01:00.0 wlan0: __wmi_send: WMI ring full
[91198.139108] wil6210 0000:01:00.0 wlan0: __wmi_send: WMI ring full
[91198.142047] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=ff:ff:ff:ff:ff:ff, reason=3, ev-
[91198.270342] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[91198.331634] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[91198.331701] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[91198.344063] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[91198.352337] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[91198.409405] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[91198.409816] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[91198.422383] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0
[91198.430558] wil6210 0000:01:00.0 wlan0: wil_reset: Use firmware <wil6210.fw> + board <wil6210.brd>
[91198.478475] wil6210 0000:01:00.0 wlan0: wmi_evt_ready: FW ver. 5.2.0.18(SW 18); MAC b8:69:f4:d5:81:5e; 0 MID's
[91198.478570] wil6210 0000:01:00.0 wlan0: wil_wait_for_fw_ready: FW ready after 0 ms. HW version 0x00000002
[91198.487888] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_CNT_TRSH = 500 usec
[91198.497082] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_TX_IDL_CNT_TRSH = 13 usec
[91198.506611] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_CNT_TRSH = 500 usec
[91198.516572] wil6210 0000:01:00.0 wlan0: wil_configure_interrupt_moderation: set ITR_RX_IDL_CNT_TRSH = 13 usec
[91198.526121] wil6210 0000:01:00.0 wlan0: wil_refresh_fw_capabilities: keep_radio_on_during_sleep (0)
[110022.936310] wil6210 0000:01:00.0 wlan0: _wil6210_disconnect: bssid=  (null), reason=3, ev-
[110023.001771] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader struct v2: MAC = b8:69:f4:d5:81:5e RF = 0x0000 (status 0x0000) bband = 0x00000000
[110023.001838] wil6210 0000:01:00.0 wlan0: wil_get_bl_info: Boot Loader build 255.255.0.7253
[110023.014217] wil6210 0000:01:00.0 wlan0: wil_set_oob_mode: oob_mode to 0

According to Mikrotik support:

RAM, FLASH, CPU, and Switch are the same on these. The difference in x3 is an antenna array, with support for a much wider angle of coverage and is optimized specifically for the multipoint operation. With licence level 4 as AP.

EDIT: I have started another thread in order to have all the information there: Support for Mikrotik wAP 60Gx3

Ok, so it looks like that revision is Sparrow Plus D0, thats the latest original wil6210 model.
New ones are Talyn wil6436 based.

It could be that firmware images are special for it.

Just a quick teaser getting back to this threads topic (;-p).

Thanks @adron and @robimarko for their great work I was able to piggyback off!

2 Likes

Good job. I can't wait for the RB3011 to be supported.

Are there any issues or features missing?

Just like @adron I am still fighting with gmac2 and gmac3 actually transferring any data. Otherwise, it looks pretty reasonable but I would rather directly start with DSA which, while I do have a basic config, still needs some more fine tuning.
Anyway, it does build nicely and at least network boot also works fine. After a little more clean-up I hope I can push a pre-view to my github account in the next few daysTM. Stay tuned...

It is very nice that you continued my work. Unfortunately, I am still very busy with other work, and still won’t return to work on RB3011. Here is my dts file for RB3011. It is based on a file from Natgear and requires some cleanup. But the ethernet switch completely worked. And even with sfp.

Hope this helps you in your work.

Very well, thanks. Let me sync this with my stuff later today. I haven't really tried the SFP yet even though for me that was the whole reason I even choose the RB3011 :smile:.

Well, well. Finally, at least some network bootable preview [1] and the sources [2]. This is in no way cleaned-up or anything but the following works for me:

  • Regular network boot with [1].
  • SFP: fixed link via eth1 doing dhcp, proper sfp integration (e.g. ethtool -m eth1) still fails for me but during boot SFP PHY does get properly detected by I2C.
  • Switch0: fixed link via eth0 serving eth1-eth5 working with default 192.168.1.1 incl. luci.
  • Switch1: eth6-eth10 detects stuff plugged in but so far traffic via eth3 still fails (e.g. probably still similar issue as @adron faced).

What does not work so far:

  • Traffic via eth2 or eth3.
  • USB but I also did not really explore that one much.
  • I experimented with DSA setup but so far while switch0 management worked I could not get any traffic flowing but I admit I'm also relatively new to that whole topic.

Untested:

  • Flash installation.

My next steps are gonna be cleaning it up into separate commits to be submittable upstream.

I would love to be able to experiment some more with linux-next but so far I failed getting any such booted with adron's qcom-ipq-aux-loader. Any suggestions welcome.

And, of course, any feedback concerning any of this is welcome.

Enjoy...

[1] https://www.ziswiler.net/owncloud/index.php/s/ReI0emenqAyhlwv
[2] https://github.com/ziswiler/openwrt/tree/rb3011uias

1 Like

Very cool to see some more action on this - I've been working on RB3011 support myself and posted a few patches to linux-arm-msm this week to enable initial support. I've had working support with the second bank of 5 ports - gmac3 is attached via sgmii to port0 on switch2, and I needed to kick QCA8K_REG_SGMII_CTRL there in order to get the ports working (with the upstream qca8k driver, which isn't as useful as the OpenWRT switch driver, presenting ports only as extra ethernet interfaces).

Very, good. Yeah, last I checked there was nothing there but I wasn't monitoring linux-arm-msm too closely. I actually experimented with a DSA setup myself but retreated to OpenWrt's swconfig approach for now just to get something out which is actually working. Doing mainline gmac/qca8k experiments was actually the next step I intended to do. For now, I tried the approach from @adron which boiled down to a patch here [1]. Could you share how/what exactly you did to the qca8k stuff as that may just be the missing link in the DSA experiments I did so far. As I am rather new to the DSA stuff I also ordered one of them latest WRT32X devices to have some reference hardware. Looking forward to get RB3011 OpenWrt support ironed out.

[1] https://github.com/ziswiler/openwrt/commit/fa418ecd8f34008726f75a9e6cf31c1731a0f647

My upstream patches are at

https://lore.kernel.org/linux-arm-msm/cover.1589824955.git.noodles@earth.li/T/#t

(pretty much the same as yours but varied for mainline)

and I'm using

https://the.earth.li/~noodles/rb3011-mainline.diff

on top of that to get something that boots to the initrd and has both
switches working. Using @adron's qcom-ipq-aux-loader generally, but also
his u-boot sometimes because it makes it easier to poke things (but then
does some of the hardware init so I have to go back to the loader to
make sure that still works).

Have you had any success with the USB? I haven't managed to convince it
to be happy.

I got the second switch working with your tree, @sumo. Just had to switch to port 0 / SGMII for gmac3:

diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network
index 1d5d6eaf61..4d79bcbb9d 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
@@ -39,7 +39,7 @@ mikrotik,rb3011uias)
        ucidef_add_switch "switch0" \
                "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth2"
        ucidef_add_switch "switch1" \
-               "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth3"
+               "0@eth3" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
        ;;
 nec,wg2600hp)
        ucidef_add_switch "switch0" \
diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-rb3011uias.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-rb3011uias.dts
index dfd5d2238b..9906295c1b 100644
--- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-rb3011uias.dts
+++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-rb3011uias.dts
@@ -653,9 +653,10 @@
                ethernet-phy@0 {
                        reg = <0>;
                        qca,ar8327-initvals = <
-                               0x00004 0x7600000   /* PAD0_MODE */
+                               0x00004 0x0000080   /* PAD0_MODE */
                                0x00008 0x1000000   /* PAD5_MODE */
                                0x0000c 0x80        /* PAD6_MODE */
+                               0x00010 0x2613A0    /* SERDES DISABLE */
                                0x000e4 0xaa545     /* MAC_POWER_SEL */
                                0x000e0 0xc74164de  /* SGMII_CTRL */
                                0x0007c 0x4e        /* PORT0_STATUS */

Very, good. I can confirm that with your patch the second switch started working as well. I guess me and @adron previously misunderstood how the second switch is wired.

I re-based my sources [1] and uploaded an updated network bootable preview [2].

Concerning USB no progress as of yet.

[1] https://github.com/ziswiler/openwrt/tree/rb3011uias
[2] https://www.ziswiler.net/owncloud/index.php/s/ReI0emenqAyhlwv

I managed to get working USB; the port is usb3_0, but it then wants USB30_1_UTMI_CLK / USB30_1_MASTER_CLK - if I use the USB30_0 variants boot just hangs until the watchdog kicks in and reboots.

Hello friends. After a year and a half, I returned to work on the RB3011. Now I am analyzing all your developments. I also plan to modify the drivers for the switch chip and network interfaces to work with each port as an independent network interfaces(like in ROS).