RK3288 新增WiFi&BT模組AP6212
CPU:RK3288
系統:Android 5.1
注:系統中自帶的模組沒有AP6212,相近的只有AP6210,設定為AP6210,直接新增韌體也可以正常使用。
此文是手動新增AP6212的例程。
1、在裝置樹中修改 wifi 晶片為 ap6212,
kernel/arch/arm/boot/dts/rk3288-tb_8846.dts
diff --git a/kernel/arch/arm/boot/dts/rk3288-tb_8846.dts b/kernel/arch/arm/boot/dts/rk3288-tb_8846.dts index 6a65163..aa5480d 100755--- a/kernel/arch/arm/boot/dts/rk3288-tb_8846.dts+++ b/kernel/arch/arm/boot/dts/rk3288-tb_8846.dts @@ -42,7 +42,7 @@ * rtl8188eu, rtl8723bs, rtl8723bu * esp8089 */ - wifi_chip_type = "ap6330";+ wifi_chip_type = "ap6212"; sdio_vref = <1800>; //1800mv or 3300mv
2、在 Kconfig 檔案中增加 AP6212 選項。
/kernel/drivers/net/wireless/Kconfig
diff --git a/kernel/drivers/net/wireless/Kconfig b/kernel/drivers/net/wireless/Kconfig index 544aa86..3e1026d 100755--- a/kernel/drivers/net/wireless/Kconfig+++ b/kernel/drivers/net/wireless/Kconfig @@ -84,6 +84,10 @@ choice config AP6210 bool "AP6210" depends on RKWIFI+ + config AP6212+ bool "AP6212"+ depends on RKWIFI config AP6234 bool "AP6234"
3、在配置檔案 rockchip_defconfig 中遮蔽舊 wifi 晶片,增加新的 wifi 晶片
kernel/arch/arm/configs/rockchip_defconfig
diff --git a/kernel/arch/arm/configs/rockchip_defconfig b/kernel/arch/arm/configs/rockchip_defconfig index e7c697a..5199ec0 100755--- a/kernel/arch/arm/configs/rockchip_defconfig+++ b/kernel/arch/arm/configs/rockchip_defconfig @@ -299,7 +299,7 @@ CONFIG_USB_SIERRA_NET=y CONFIG_RTL8188EU=y CONFIG_ESP8089=y CONFIG_RKWIFI=y-CONFIG_AP6335=y+# CONFIG_AP6335 is not set+CONFIG_AP6212=y # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_EVDEV=y CONFIG_INPUT_KEYRESET=y
4、此時串列埠列印中會出現開啟檔案 fw_bcm43438a1.bin 失敗,需要更新 wifi 模組韌體。
[ 18.686420] dhdsdio_download_code_file: Open firmware file failed /system/etc/firmware/fw_bcm43438a1.bin [ 18.686430] _dhdsdio_download_firmware: dongle image file download failed
WiFI 韌體路徑:/external/wlan_loader/firmware
將模組供應商提供的韌體檔案複製到此目錄下,然後編譯燒錄。
external/wlan_loader/firmware/fw_bcm43438a1.bin external/wlan_loader/firmware/fw_bcm43438a1_apsta.bin external/wlan_loader/firmware/fw_bcm43438a1_p2p.bin external/wlan_loader/firmware/nvram_ap6212.txt
編譯後,系統會將模組韌體複製到 out/target/product/rk3288/system/etc//firmware/ 目錄下
如果只是除錯,可以透過 adb 將韌體 push 到 /system/etc//firmware/ 目錄下,然後重啟。
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/rk_wifi_config.c
wifi 驅動路徑:kernel/net/rfkill/rfkill-wlan.c
如果器件升級,比如器件為AP6212A,供應商給的檔案問 nvram_ap6212a.txt,則需要修改下面檔案。(直接用以前的 nvram_ap6212.txt 也可以用,但檔案不一樣,不清楚)
路徑:\kernel\drivers\net\wireless\rockchip_wlan\rkwifi\bcmdhd\dhd_config.c
diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c index 39641e1..91d7925 100755--- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c+++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c @@ -477,7 +477,7 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) strcpy(&fw_path[i+1], bcm43438a0_fw_name[fw_type]); else if (chiprev == BCM43430A1_CHIP_REV) strcpy(&fw_path[i+1], bcm43438a1_fw_name[fw_type]);- strcpy(&nv_path[j+1], "nvram_ap6212.txt");+ strcpy(&nv_path[j+1], "nvram_ap6212a.txt");break; case BCM43340_CHIP_ID: if (chiprev == BCM43340B0_CHIP_REV)
5、BT 驅動中增添程式碼,支援 AP6212
BT 驅動路徑:kernel/net/rfkill/rfkill-bt.c
diff --git a/kernel/net/rfkill/rfkill-bt.c b/kernel/net/rfkill/rfkill-bt.c index a1a156c..3070080 100755--- a/kernel/net/rfkill/rfkill-bt.c+++ b/kernel/net/rfkill/rfkill-bt.c @@ -95,6 +95,8 @@ static const char bt_name[] = #else "ap6210_24M" #endif+#elif defined(CONFIG_AP6212) + "ap6212" #elif defined(CONFIG_AP6330) "ap6330" #elif defined(CONFIG_AP6476)@@ -266,7 +268,7 @@ static int rfkill_rk_set_power(void *data, bool blocked) struct rfkill_rk_data *rfkill = data; struct rfkill_rk_gpio *poweron = &rfkill->pdata->poweron_gpio; struct rfkill_rk_gpio *reset = &rfkill->pdata->reset_gpio;-#if defined(CONFIG_AP6210) || defined(CONFIG_AP6335) +#if defined(CONFIG_AP6210) || defined(CONFIG_AP6212) || defined(CONFIG_AP6335) struct rfkill_rk_gpio* rts = &rfkill->pdata->rts_gpio; struct pinctrl *pinctrl = rfkill->pdata->pinctrl; #endif@@ -307,7 +309,7 @@ static int rfkill_rk_set_power(void *data, bool blocked) msleep(20); gpio_direction_output(reset->io, reset->enable); }-#if defined(CONFIG_AP6210) || defined(CONFIG_AP6335) +#if defined(CONFIG_AP6210) || defined(CONFIG_AP6212) || defined(CONFIG_AP6335) if (pinctrl != NULL && gpio_is_valid(rts->io)) { pinctrl_select_state(pinctrl, rts->gpio_state);
到此 AP6212 就可以正常使用了,但是不知道供應商提供的 BT 韌體應該複製到哪裡。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69948385/viewspace-2674939/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- onthink新增模組
- 為 Nginx 新增模組Nginx
- apache新增php模組ApachePHP
- Nginx 新增 lua 模組Nginx
- [LearnKu 更新] 新增「文章推薦」模組
- Tengine新增nginx upstream模組的使用Nginx
- nginx使用熱部署新增新模組Nginx熱部署
- QtCreator CMakeLists.txt新增模組(Modules)QT
- Linux下新增php的zip模組LinuxPHP
- Laravel 8 路由模組新增 missing 方法Laravel路由
- 極簡實用的Asp.NetCore模組化框架新增CMS模組ASP.NETNetCore框架
- rk3566 新增MCP2515模組
- CentOS 下重新編譯 nginx 新增模組CentOS編譯Nginx
- CMake中新增Qt模組的合理方法QT
- 使用argparse模組新增命令列引數命令列
- 原生應用新增 Flutter 模組依賴Flutter
- UE4 在當前遊戲模組新增一個新的模組遊戲
- python中如何新增模組匯入路徑?Python
- Nginx為已安裝nginx動態新增模組Nginx
- FLUI 0.9 版本釋出,新增動態渲染模組 DynamicUI
- 瑞芯微RK3288 Datasheet,RK3288方案資料,RK3288晶片手冊晶片
- 序列化模組,隨機數模組,os模組,sys模組,hashlib模組隨機
- python 模組:itsdangerous 模組Python
- path模組 fs模組
- Python模組:time模組Python
- day18:json模組&time模組&zipfile模組JSON
- 極簡實用的Asp.NetCore框架再新增商城模組ASP.NETNetCore框架
- Python模組之urllib模組Python
- python模組之collections模組Python
- CommonJS模組 和 ECMAScript模組JS
- 序列化模組,subprocess模組,re模組,常用正則
- 聊天模組及分享模組分享
- [Python模組學習] glob模組Python
- 模組學習之hashlib模組
- 模組學習之logging模組
- springboot下新增日誌模組和設定日誌檔案輸出Spring Boot
- ?Slow Admin v1.5.* 版本釋出, 新增擴充套件管理模組套件
- rk3288 ADC調式