Rockchip 平台rtl8821cs wifi移植调试
- 问题描述
- 解决方法
郑重声明:本人原创博文,都是实战,均经过实际项目验证出货的
转载请标明出处:攻城狮2015
Platform: Rockchip rk3128
OS:Android 7.1.2
Kernel: 3.10
问题描述
客户需要在现在的板子上调一款RTL8821cs wifi
解决方法
hal层修改
+++ b/hardware/libhardware_legacy/wifi/rk_wifi_ctrl.c
@@ -78,6 +78,7 @@ static wifi_device supported_wifi_devices[] = {{"RTL8723DS", "024c:d723"},{"RTL8188FU", "0bda:f179"},{"RTL8822BU", "0bda:b82c"},
+ {"RTL8821CS", "024c:c821"},{"RTL8189ES", "024c:8179"},{"RTL8189FS", "024c:f179"},{"RTL8192DU", "0bda:8194"},
+++ b/hardware/libhardware_legacy/wifi/wifi.c
@@ -89,6 +89,7 @@ extern int ifc_down(const char *name);#define RTL8723DS_DRIVER_MODULE_PATH "/system/lib/modules/8723ds.ko"#define RTL8188FU_DRIVER_MODULE_PATH "/system/lib/modules/8188fu.ko"#define RTL8822BU_DRIVER_MODULE_PATH "/system/lib/modules/8822bu.ko"
+#define RTL8821CS_DRIVER_MODULE_PATH "/system/lib/modules/8821cs.ko"#define RTL8822BS_DRIVER_MODULE_PATH "/system/lib/modules/8822bs.ko"#define RTL8189ES_DRIVER_MODULE_PATH "/system/lib/modules/8189es.ko"#define RTL8189FS_DRIVER_MODULE_PATH "/system/lib/modules/8189fs.ko"
@@ -101,6 +102,7 @@ extern int ifc_down(const char *name);#define DRIVER_MODULE_PATH_UNKNOW ""#define RTL8822BS_DRIVER_MODULE_NAME "8822bs"
+#define RTL8821CS_DRIVER_MODULE_NAME "8821cs"#define RTL8723CS_DRIVER_MODULE_NAME "8723cs"#define RTL8723DS_DRIVER_MODULE_NAME "8723ds"#define RTL8188EU_DRIVER_MODULE_NAME "8188eu"
@@ -202,6 +204,7 @@ wifi_ko_file_name module_list[] ={"RTL8192DU", RTL8192DU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},{"RTL8822BU", RTL8822BU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},{"RTL8822BS", RTL8822BS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},
+ {"RTL8821CS", RTL8821CS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},{"RTL8188FU", RTL8188FU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},{"RTL8189ES", RTL8189ES_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},{"RTL8723BS", RTL8723BS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},
@@ -986,7 +989,8 @@ int wifi_change_fw_path(const char *fwpath)if (wifi_type[0] == 0)check_wifi_chip_type_string(wifi_type);
- if (0 != strncmp(wifi_type, "AP", 2) || !strcmp(wifi_type, "AP6330")) {
+ // if (0 != strncmp(wifi_type, "AP", 2) || !strcmp(wifi_type, "AP6330")) {
+ if (0 != strncmp(wifi_type, "AP", 2)) {return 0;}
+++ b/hardware/realtek/rtkbt/system/etc/bluetooth/rtkbt.conf
@@ -8,4 +8,4 @@ DevClassMajorClass=0x01DevClassMinorClass=0x1C#Indicate USB or UART driver bluetooth
-BtDeviceNode=/dev/rtk_btusb
+BtDeviceNode=/dev/ttyS0
kernel修改
+++ b/kernel/arch/arm/configs/rockchip_defconfig
@@ -303,10 +303,17 @@ CONFIG_USB_HSO=yCONFIG_USB_NET_INT51X1=yCONFIG_USB_IPHETH=yCONFIG_USB_SIERRA_NET=y
-CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y
-CONFIG_RTL8188EU=y
-CONFIG_ESP8089=y
-CONFIG_RKWIFI=y
+CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=n
+CONFIG_CFG80211=y
+CONFIG_MAC80211=y
+CONFIG_SSV6051=m
+CONFIG_SSV6051_P2P=y
+CONFIG_SSV6051_SDIO=y
+CONFIG_WIFI_BUILD_MODULE=y
+CONFIG_RTL8188EU=n
+CONFIG_ESP8089=n
+CONFIG_RKWIFI=m
+CONFIG_RTL8821CS=mCONFIG_AP6335=y
+++ b/kernel/drivers/net/wireless/Kconfig
@@ -58,6 +58,7 @@ source "drivers/net/wireless/rockchip_wlan/rtl8189fs/Kconfig"source "drivers/net/wireless/rockchip_wlan/rtl8188fu/Kconfig"source "drivers/net/wireless/rockchip_wlan/rtl8822bs/Kconfig"source "drivers/net/wireless/rockchip_wlan/rtl8822bu/Kconfig"
+source "drivers/net/wireless/rockchip_wlan/rtl8821cs/Kconfig"
+++ b/kernel/drivers/net/wireless/Makefile
@@ -20,4 +20,5 @@ obj-$(CONFIG_RTL8188FU) += rockchip_wlan/rtl8188fu/obj-$(CONFIG_ESP8089) += rockchip_wlan/esp8089/obj-$(CONFIG_RTL8822BS) += rockchip_wlan/rtl8822bs/obj-$(CONFIG_RTL8822BU) += rockchip_wlan/rtl8822bu/
+obj-$(CONFIG_RTL8821CS) += rockchip_wlan/rtl8821cs/
剩下的就是添加wifi对应的驱动
kernel/drivers/net/wireless/rockchip_wlan/rtl8821cs
然后配置下dts对应的wlan bluetooth,相关的gpio电压
郑重声明:本人原创博文,都是实战,均经过实际项目验证出货的
转载请标明出处:攻城狮2015
有需要可以加VX