CM3I with WiFi module AP6745

Hello!

I have Radxa E25 and two different CM3I modules: the first one with SOC RK3568 and WiFi/BT module AP6256, and the second one with SOC RK3568J and AP6745. In the system i have installed firmware packages broadcom-wifibt-firmware_2.6_all.deb and brcm-patchram-plus1_0.2_arm64.deb. But module with AP6745 doen’t initialize correctly (wlan0 doesn’t appear):

dmesg

[ 17.733100] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 17.738081] hantro-vpu fdee0000.video-codec: Adding to iommu group 1
[ 17.750163] hantro-vpu fdee0000.video-codec: registered rockchip,rk3568-vepu-enc as /dev/video2
[ 17.764261] Loaded X.509 cert ‘sforshee: 00b28ddf47aef9cea7’
[ 17.860269] brcmfmac: F1 signature read @0x18000000=0x15294345
[ 17.863979] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[ 17.876030] usbcore: registered new interface driver brcmfmac
[ 18.060119] Bluetooth: Core ver 2.22
[ 18.064871] NET: Registered PF_BLUETOOTH protocol family
[ 18.073945] Bluetooth: HCI device and connection manager initialized
[ 18.081570] Bluetooth: HCI socket layer initialized
[ 18.087404] Bluetooth: L2CAP socket layer initialized
[ 18.094264] Bluetooth: SCO socket layer initialized
[ 18.596237] EXT4-fs (mmcblk1p4): mounted filesystem e9c5baaa-9370-4427-929e-cd2d3cff97fe r/w with journalled data mode. Quota mode: none.
[ 18.639392] EXT4-fs (mmcblk1p3): mounted filesystem 717e7229-e94f-4556-be27-9c2bf72a69fb r/w with journalled data mode. Quota mode: none.
[ 18.859256] systemd-journald[198]: Received client request to flush runtime journal.
[ 18.901409] systemd-journald[198]: File /var/log/journal/cd1a1d66391a41cc929daf68f88ec148/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 20.125799] brcmfmac: brcmf_sdio_readshared: unable to obtain sdpcm_shared info: rv=-16 (addr=0x0)
[ 20.792969] btsdio: probe of mmc2:0001:3 failed with error -16
[ 22.319534] RTL8226B_RTL8221B 2.5Gbps PHY r8169-0-100:00: attached PHY driver (mii_bus:phy_addr=r8169-0-100:00, irq=MAC)
[ 22.553246] r8169 0000:01:00.0 eth0: Link is Down
[ 22.579261] RTL8226B_RTL8221B 2.5Gbps PHY r8169-2-100:00: attached PHY driver (mii_bus:phy_addr=r8169-2-100:00, irq=MAC)
[ 22.816991] r8169 0002:01:00.0 eth1: Link is Down
[ 25.261343] r8169 0000:01:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 25.365975] 8021q: 802.1Q VLAN Support v1.8
[ 25.707672] r8169 0002:01:00.0 eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 27.275099] EXT4-fs (mmcblk1p1): mounted filesystem b4dd55a2-dee1-4ac2-b14e-435cdc875b7c r/w with ordered data mode. Quota mode: none.
[ 27.288814] ext4 filesystem being mounted at /boot supports timestamps until 2038-01-19 (0x7fffffff)
[ 35.820052] vdd_npu: disabling
[ 35.825861] vdda0v9_image: disabling
[ 35.832249] vcca1v8_image: disabling
[ 72.511892] brcmfmac: brcmf_sdio_htclk: Failed access turning clock off: -16

device-tree

&sdmmc2 {
status = “okay”;
#address-cells = <1>;
#size-cells = <0>;
bus-width = <4>;
disable-wp;
cap-sd-highspeed;
cap-sdio-irq;
keep-power-in-suspend;
mmc-pwrseq = <&sdio_pwrseq>;
non-removable;
pinctrl-names = “default”;
pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
sd-uhs-sdr104;
vmmc-supply = <&vcc_3v3>;
vqmmc-supply = <&vcc_1v8>;

wifi@1 {
	compatible = "brcm,bcm4329-fmac";
	reg = <1>;
	interrupt-parent = <&gpio3>;
	interrupts = <RK_PD5 IRQ_TYPE_LEVEL_HIGH>;
	interrupt-names = "host-wake";
	pinctrl-names = "default";
	pinctrl-0 = <&wifi_host_wake_irq>;
};

};

Is this problem with firmware files or device-tree?

Hi,
You can refer to the configuration of this dts,https://github.com/radxa/kernel/blob/linux-5.10-gen-rkr4.1/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi#L545
or use the latest image https://github.com/radxa-build/radxa-e25/releases/download/b21/radxa-e25_debian_bullseye_cli_b21.img.xz

My device tree node properties exact as reference from 5.10-gen-rkr4.1 kernel that you provided, except one property ‘supports-sdio’.
With this reference image, wireless interface doesn’t appear in system too. Log from image radxa-e25_debian_bullseye_cli_b21.img.xz:

dmesg | grep mmc

[ 7.587770] dwmmc_rockchip fe000000.dwmmc: IDMAC supports 32-bit address mode.
[ 7.587781] dwmmc_rockchip fe2b0000.dwmmc: IDMAC supports 32-bit address mode.
[ 7.587802] dwmmc_rockchip fe2b0000.dwmmc: Using internal DMA controller.
[ 7.587805] dwmmc_rockchip fe000000.dwmmc: Using internal DMA controller.
[ 7.587813] dwmmc_rockchip fe000000.dwmmc: Version ID is 270a
[ 7.587816] dwmmc_rockchip fe2b0000.dwmmc: Version ID is 270a
[ 7.587874] dwmmc_rockchip fe2b0000.dwmmc: DW MMC controller at irq 59,32 bit host data width,256 deep fifo
[ 7.587893] dwmmc_rockchip fe000000.dwmmc: DW MMC controller at irq 42,32 bit host data width,256 deep fifo
[ 7.587977] dwmmc_rockchip fe2b0000.dwmmc: Looking up vmmc-supply from device tree
[ 7.587980] dwmmc_rockchip fe000000.dwmmc: Looking up vmmc-supply from device tree
[ 7.587998] dwmmc_rockchip fe000000.dwmmc: Looking up vmmc-supply property in node /dwmmc@fe000000 failed
[ 7.588031] dwmmc_rockchip fe000000.dwmmc: Looking up vqmmc-supply from device tree
[ 7.588040] dwmmc_rockchip fe000000.dwmmc: Looking up vqmmc-supply property in node /dwmmc@fe000000 failed
[ 7.588272] dwmmc_rockchip fe2b0000.dwmmc: Looking up vqmmc-supply from device tree
[ 7.588337] dwmmc_rockchip fe000000.dwmmc: allocated mmc-pwrseq
[ 7.588347] mmc_host mmc3: card is non-removable.
[ 7.599412] mmc_host mmc3: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[ 7.599417] mmc_host mmc1: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
[ 7.659124] mmc3: queuing unknown CIS tuple 0x80 (2 bytes)
[ 7.661077] mmc3: queuing unknown CIS tuple 0x80 (3 bytes)
[ 7.663037] mmc3: queuing unknown CIS tuple 0x80 (3 bytes)
[ 7.666315] mmc3: queuing unknown CIS tuple 0x80 (7 bytes)
[ 7.670035] mmc3: queuing unknown CIS tuple 0x81 (9 bytes)
[ 7.742527] mmc_host mmc3: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[ 7.748486] dwmmc_rockchip fe000000.dwmmc: Successfully tuned phase to 270
[ 7.751319] mmc3: new ultra high speed SDR104 SDIO card at address 0001
[ 8.223758] mmc1: delay init for 600 ms to enable UHS mode
[ 8.271018] mmc_host mmc1: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[ 8.417434] dwmmc_rockchip fe2b0000.dwmmc: Successfully tuned phase to 225
[ 8.417485] mmc1: new ultra high speed SDR104 SDHC card at address 0007
[ 8.419398] mmcblk1: mmc1:0007 SD8GB 7.42 GiB
[ 8.432118] mmcblk1: p1 p2 p3
[ 8.875446] sdhci-dwcmshc fe310000.sdhci: Looking up vmmc-supply from device tree
[ 8.875474] sdhci-dwcmshc fe310000.sdhci: Looking up vmmc-supply property in node /sdhci@fe310000 failed
[ 8.875525] sdhci-dwcmshc fe310000.sdhci: Looking up vqmmc-supply from device tree
[ 8.875535] sdhci-dwcmshc fe310000.sdhci: Looking up vqmmc-supply property in node /sdhci@fe310000 failed
[ 8.905679] mmc0: SDHCI controller on fe310000.sdhci [fe310000.sdhci] using ADMA
[ 8.949811] mmc0: Host Software Queue enabled
[ 8.949846] mmc0: new HS200 MMC card at address 0001
[ 8.950846] mmcblk0: mmc0:0001 88A43A 14.6 GiB
[ 8.951192] mmcblk0boot0: mmc0:0001 88A43A partition 1 4.00 MiB
[ 8.951487] mmcblk0boot1: mmc0:0001 88A43A partition 2 4.00 MiB
[ 8.951757] mmcblk0rpmb: mmc0:0001 88A43A partition 3 4.00 MiB, chardev (236:0)
[ 8.955264] mmcblk0: p1 p2 p3 p4
[ 10.346224] EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Opts: (null)
[ 11.306596] mmcblk1: p1 p2 p3
[ 11.650708] EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Opts: (null)
[ 13.910723] EXT4-fs (mmcblk1p3): re-mounted. Opts: (null)
[ 22.289273] FAT-fs (mmcblk1p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 31.232736] EXT4-fs (mmcblk1p3): resizing filesystem from 486717 to 1860603 blocks
[ 33.563820] EXT4-fs (mmcblk1p3): resized filesystem to 1860603

dmesg (last logs)

[ 21.902457] Adding 1015612k swap on /dev/zram0. Priority:100 extents:1 across:1015612k SS
[ 22.090422] rk817-codec rk817-codec: DMA mask not set
[ 22.090503] clk: failed to reparent i2s1_mclkout_tx to clk_i2s1_8ch_tx: -22
[ 22.128837] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[ 22.191159] brcmfmac: brcmf_fw_request_firmware: no board-specific nvram available (ret=-2), device will use brcm/brcmfmac43456-sdio.txt
[ 22.289273] FAT-fs (mmcblk1p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 22.389267] Bluetooth: Core ver 2.22
[ 22.389417] NET: Registered protocol family 31
[ 22.389423] Bluetooth: HCI device and connection manager initialized
[ 22.389449] Bluetooth: HCI socket layer initialized
[ 22.389460] Bluetooth: L2CAP socket layer initialized
[ 22.389489] Bluetooth: SCO socket layer initialized
[ 22.440058] Bluetooth: HCI UART driver ver 2.3
[ 22.440080] Bluetooth: HCI UART protocol H4 registered
[ 22.440084] Bluetooth: HCI UART protocol ATH3K registered
[ 22.440230] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 22.440688] Bluetooth: HCI UART protocol Intel registered
[ 22.443244] hci_uart_bcm serial0-0: Looking up vbat-supply from device tree
[ 22.443522] hci_uart_bcm serial0-0: Looking up vddio-supply from device tree
[ 22.444130] Bluetooth: HCI UART protocol Broadcom registered
[ 22.444211] Bluetooth: HCI UART protocol QCA registered
[ 22.562839] of_dma_request_slave_channel: dma-names property of node ‘/serial@fe6c0000’ missing or empty
[ 22.562938] dw-apb-uart fe6c0000.serial: failed to request DMA, use interrupt mode
[ 22.816601] Bluetooth: hci0: BCM: chip id 130
[ 22.817105] Bluetooth: hci0: BCM: features 0x0f
[ 22.819189] Bluetooth: hci0: BCM4345C5
[ 22.819208] Bluetooth: hci0: BCM4345C5 (003.006.006) build 0000
[ 22.822125] Bluetooth: hci0: BCM4345C5 ‘brcm/BCM4345C5.hcd’ Patch
[ 23.852079] Bluetooth: hci0: BCM4345C5 Ampak_CL1 UART 37.4 MHz BT 5.2 [Version: 1039.1086]
[ 23.852108] Bluetooth: hci0: BCM4345C5 (003.006.006) build 1086
[ 23.853022] Bluetooth: hci0: BCM: Using default device address (43:45:c5:00:1f:ac)
[ 24.198606] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 24.198630] Bluetooth: BNEP filters: protocol multicast
[ 24.198666] Bluetooth: BNEP socket layer initialized
[ 24.272723] enP2p33s0: 0xffff80000afb0000, 00:e0:4c:02:07:e6, IRQ 83
[ 24.356691] enp1s0: 0xffff80000a530000, 00:e0:4c:02:07:e5, IRQ 81
[ 27.090431] r8125: enp1s0: link up
[ 27.090536] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[ 27.539499] ttyFIQ ttyFIQ0: tty_port_close_start: tty->count = 1 port count = 2
[ 31.232736] EXT4-fs (mmcblk1p3): resizing filesystem from 486717 to 1860603 blocks
[ 33.419532] r8125 0000:01:00.0 enp1s0: rss get rxnfc
[ 33.424145] r8125 0000:01:00.0 enp1s0: rss get rxnfc
[ 33.563820] EXT4-fs (mmcblk1p3): resized filesystem to 1860603
[ 40.520762] r8125 0000:01:00.0 enp1s0: rss get rxnfc
[ 76.279236] brcmfmac: brcmf_sdio_htclk: Failed access turning clock off: -16

I think firmware doesn’t loading to the module. On CM3I with AP6256 dmesg always have log message about firmware info: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/9 wl0: Feb 11 2020 11:54:51 version 7.45.96.61 (be7af2d@shgit) (r745790) FWID 01-a41d86bd es7.c5.n4.a3"