Dual 2.5G Router HAT - FPC Connector use

I’ve confirmed the root cause and the issue is now solved.

On the ROCK 4D, physical pin 16 is GPIO2_B6. With the default OpenWrt device tree, this GPIO stayed as an input/LOW. I measured:

40-pin GPIO16: 0 V
FPC pin 13 (POWER_EN): 0 V

When I manually drove GPIO16 HIGH from userspace:

gpioset -c gpiochip2 14=1

both GPIO16 and FPC pin 13 changed to about 3.3 V, the PWR LED on the ASM1182E board turned on, and the ASM1182E immediately appeared in lspci:

04:00.0 PCI bridge: ASMedia Technology Inc. ASM1182e 2-Port PCIe x1 Gen2 Packet Switch

However, the NVMe behind the ASM1182E was still missing. This turned out to be a second issue caused by enabling the switch too late. During the initial PCIe enumeration, the ASM2806 FPC port was empty, so Linux assigned only bus 04 to that downstream bridge:

primary=02, secondary=04, subordinate=04

After enabling the ASM1182E from userspace, it needed additional PCI bus numbers for its own downstream bridges, but buses 05 and 06 had already been assigned to the two RTL8125 ports. The kernel reported:

pci 0000:04:00.0: devices behind bridge are unusable because [bus 05] cannot be assigned for them
pcieport 0000:02:02.0: bridge has subordinate 04 but max busn 05

I then modified the ROCK 4D device tree so GPIO2_B6 is driven HIGH before the PCIe enumeration starts, for example using a GPIO hog:

&gpio2 {
    router_hat_pcie_enable {
        gpio-hog;
        gpios = <RK_PB6 GPIO_ACTIVE_HIGH>;
        output-high;
        line-name = "router-hat-pcie-enable";
    };
};

After rebuilding OpenWrt and doing a cold boot, the whole PCIe topology enumerates correctly, including the ASM1182E downstream ports and the NVMe SSD.

So in my case, the FPC link itself and the ASM1182E were fine. The real problem was that GPIO16/FPC POWER_EN was not asserted early enough. A simple NVMe adapter may still work because it may not depend on this POWER_EN signal in the same way, while my ASM1182E expansion board does.

It may be worth adding an appropriate GPIO16 configuration to the official ROCK 4D device tree or documenting this requirement for the Dual 2.5G Router HAT.