Merge "[Feature][T106][task-view-280]WiFi chip D40L debugging and development"
diff --git a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_main.c b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_main.c
index 6991db8..cc458eb 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_main.c
+++ b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_main.c
@@ -59,6 +59,9 @@
extern const struct aicbsp_firmware fw_8800dc_h_u02[];
extern const struct aicbsp_firmware fw_8800d80_u01[];
extern const struct aicbsp_firmware fw_8800d80_u02[];
+// zw.wang WiFi chip D40L debugging and development on 20240906 on start
+extern const struct aicbsp_firmware fw_8800d80_h_u02[];
+// zw.wang WiFi chip D40L debugging and development on 20240906 on end
extern struct aicbsp_info_t aicbsp_info;
@@ -8207,16 +8210,26 @@
if (rwnx_send_dbg_mem_read_req(rwnx_hw, mem_addr, &rd_mem_addr_cfm))
return -1;
-
- aicbsp_info.chip_rev = (u8)(rd_mem_addr_cfm.memdata >> 16);
+ // zw.wang WiFi chip D40L debugging and development on 20240906 on start
+ aicbsp_info.chip_rev = (u8)((rd_mem_addr_cfm.memdata >> 16) & 0x3F);
+ is_chip_id_h = (u8)(((rd_mem_addr_cfm.memdata >> 16) & 0xC0) == 0xC0);
+ // zw.wang WiFi chip D40L debugging and development on 20240906 on end
btenable = 1;
aicbsp_info.cpmode = (testmode > 0 ? 1 : 0);
printk("%s chip_rev %u cpmode %u \n",__func__,aicbsp_info.chip_rev,aicbsp_info.cpmode);
- if (aicbsp_info.chip_rev == CHIP_REV_U01)
- aicbsp_firmware_list = fw_8800d80_u01;
- if (aicbsp_info.chip_rev == CHIP_REV_U02 || aicbsp_info.chip_rev == CHIP_REV_U03)
- aicbsp_firmware_list = fw_8800d80_u02;
+
+ // zw.wang WiFi chip D40L debugging and development on 20240906 on start
+ if (is_chip_id_h) {
+ printk("IS_CHIP_ID_H \n");
+ aicbsp_firmware_list = fw_8800d80_h_u02;
+ } else {
+ if (aicbsp_info.chip_rev == CHIP_REV_U01)
+ aicbsp_firmware_list = fw_8800d80_u01;
+ if (aicbsp_info.chip_rev == CHIP_REV_U02 || aicbsp_info.chip_rev == CHIP_REV_U03)
+ aicbsp_firmware_list = fw_8800d80_u02;
+ }
+ // zw.wang WiFi chip D40L debugging and development on 20240906 on end
if (aicbsp_system_config_8800d80(rwnx_hw))
return -1;
diff --git a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_platform.c b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_platform.c
index 47ef9be..2b67711 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_platform.c
+++ b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/rwnx_platform.c
@@ -166,6 +166,29 @@
},
};
+// zw.wang WiFi chip D40L debugging and development on 20240906 on start
+const struct aicbsp_firmware fw_8800d80_h_u02[] = {
+ [AICBSP_CPMODE_WORK] = {
+ .desc = "normal work mode(8800d80 sdio h_u02)",
+ .bt_adid = "fw_adid_8800d80_u02.bin",
+ .bt_patch = "fw_patch_8800d80_u02.bin",
+ .bt_table = "fw_patch_table_8800d80_u02.bin",
+ #ifdef CONFIG_SDIO_BT
+ .wl_fw = "fmacfwbt_8800d80_h_u02.bin"
+ #else
+ .wl_fw = "fmacfw_8800d80_h_u02.bin"
+ #endif
+ },
+
+ [AICBSP_CPMODE_TEST] = {
+ .desc = "rf test mode(8800d80 sdio u02)",
+ .bt_adid = "fw_adid_8800d80_u02.bin",
+ .bt_patch = "fw_patch_8800d80_u02.bin",
+ .bt_table = "fw_patch_table_8800d80_u02.bin",
+ .wl_fw = "lmacfw_rf_8800d80_u02.bin"
+ },
+};
+// zw.wang WiFi chip D40L debugging and development on 20240906 on end
const struct aicbsp_firmware *aicbsp_firmware_list = fw_8800dc_u02;
diff --git a/ap/project/zx297520v3/prj_vehicle_dc_ref/fs/normal/rootfs/etc/firmware/fmacfw_8800d80_h_u02.bin b/ap/project/zx297520v3/prj_vehicle_dc_ref/fs/normal/rootfs/etc/firmware/fmacfw_8800d80_h_u02.bin
new file mode 100755
index 0000000..b0d24a0
--- /dev/null
+++ b/ap/project/zx297520v3/prj_vehicle_dc_ref/fs/normal/rootfs/etc/firmware/fmacfw_8800d80_h_u02.bin
Binary files differ