Radxa A2 wifi module wont work with custom Linux image

I am using buildroot.rockchip and the following additional lines in the configs/rock3a_defconfig to build my Linux image:

BR2_PACKAGE_IW=y
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_ARMBIAN_FIRMWARE=y
BR2_PACKAGE_ARMBIAN_FIRMWARE_AP6256=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_IBSS_RSN=y
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y
BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT=y
BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG=y
BR2_PACKAGE_WPA_SUPPLICANT_WPS=y
BR2_PACKAGE_WPA_SUPPLICANT_WPA3=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
BR2_PACKAGE_WPA_SUPPLICANT_WIFI_DISPLAY=y

After successfully running the image and loading the appropriate kernel module:

# modprobe bcmdhd.ko
[ 19.804084] [dhd] dhd_module_init: in Dongle Host Driver, version 100.10.545.23 (r826445-20210723-1)#
[ 19.804084] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd compiled on Mar 29 2023 at 17:30:04
[ 19.804084]
[ 19.804122] [dhd] ======== dhd_wlan_init_plat_data ========
[ 19.804129] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: Enter
[ 19.804199] [dhd] dhd_wlan_init_gpio: WL_HOST_WAKE=-1, oob_irq=103, oob_irq_flags=0x414
[ 19.804214] [dhd] dhd_wlan_init_gpio: WL_REG_ON=-1
[ 19.804225] [dhd] dhd_wifi_platform_load: Enter
[ 19.804235] [dhd] Power-up adapter ‘DHD generic adapter’
[ 19.805123] [dhd] wifi_platform_set_power = 1, delay: 200 msec
[ 19.805147] [dhd] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 19.805154] [WLAN_RFKILL]: rockchip_wifi_power: 1
[ 19.805160] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 19.805166] [WLAN_RFKILL]: wifi turn on power [GPIO-1-0]
[ 20.111664] [dhd] wifi_platform_bus_enumerate device present 1
[ 20.111748] [dhd] ======== Card detection to detect SDIO card! ========
[ 20.111776] mmc3:mmc host rescan start!
[ 20.127925] [dhd] bcmsdh_register: register client driver
[ 20.128182] [dhd] bcmsdh_sdmmc_probe: Enter num=1
[ 20.128643] [dhd] bcmsdh_sdmmc_probe: Enter num=2
[ 20.128657] [dhd] bus num (host idx)=3, slot num (rca)=1
[ 20.128668] [dhd] found adapter info ‘DHD generic adapter’
[ 20.128799] [dhd] sdioh_attach: set sd_f2_blocksize 256
[ 20.128876] [dhd] sdioh_attach: sd clock rate = 0
[ 20.129313] [dhd] dhdsdio_probe : no mutex held. set lock
[ 20.129505] [dhd] F1 signature read @0x18000000=0x15294345
[ 20.133379] [dhd] F1 signature OK, socitype:0x1 chip:0x4345 rev:0x9 pkg:0x2
[ 20.133909] [dhd] DHD: dongle ram size is set to 819200(orig 819200) at 0x198000
[ 20.133986] [dhd] dhd_conf_set_chiprev : devid=0xa9bf, chip=0x4345, chiprev=9
[ 20.134620] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[ 20.134631] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[ 20.134637] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[ 20.134643] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[ 20.134938] [dhd] dhd_log_dump_init: kernel log buf size = 256KB; logdump_prsrv_tailsize = 80KB; limit prsrv tail size to = 38KB
[ 20.135728] [dhd] dhd_attach(): thread:dhd_watchdog_thread:e0 started
[ 20.135865] [dhd] dhd_attach(): thread:dhd_dpc:e1 started
[ 20.135994] [dhd] dhd_attach(): thread:dhd_rxf:e2 started
[ 20.136012] [dhd] dhd_deferred_work_init: work queue initialized
[ 20.136026] [dhd] dhd_tcpack_suppress_set: TCP ACK Suppress mode 0 -> mode 2
[ 20.136110] [dhd] get_mem_val_from_file: File [/data/misc/wifi/.memdump.info] doesn’t exist
[ 20.136124] [dhd] dhd_get_memdump_info: MEMDUMP ENABLED = 3
[ 20.136139] [dhd] sdioh_cis_read: func_cis_ptr[0]=0x10ac
[ 20.144022] [dhd] dhdsdio_probe_init: making DHD_BUS_DOWN
[ 20.144169] [dhd] Dongle Host Driver, version 100.10.545.23 (r826445-20210723-1)
[ 20.144169] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd compiled on Mar 29 2023 at 17:30:04
[ 20.144169]
[ 20.144841] [dhd] Register interface [wlan0] MAC: b8:13:32:4a:0e:86
[ 20.144841]
[ 20.144940] [dhd] dhd_dbg_detach_pkt_monitor, 2099
[ 20.144953] [dhd] dhd_bus_devreset: == Power OFF ==
[ 20.145182] [dhd] dhd_bus_stop: making DHD_BUS_DOWN
[ 20.145214] [dhd] bcmsdh_oob_intr_unregister: Enter
[ 20.145229] [dhd] bcmsdh_oob_intr_unregister: irq is not registered
[ 20.145242] [dhd] dhd_bus_devreset: making dhdpub up FALSE
[ 20.145254] [dhd] dhd_txglom_enable: enable 0
[ 20.145263] [dhd] dhd_bus_devreset: making DHD_BUS_DOWN
[ 20.145273] [dhd] dhd_bus_devreset: WLAN OFF DONE
[ 20.145317] [dhd] wifi_platform_set_power = 0, delay: 0 msec
[ 20.145332] [dhd] ======== PULL WL_REG_ON(-1) LOW! ========
[ 20.145341] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 20.145363] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 20.145372] [WLAN_RFKILL]: wifi shut off power [GPIO-1-1]
[ 20.145383] [dhd] dhdsdio_probe : the lock is released.
[ 20.145730] [dhd] dhd_module_init: Exit err=0

I’m able to see that the appropriate wireless interface is now available:

# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000
link/ether 52:23:27:c3:26:0b brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether b8:13:32:4a:0e:86 brd ff:ff:ff:ff:ff:ff

The problem is that whenever I try to set that wlan0 interface up or use wpa_supplicat it fails to do so and I get the following prompt:

# ip link set dev wlan0 up
[ 342.930063] [dhd][wlan0] dhd_open : Enter
[ 342.930103] [dhd] Dongle Host Driver, version 100.10.545.23 (r826445-20210723-1)
[ 342.930103] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd compiled on Mar 29 2023 at 17:30:04
[ 342.930103]
[ 342.930120] [dhd] dhd_open : no mutex held. set lock
[ 342.930140] [dhd][wlan0] wl_android_wifi_on : in g_wifi_on=0
[ 342.930149] [dhd] wifi_platform_set_power = 1, delay: 200 msec
[ 342.930159] [dhd] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 342.930167] [WLAN_RFKILL]: rockchip_wifi_power: 1
[ 342.930174] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 342.930181] [WLAN_RFKILL]: wifi turn on power [GPIO-1-0]
[ 343.234956] sdio_reset_comm():
[ 343.250612] mmc_host mmc3: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[ 343.267575] mmc_host mmc3: Bus speed (slot 0) = 375000Hz (slot req 100000Hz, actual 93750HZ div = 2)
[ 343.299608] mmc_host mmc3: Bus speed (slot 0) = 375000Hz (slot req 375000Hz, actual 375000HZ div = 0)
[ 343.315306] mmc3: queuing unknown CIS tuple 0x80 (2 bytes)
[ 343.317519] mmc3: queuing unknown CIS tuple 0x80 (3 bytes)
[ 343.319858] mmc3: queuing unknown CIS tuple 0x80 (3 bytes)
[ 343.323680] mmc3: queuing unknown CIS tuple 0x80 (7 bytes)
[ 343.327907] mmc3: queuing unknown CIS tuple 0x81 (9 bytes)
[ 343.400918] mmc_host mmc3: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[ 343.684820] dwmmc_rockchip fe000000.dwmmc: Successfully tuned phase to 266
[ 343.684977] [dhd] sdioh_start: set sd_f2_blocksize 256
[ 343.685380] [dhd] dhd_bus_devreset: == Power ON ==
[ 343.685512] [dhd] F1 signature read @0x18000000=0x15294345
[ 343.689278] [dhd] F1 signature OK, socitype:0x1 chip:0x4345 rev:0x9 pkg:0x2
[ 343.690021] [dhd] DHD: dongle ram size is set to 819200(orig 819200) at 0x198000
[ 343.690107] [dhd] dhd_bus_devreset: making DHD_BUS_DOWN
[ 343.690173] [dhd] dhdsdio_probe_init: making DHD_BUS_DOWN
[ 343.690379] [dhd] dhd_conf_read_config : Ignore config file /vendor/etc/firmware/config.txt
[ 343.690405] [dhd] dhd_conf_set_path_params : Final fw_path=/vendor/etc/firmware/fw_bcm43456c5_ag.bin
[ 343.690419] [dhd] dhd_conf_set_path_params : Final nv_path=/vendor/etc/firmware/nvram_ap6256.txt
[ 343.690431] [dhd] dhd_conf_set_path_params : Final clm_path=/vendor/etc/firmware/clm_bcm43456c5_ag.blob
[ 343.690443] [dhd] dhd_conf_set_path_params : Final conf_path=/vendor/etc/firmware/config.txt
[ 343.690974] [dhd] dhdsdio_download_code_file: Open firmware file failed /vendor/etc/firmware/fw_bcm43456c5_ag.bin
[ 343.690991] [dhd] _dhdsdio_download_firmware: dongle image file download failed
[ 343.691036] [dhd] dhd_bus_devreset Failed to download binary to the dongle
[ 343.691053] [dhd] dhd_net_bus_devreset: dhd_bus_devreset: -35
[ 343.691074] [dhd] dhd_dbg_detach_pkt_monitor, 2099
[ 343.691092] [dhd] dhd_net_bus_devreset: dhd_bus_devreset: -35
[ 343.691157] [dhd] wifi_platform_set_power = 0, delay: 0 msec
[ 343.691176] [dhd] ======== PULL WL_REG_ON(-1) LOW! ========
[ 343.691189] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 343.691213] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 343.691228] [WLAN_RFKILL]: wifi shut off power [GPIO-1-1]
[ 343.691240] [dhd][wlan0] wl_android_wifi_on : Failed
[ 343.691252] [dhd] dhd_open : wl_android_wifi_on failed (-35)
[ 343.691267] [dhd][wlan0] dhd_stop : Enter
[ 343.691278] [dhd][wlan0] wl_android_wifi_off : in g_wifi_on=0, on_failure=1
[ 343.691286] [dhd] dhd_dbg_detach_pkt_monitor, 2099
[ 343.691303] [dhd] dhd_net_bus_devreset: dhd_bus_devreset: -35
[ 343.691344] [dhd] sdioh_disable_func_intr: error for read SDIO_CCCR_IENx : 0xffffff92
[ 343.691394] [dhd] wifi_platform_set_power = 0, delay: 0 msec
[ 343.691414] [dhd] ======== PULL WL_REG_ON(-1) LOW! ========
[ 343.691433] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 343.691452] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 343.691464] [WLAN_RFKILL]: wifi shut off power [GPIO-1-1]
[ 343.691475] [dhd][wlan0] wl_android_wifi_off : out
[ 343.738141] [dhd][wlan0] dhd_stop : Exit
[ 343.738163] [dhd] dhd_ip: SIOCSIFFLAGS: Operation not peormitted
pen : the lock is released.
[ 343.738171] [dhd][wlan0] dhd_open : Exit ret=-1
[ 343.738178] [dhd] Failed to open primary dev ret -1

Any suggestions on how to troubleshoot this issue?

I also couldn’t get the A2 wifi hardware to work : Rock 3a A2 wifi/bluetooth bodule

Anyone else know how to fire this up ? What is missing ?