Bug #1137
openNo wifi interface found
20%
Description
Pinet doesn't work because there is no wifi interface.
Notes:- PPP Schematic
- According to the schematic, the chip is AW-CM256SM which is both BT and WiFi.
- The DTS shows Bluetooth is brcm4345c5, but that appears to just be a BT driver, not WiFi.
bluetooth { compatible = "brcm,bcm4345c5"; .... };
- See also
- RockPro64 Hardware Tweaks for same Wifi chip
- Armbian Firmware supposedly supports the RockPro64 wifi.
- Cypress Linux Driver
See this discussion on the pine64.org forum. Apparently it uses similar firmware to the RPi, which is available from the Debian firmware-brcm80211 package.
On a Debian (based) system, install firmware-brcm80211 package and then do this: Code: cd /lib/firmware/brcm/ ln -s brcmfmac43455-sdio.AW-CM256SM.txt brcmfmac43455-sdio.pine64,rockpro64-v2.0.txt ln -s brcmfmac43455-sdio.AW-CM256SM.txt brcmfmac43455-sdio.pine64,rockpro64-v2.1.txt That should be all you need. Ref: https://git.kernel.org/pub/scm/linux/ker...a92193f2c6
More specifically:
Code: sudo ln -sf /lib/firmware/brcm/brcmfmac43455-sdio.AW-CM256SM.txt /lib/firmware/brcm/brcmfmac43455-sdio.txt sudo ln -sf /lib/firmware/cypress/cyfmac43455-sdio.bin /lib/firmware/brcm/brcmfmac43455-sdio.bin sudo ln -sf /lib/firmware/cypress/cyfmac43455-sdio.clm_blob /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob sudo rmmod brcmfmac sudo modprobe brcmfmac dmesg Code: [ 7896.303895] usbcore: registered new interface driver brcmfmac [ 7896.490453] brcmfmac_wcc: brcmf_wcc_attach: executing [ 7896.504985] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2 nmctl show dev Code: GENERAL.DEVICE: wlan0 GENERAL.TYPE: wifi GENERAL.HWADDR: E8:FB:1C:7F:48:A7 GENERAL.MTU: 1500 GENERAL.STATE: 30 (desconectado) GENERAL.CONNECTION: -- GENERAL.CON-PATH: -- IP4.GATEWAY: -- IP6.GATEWAY: -- GENERAL.DEVICE: p2p-dev-wlan0 GENERAL.TYPE: wifi-p2p GENERAL.HWADDR: (desconocido) GENERAL.MTU: 0 GENERAL.STATE: 30 (desconectado) GENERAL.CONNECTION: -- GENERAL.CON-PATH: --
Related issues
Updated by Hammel 7 months ago
- Blocks Feature #1063: Add phone mode to PiNet to configure WiFi added
Updated by Hammel 7 months ago
According to Pine64 documentation the wifi component is the AzureWave AW-CM256SM which is the same as other devices in the Pine64 family. So the information in the Description would appear accurate.
The .txt files are in the upstream kernel.org firmware repo. The dev system build uses "master" for the primary branch but this has changed to "main", so this needs to be changed before pulling an update to get those files. Also, the Xeon build is pulling from Megous' firmware tree, which is not updated (and is still using "master"). So I'll need to pull the wifi firmware from upstream instead of from Megous.
Updated by Hammel 7 months ago
- Blocks Feature #1134: Replace Hidden SSID button with show/hide mac button. added
Updated by Hammel 7 months ago
- Status changed from New to In Progress
- % Done changed from 0 to 20
It's possible I just didn't have the megi fw installed. I've fixed that in the xeon2 sandbox. I need to just copy the fw to the phone and reboot to see if that's sufficient to get the wifi interface to show up. I don't see the driver I expected to be enable in the kernel config, but maybe I'm looking at the wrong one.
Updated by Hammel 7 months ago
That's not it - there were firmware blobs already there from megious, but they were a bit out of date. Updating them did nothing.
The kernel config has no loadable modules - everything is builtin. So this isn't a module loading issue.
Next step is to try enabling the modules I suspect are the appropriate ones and making sure the original hacks (in the issue description) are in place.
Updated by Hammel 7 months ago
This is manjaro's loaded modules list.
[root@manjaro-arm ~]# lsmod | more Module Size Used by option 57344 1 usb_wwan 24576 1 option usbserial 32768 4 usb_wwan,option qmi_wwan 36864 0 rfcomm 53248 16 bnep 28672 2 zram 28672 2 zsmalloc 32768 1 zram crct10dif_ce 20480 1 snd_soc_simple_card 20480 2 snd_soc_simple_card_utils 20480 1 snd_soc_simple_card leds_sgm3140 16384 0 rockchip_isp1 69632 0 snd_soc_rockchip_i2s 20480 2 phy_rockchip_dphy_rx0 16384 1 rockchip_rga 24576 0 hantro_vpu 110592 0 rockchip_vdec 32768 0 videobuf2_dma_sg 24576 1 rockchip_rga v4l2_h264 16384 2 rockchip_vdec,hantro_vpu inv_mpu6050_i2c 16384 0 inv_mpu6050 32768 2 inv_mpu6050_i2c videobuf2_vmalloc 20480 2 rockchip_isp1,hantro_vpu snd_soc_rt5640 114688 1 snd_soc_simple_amplifier 16384 1 snd_soc_hdmi_codec 20480 0 nls_iso8859_1 16384 1 snd_soc_rl6231 16384 1 snd_soc_rt5640 brcmfmac 278528 0 hci_uart 57344 0 btrtl 24576 1 hci_uart snd_soc_core 159744 6 snd_soc_hdmi_codec,snd_soc_rt5640,snd_soc_simple_amplifier,snd_soc_simple_card_utils,snd_socd btbcm 24576 1 hci_uart brcmutil 16384 1 brcmfmac snd_pcm_dmaengine 20480 1 snd_soc_core bluetooth 434176 42 btrtl,hci_uart,btbcm,bnep,rfcomm snd_pcm 110592 4 snd_soc_hdmi_codec,snd_soc_rt5640,snd_soc_core,snd_pcm_dmaengine cfg80211 331776 1 brcmfmac snd_timer 32768 1 snd_pcm ecdh_generic 16384 1 bluetooth ecc 32768 1 ecdh_generic rfkill 28672 10 bluetooth,cfg80211 snd 73728 8 snd_soc_hdmi_codec,snd_timer,snd_soc_core,snd_pcm stk3310 16384 0 rockchip_thermal 24576 0 soundcore 16384 1 snd binfmt_misc 24576 1
I brcmfmac and brcmutil, not to mention the v4l2_h264, hantro_vpu and related video drivers. I'll start first with the brcmfmac and brcmutil drivers, along with the above mentioned files pulled from upstream kernel.org firmware.
Updated by Hammel 7 months ago
The following are already configured in the defconfig.
CONFIG_BRCMFMAC=y CONFIG_BRCMFMAC_PROTO_BCDC=y CONFIG_BRCMFMAC_SDIO=y
Added the firmware files from upstream, made the symlinks, but no wifi. dmesg reports the following.
$ dmesg | grep brcm Bluetooth: hci0: BCM: 'brcm/BCM4345C0.pine64,pinephone-pro.hcd' Bluetooth: hci0: BCM: 'brcm/BCM4345C0.hcd' Bluetooth: hci0: BCM: 'brcm/BCM.pine64,pinephone-pro.hcd' Bluetooth: hci0: BCM: 'brcm/BCM.hcd' brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.pine64,pinephone-pro.bin failed with error -2 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2 brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
I think the dts tries to load something different. I need to look at the DTS: arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts A quick gander shows that it is the cypress chip.
I need to check with Megi about this on IRC.
Updated by Hammel 7 months ago
Built with just Megi's firmware tree and got this.
$ dmesg | grep firmware psci: PSCIv1.1 detected in firmware. panel-himax-hx8394 ff960000.mipi.0: Direct firmware load for hx8394-mode.bin failed with error -2 Bluetooth: hci0: BCM: firmware Patch file not found, tried: Goodix-TS 3-0014: Direct firmware load for goodix_1158_cfg.bin failed with error -2 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.pine64,pinephone-pro.bin failed with error -2 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2 cdn-dp fec00000.dp: Direct firmware load for rockchip/dptx.bin failed with error -2 platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 cdn-dp fec00000.dp: Direct firmware load for rockchip/dptx.bin failed with error -2
The files that are failing are not in either megi's firmware tree or in upstream kernel.org firmware. Not sure where they come from yet.
Updated by Hammel 7 months ago
Made a symlink from /lib/firmware (Megi's fw) to /usr/lib/firmware, but this didn't help.
$ dmesg | grep firmware psci: PSCIv1.1 detected in firmware. panel-himax-hx8394 ff960000.mipi.0: Direct firmware load for hx8394-mode.bin failed with error -2 Bluetooth: hci0: BCM: firmware Patch file not found, tried: Goodix-TS 3-0014: Direct firmware load for goodix_1158_cfg.bin failed with error -2 cdn-dp fec00000.dp: Direct firmware load for rockchip/dptx.bin failed with error -2 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.pine64,pinephone-pro.bin failed with error -2 brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2 platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 cdn-dp fec00000.dp: Direct firmware load for rockchip/dptx.bin failed with error -2
Of these, I found the following:
$ find linux-firmware/ -name dptx.bin linux-firmware/rockchip/dptx.bin $ find megi-firmware/ -name brcmfmac43455-sdio.bin megi-firmware/brcm/brcmfmac43455-sdio.bin
I don't know where the rest would come from, or why brcmfmac43455-sdio.bin was not found.
Update:- The Goodix firmware is not required - the touchscreen is working without it.