Hailo8 PCIe FW control timeout on Cubie A7A with ASMedia PCIe switch

Hi everyone,

I’ve been trying to get a Hailo8 AI accelerator working on my Radxa Cubie A7A and after extensive debugging I’d like to share my findings and ask for advice.

Setup:

Board: Radxa Cubie A7A

OS: Armbian edge (custom build from NickAlilovic/build Radxa-A7A branch)

Kernel: 6.18.19-edge-sun60iw2

HAT: Makerobo Hailo8 HAT (designed for Raspberry Pi 5)

FPC Cable: Makerobo for Raspberry Pi 5, 16P 50mm

Driver: hailort-drivers v4.21.0 (built manually from source)

Firmware: hailo8_fw.4.21.0.bin

What works:

Hailo8 is detected via lspci

Firmware loads successfully at boot

/dev/hailo0 is created

PCIe link up at Gen3

PCIe topology:

00:00.0 PCI bridge (Root)

01:00.0 ASMedia ASM1182e PCIe switch

02:03.0 ASMedia ASM1182e downstream port

02:07.0 ASMedia ASM1182e downstream port

04:00.0 Hailo-8 AI Processor

The problem:

Every time any application tries to communicate with the device via ioctl, it times out:

hailo 0000:04:00.0: hailo_fw_control, timeout waiting for control (timeout_ms=1000)

hailo 0000:04:00.0: Device disconnected while opening device

After this the device is dead until reboot.

What I’ve tried:

no_power_mode=1 — partially helped (no more D3cold issues)

force_desc_page_size=4096 — applied

Disabled pd_pcie_test via DT overlay

pcie_aspm=off pcie_port_pm=off pci=nopm kernel parameters

All PCIe power/control set to on

udev rules from official Frigate installation script

My hypothesis:

The Makerobo FPC cable is designed for Raspberry Pi 5 pinout which differs from Radxa PIEX pinout. Comparing the schematics.

The pinouts are different — control signals (CLKREQ, RESET, WAKE, POWER-EN) are on completely different pins. This could explain why the PCIe link comes up (differential pairs are in similar positions) but firmware control via ioctl times out.

In addition, I did some research and noticed the following thing

bash$ cat /sys/bus/pci/devices/0000:04:00.0/msi_irqs/
# empty — MSI not configured

$ lspci -vvv -s 04:00.0 | grep MSI
Capabilities: [e0] MSI: Enable- Count=1/1 Maskable- 64bit+
    Address: 0000000000000000  Data: 0000
# Address is zero — MSI never configured by kernel

$ cat /proc/interrupts | grep hailo
# empty — no interrupt handler registered

Interrupt: pin ? routed to IRQ 492
# "?" means no INTx routing either

Questions:

Can you confirm that RPi5 FPC cable is incompatible with Cubie A7A?

Would using the official Radxa PIEX to FPC cable with M.2 Extension Board V1.7 solve this?

Is there any known workaround for the 1000ms ioctl timeout with ASMedia PCIe switch?

Thanks in advance!