Aerohive XR200 atheros drivers

Hi!
I’m trying to get openwrt to work on Aerohive XR200P.
It’s a 5 port router without wifi, cpu is freescale P1011E.
I understood that it’s hardware is similar to Aerohive AP330, so I’ve flashed it using image for AP330. It boots up, but network interfaces are not quite working. From 5 ports there’s responce only on physical ports 2 and 3, WAN porn is not working. It won’t obtain ip from hdcp, and I couldn’t get online in any way.
My wild guess is that it’s missing drivers, because in uboot all 5 ports are working, and once openwrt is started some ports are not responding.
I think that instead of wireless hardware like in AP330, it has Atheros AR8327/8328 - I can see initialisation during uboot start. Preformatted text

How do I add drivers and activate switch?

I have installed openwrt 21.02.5.

Uboot log:


▒▒▒▒▒▒▒▒▒▒▒▒▒▒

U-Boot 2009.11 (Nov 07 2017 - 00:33:10), Build: jenkins-SDW-Havana_BR200_Rel-12

CPU:   P1011E, Version: 1.1, (0x80ed0011)
Core:  E500, Version: 5.1, (0x80212051)
Clock Configuration:
       CPU0:660  MHz,
       CCB:330  MHz,
       DDR:330  MHz (660 MT/s data rate) (Asynchronous), LBC:20.625 MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
I2C:   ready
SPI:   ready
DRAM:  Configuring DDR for 660 MT/s data rate
DDR: 256 MB
FLASH: 64 MB
L2:    256 KB enabled
MMC:

    PCIE2: disabled

    PCIE1 connected to Slot 2 as Root Complex (base addr ffe0a000)
    PCIE1 on bus 00 - 00

In:    serial
Out:   serial
Err:   serial
Net:   initialization for Atheros AR8327/AR8328,addr 4
AR8327/AR8328 v1.2 is found!
set for PHY4
initialization for Atheros AR8327/AR8328,addr 0
eth0, eth1
Hit any key to stop autoboot:  0
Password:


lspci ?
dmesg ?

lspci didn't worked, here is output of dmesg:


root@OpenWrt:/# lspci
/bin/ash: lspci: not found
root@OpenWrt:/# dmesg
[    0.000000] Memory CAM mapping: 256 Mb, residual: 0Mb
[    0.000000] Linux version 5.4.215 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16688-fa9a932fdb)) #0 SMP Thu Oct 13 19:16:38 2022
[    0.000000] Using P1020 RDB machine description
[    0.000000] Found legacy serial port 0 for /soc@ffe00000/serial@4500
[    0.000000]   mem=ffe04500, taddr=ffe04500, irq=0, clk=330000000, speed=0
[    0.000000] Found legacy serial port 1 for /soc@ffe00000/serial@4600
[    0.000000]   mem=ffe04600, taddr=ffe04600, irq=0, clk=330000000, speed=0
[    0.000000] printk: bootconsole [udbg0] enabled
[    0.000000] CPU maps initialized for 1 thread per core
[    0.000000]  (thread shift is 0)
[    0.000000] -----------------------------------------------------
[    0.000000] phys_mem_size     = 0x10000000
[    0.000000] dcache_bsize      = 0x20
[    0.000000] icache_bsize      = 0x20
[    0.000000] cpu_features      = 0x0000000010010128
[    0.000000]   possible        = 0x0000000010010128
[    0.000000]   always          = 0x0000000010010128
[    0.000000] cpu_user_features = 0x84e08000 0x08000000
[    0.000000] mmu_features      = 0x00020010
[    0.000000] -----------------------------------------------------
[    0.000000] HiveAP-330 board from Aerohive
[    0.000000] barrier-nospec: using isync; sync as speculation barrier
[    0.000000] barrier-nospec: patched 212 locations
[    0.000000] Top of RAM: 0x10000000, Total RAM: 0x10000000
[    0.000000] Memory hole size: 0MB
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts
[    0.000000] percpu: Embedded 12 pages/cpu s18700 r8192 d22260 u49152
[    0.000000] pcpu-alloc: s18700 r8192 d22260 u49152 alloc=12*4096
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,9600
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 251680K/262144K available (6400K kernel code, 228K rwdata, 756K rodata, 212K init, 223K bss, 10464K reserved, 0K cma-reserved)
[    0.000000] Kernel virtual memory layout:
[    0.000000]   * 0xfffdf000..0xfffff000  : fixmap
[    0.000000]   * 0xfffdd000..0xfffdf000  : early ioremap
[    0.000000]   * 0xd1000000..0xfffdd000  : vmalloc & ioremap
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 512, nr_irqs: 512, preallocated irqs: 16
[    0.000000] mpic: Resetting
[    0.000000] mpic: Setting up MPIC " OpenPIC  " version 1.2 at ffe40000, max 1 CPUs
[    0.000000] mpic: ISU size: 256, shift: 8, mask: ff
[    0.000000] mpic: Initializing for 256 sources
[    0.000000] time_init: decrementer frequency = 41.250000 MHz
[    0.000000] time_init: processor frequency   = 660.000000 MHz
[    0.000013] clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x983759f53, max_idle_ns: 440795203608 ns
[    0.122824] clocksource: timebase mult[183e0f84] shift[24] registered
[    0.199903] clockevent: decrementer mult[a8f5c29] shift[32] cpu[0]
[    0.199987] pid_max: default: 32768 minimum: 301
[    0.255244] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.342586] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.437053] rcu: Hierarchical SRCU implementation.
[    0.493686] smp: Bringing up secondary CPUs ...
[    0.547493] smp: Brought up 1 node, 1 CPU
[    0.595382] Using standard scheduler topology
[    0.650226] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.765904] futex hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.847449] NET: Registered protocol family 16
[    0.922220] Found FSL PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->255
[    1.018084] PCI host bridge /pcie@ffe09000 (primary) ranges:
[    1.085768]  MEM 0x00000000a0000000..0x00000000bfffffff -> 0x00000000a0000000
[    1.172202]   IO 0x00000000ffc30000..0x00000000ffc3ffff -> 0x0000000000000000
[    1.257623] /pcie@ffe09000: PCICSRBAR @ 0x0
[    1.307588] setup_pci_atmu: end of DRAM 10000000
[    1.362787] /pcie@ffe09000: ERROR: Memory size exceeds PCI ATMU ability to map - enable CONFIG_SWIOTLB to avoid dma errors.
[    1.496091] /pcie@ffe09000: WARNING: Outbound window cfg leaves gaps in memory map. Adjusting the memory map could reduce unnecessary bounce buffering.
[    1.658554] /pcie@ffe09000: DMA window size is 0x0
[    1.716293] Found FSL PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->0
[    1.810621] PCI host bridge /pcie@ffe0a000  ranges:
[    1.868940]  MEM 0x00000000c0000000..0x00000000dfffffff -> 0x00000000c0000000
[    1.955375]   IO 0x00000000ffc20000..0x00000000ffc2ffff -> 0x0000000000000000
[    2.040795] /pcie@ffe0a000: PCICSRBAR @ 0xfff00000
[    2.098052] setup_pci_atmu: end of DRAM 10000000
[    2.162121] PCI: Probing PCI hardware
[    2.205032] fsl-pci ffe09000.pcie: PCI host bridge to bus 0000:00
[    2.277769] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    2.351701] pci_bus 0000:00: root bus resource [mem 0xa0000000-0xbfffffff]
[    2.433977] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.499590] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
[    2.579794] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    2.658045] fsl-pci ffe0a000.pcie: PCI host bridge to bus 0001:01
[    2.730847] pci_bus 0001:01: root bus resource [io  0x20000-0x2ffff] (bus address [0x0000-0xffff])
[    2.838105] pci_bus 0001:01: root bus resource [mem 0xc0000000-0xdfffffff]
[    2.920380] pci_bus 0001:01: root bus resource [bus 01-ff]
[    2.985993] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to ff
[    3.065168] pci 0001:01:00.0: [1957:0108] type 01 class 0x060400
[    3.137031] pci 0001:01:00.0: reg 0x10: [mem 0xfff00000-0xffffffff]
[    3.212056] pci 0001:01:00.0: supports D1 D2
[    3.263021] pci 0001:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    3.343381] pci 0001:01:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.439268] pci 0001:01:00.0: PCI bridge to [bus 02-ff]
[    3.500756] pci 0001:01:00.0:   bridge window [io  0x20000-0x20fff]
[    3.575731] pci 0001:01:00.0:   bridge window [mem 0x00000000-0x000fffff]
[    3.656966] pci 0001:01:00.0:   bridge window [mem 0x00000000-0x000fffff 64bit pref]
[    3.749661] pci_bus 0001:02: busn_res: [bus 02-ff] end is updated to 02
[    3.828807] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 02
[    3.907972] PCI: Cannot allocate resource region 0 of device 0001:01:00.0, will remap
[    4.001691] PCI 0001:01 Cannot reserve Legacy IO [io  0x20000-0x20fff]
[    4.001706] pci_bus 0000:00: resource 4 [io  0x0000-0xffff]
[    4.068339] pci_bus 0000:00: resource 5 [mem 0xa0000000-0xbfffffff]
[    4.143332] pci 0001:01:00.0: BAR 0: no space for [mem size 0x00100000]
[    4.222474] pci 0001:01:00.0: BAR 0: failed to assign [mem size 0x00100000]
[    4.305788] pci 0001:01:00.0: PCI bridge to [bus 02]
[    4.365152] pci 0001:01:00.0:   bridge window [io  0x20000-0x2ffff]
[    4.440138] pci 0001:01:00.0:   bridge window [mem 0xc0000000-0xdfffffff]
[    4.521370] pci_bus 0001:01: Some PCI device resources are unassigned, try booting with pci=realloc
[    4.629680] pci_bus 0001:01: resource 4 [io  0x20000-0x2ffff]
[    4.698415] pci_bus 0001:01: resource 5 [mem 0xc0000000-0xdfffffff]
[    4.773400] pci_bus 0001:02: resource 0 [io  0x20000-0x2ffff]
[    4.842136] pci_bus 0001:02: resource 1 [mem 0xc0000000-0xdfffffff]
[    4.917242] /soc@ffe00000/timer@41100: cannot get timer frequency.
[    4.991796] /soc@ffe00000/timer@42100: cannot get timer frequency.
[    5.084172] Registering qe_ic with sysfs...
[    5.088042] clocksource: Switched to clocksource timebase
[    5.152382] thermal_sys: Registered thermal governor 'step_wise'
[    5.152585] NET: Registered protocol family 2
[    5.275719] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    5.362643] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.462013] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    5.553635] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    5.639041] TCP: Hash tables configured (established 2048 bind 2048)
[    5.715124] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    5.793178] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    5.876657] NET: Registered protocol family 1
[    5.928591] PCI: CLS 0 bytes, default 32
[    5.978964] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    6.061284] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    6.130077] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    6.260161] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    6.349728] pcieport 0001:01:00.0: enabling device (0106 -> 0107)
[    6.444154] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    6.521143] printk: console [ttyS0] disabled
[    6.571240] serial8250.0: ttyS0 at MMIO 0xffe04500 (irq = 42, base_baud = 20625000) is a 16550A
[    6.675336] printk: console [ttyS0] enabled
[    6.775301] printk: bootconsole [udbg0] disabled
[    6.886195] serial8250.0: ttyS1 at MMIO 0xffe04600 (irq = 42, base_baud = 20625000) is a 16550A
[    6.991724] printk: console [ttyS0] disabled
[    7.042858] ffe04500.serial: ttyS0 at MMIO 0xffe04500 (irq = 42, base_baud = 20625000) is a 16550
[    7.042884] printk: console [ttyS0] enabled
[    7.093568] ffe04600.serial: ttyS1 at MMIO 0xffe04600 (irq = 42, base_baud = 20625000) is a 16550
[    7.278353] physmap-flash ec000000.nor: physmap platform flash device: [mem 0xec000000-0xefffffff]
[    7.386044] ec000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00227e
[    7.505856] Amd/Fujitsu Extended Query Table at 0x0040
[    7.567391]   Amd/Fujitsu Extended Query version 1.3.
[    7.627826] number of CFI chips: 1
[    7.670239] 11 fixed-partitions partitions found on MTD device ec000000.nor
[    7.753657] Creating 11 MTD partitions on "ec000000.nor":
[    7.818273] 0x000000000000-0x000000040000 : "dtb"
[    7.875294] 0x000000040000-0x000000080000 : "initrd"
[    7.935385] 0x000000080000-0x000002840000 : "rootfs"
[    7.995459] mtd: device 2 (rootfs) set to be root filesystem
[    8.063269] 1 squashfs-split partitions found on MTD device rootfs
[    8.137252] 0x000000420000-0x000002840000 : "rootfs_data"
[    8.202533] 0x000002840000-0x000003040000 : "kernel"
[    8.262635] 0x000003040000-0x000003f00000 : "stock-jffs2"
[    8.327958] 0x000003f00000-0x000003f20000 : "hw-info"
[    8.389109] 0x000003f20000-0x000003f40000 : "boot-info"
[    8.452366] 0x000003f40000-0x000003f60000 : "boot-info-backup"
[    8.522890] 0x000003f60000-0x000003f80000 : "u-boot-env"
[    8.587162] 0x000003f80000-0x000004000000 : "u-boot"
[    8.647269] 0x000000000000-0x000003040000 : "firmware"
[    8.718880] fsl_espi ffe07000.spi: at 0x(ptrval) (irq = 59)
[    8.794232] fsl-gianfar soc@ffe00000:ethernet@b0000: enabled errata workarounds, flags: 0x4
[    8.904885] fsl-gianfar soc@ffe00000:ethernet@b0000 eth0: mac: f0:9c:e9:c8:b3:c0
[    8.993462] fsl-gianfar soc@ffe00000:ethernet@b0000 eth0: Running with NAPI enabled
[    9.085148] fsl-gianfar soc@ffe00000:ethernet@b0000 eth0: RX BD ring size for Q[0]: 256
[    9.180994] fsl-gianfar soc@ffe00000:ethernet@b0000 eth0: RX BD ring size for Q[1]: 256
[    9.276841] fsl-gianfar soc@ffe00000:ethernet@b0000 eth0: TX BD ring size for Q[0]: 256
[    9.372687] fsl-gianfar soc@ffe00000:ethernet@b0000 eth0: TX BD ring size for Q[1]: 256
[    9.469081] fsl-gianfar soc@ffe00000:ethernet@b2000: enabled errata workarounds, flags: 0x4
[    9.579652] fsl-gianfar soc@ffe00000:ethernet@b2000 eth1: mac: f0:9c:e9:c8:b3:c1
[    9.668228] fsl-gianfar soc@ffe00000:ethernet@b2000 eth1: Running with NAPI enabled
[    9.759919] fsl-gianfar soc@ffe00000:ethernet@b2000 eth1: RX BD ring size for Q[0]: 256
[    9.855768] fsl-gianfar soc@ffe00000:ethernet@b2000 eth1: RX BD ring size for Q[1]: 256
[    9.951612] fsl-gianfar soc@ffe00000:ethernet@b2000 eth1: TX BD ring size for Q[0]: 256
[   10.047458] fsl-gianfar soc@ffe00000:ethernet@b2000 eth1: TX BD ring size for Q[1]: 256
[   10.143466] ucc_geth_driver: QE UCC Gigabit Ethernet Controller
[   10.214598] i2c /dev entries driver
[   10.256482] mpc-i2c ffe03100.i2c: timeout 1000000 us
[   10.316495] mpc-i2c ffe03000.i2c: timeout 1000000 us
[   10.376261] booke_wdt: powerpc book-e watchdog driver loaded
[   10.468066] lp5521 0-0032: device detection err: -6
[   10.527291] NET: Registered protocol family 10
[   10.582675] Segment Routing with IPv6
[   10.626561] NET: Registered protocol family 17
[   10.679760] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[   10.834981] 8021q: 802.1Q VLAN Support v1.8
[   10.885044] drmem: No dynamic reconfiguration memory found
[   10.954315] hctosys: unable to open rtc device (rtc0)
[   11.024840] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[   11.109710] Freeing unused kernel memory: 212K
[   11.162980] Run /sbin/init as init process
[   11.857891] init: Console is alive
[   11.898783] init: - watchdog -
[   13.555677] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   13.727772] usbcore: registered new interface driver usbfs
[   13.793536] usbcore: registered new interface driver hub
[   13.857168] usbcore: registered new device driver usb
[   13.921809] Button Hotplug driver version 0.4.1
[   13.978181] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   14.057518] tpm tpm0: tpm_try_transmit: send(): error -6
[   14.121166] tpm tpm0: A TPM error (-6) occurred attempting to determine the timeouts
[   14.215100] ehci-fsl: Freescale EHCI Host controller driver
[   14.282905] ehci-platform: EHCI generic platform driver
[   14.347013] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
[   14.426300] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
[   14.512874] fsl-ehci fsl-ehci.0: irq 28, io mem 0xffe22000
[   14.591963] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
[   14.659451] hub 1-0:1.0: USB hub found
[   14.704606] hub 1-0:1.0: 1 port detected
[   14.755074] input: buttons as /devices/platform/buttons/input/input0
[   14.832820] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   14.929670] init: - preinit -
[   15.919858] random: procd: uninitialized urandom read (4 bytes read)
[   20.366434] jffs2: notice: (1129) jffs2_build_xattr_subsystem: complete building xattr subsystem, 7 of xdatum (0 unchecked, 2 orphan) and 8 of xref (2 dead, 0 orphan) found.
[   20.553452] mount_root: switching to jffs2 overlay
[   20.618756] overlayfs: upper fs does not support tmpfile.
[   20.690825] urandom-seed: Seeding with /etc/urandom.seed
[   20.844930] procd: - early -
[   20.880100] procd: - watchdog -
[   21.894353] procd: - watchdog -
[   21.932356] procd: - ubus -
[   22.073741] random: ubusd: uninitialized urandom read (4 bytes read)
[   22.153807] random: ubusd: uninitialized urandom read (4 bytes read)
[   22.230316] random: ubusd: uninitialized urandom read (4 bytes read)
[   22.309717] procd: - init -
[   23.003896] kmodloader: loading kernel modules from /etc/modules.d/*
[   23.227238] Loading modules backported from Linux version v5.10.110-0-g3238bffaf992
[   23.319006] Backport generated by backports.git v5.10.110-1-0-g1fbde860
[   23.452599] urngd: v1.0.2 started.
[   23.601508] xt_time: kernel timezone is -0000
[   23.691016] random: crng init done
[   23.731688] random: 21 urandom warning(s) missed due to ratelimiting
[   23.949435] PPP generic driver version 2.4.2
[   24.002683] NET: Registered protocol family 24
[   24.092768] kmodloader: done loading kernel modules from /etc/modules.d/*
[   33.396212] br-lan: port 1(eth1) entered blocking state
[   33.458768] br-lan: port 1(eth1) entered disabled state
[   33.521568] device eth1 entered promiscuous mode
root@OpenWrt:/# lspci
/bin/ash: lspci: not found
root@OpenWrt:/#

lspci needs to be installed, it's not part of the standard image.

What would the easiest way to install it if I can’t connect that box to the internet?

From usb, or build the packages you want into your image with imagebuilder

1 Like

Didn't you say two ports were working?

They do work with laptop, but they won’t obtain ip by dhcp when I’m connecting it to router. I’ve tried to use them as WAN port on the day 1.

I’ll try USB.

For anyone stumbling upon this topic when searching for OpenWRT support for the Aerohive XR200P, I can confirm the device is fully supported by the BR200-WP image. The internals appear to be exactly the same except for the pci wifi module which is absent in the XR200P.