Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

AIC8800_USB_porting_guide_v1_1_20220526

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.

Preliminary AIC8800 Low-Energy


Wi-Fi6/BT5.0 SoC
USB 移植手册

Revision: 1.1

2022/05/26

Confidential and Proprietary – AICSEMI INC. 1/8


AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.0

历史更新记录
时间 修改内容 修订人 版本
2021/06/07 初版 Aiden 1.0
2022/05/26 新增 Q&A 栏位 Aiden 1.1

Confidential and Proprietary – AICSEMI INC. 2/8


AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.0

该文件移植平台为 RK3229 Android10.0 平台


内核移植
可比对以下档案,确认是否有档案缺失。

aic8800 Wifi 驱动包


aic_btusb 蓝牙 btusb 驱动包
aic8800_porting_package\USB\driver_fw\drivers 驱动包

fmacfw.bin Wifi 固件
fw_adid.bin 蓝牙固件
fw_patch.bin 蓝牙固件
fw_patch_table.bin 蓝牙固件
aic8800_porting_package\USB\driver_fw\fw\aic8800 固件档案

aicbt 蓝牙 libbt-vendor
aic8800_porting_package\USB\driver_fw\aic

1. 将 aic 驱动包放置在 kernel/drivers/net/wireless/之下,并且修改


kernel/drivers/net/wireless/Kconfig 以及 kernel/drivers/net/wireless/Makefile

source "drivers/net/wireless/st/Kconfig"
source "drivers/net/wireless/ti/Kconfig"
source "drivers/net/wireless/zydas/Kconfig"
source "drivers/net/wireless/quantenna/Kconfig"
source "drivers/net/wireless/rockchip_wlan/Kconfig"
source "drivers/net/wireless/aic8800/Kconfig"
修改 kernel/drivers/net/wireless/Kconfig

obj-$(CONFIG_WLAN_VENDOR_MEDIATEK) += mediatek/
obj-$(CONFIG_WLAN_VENDOR_RALINK) += ralink/
obj-$(CONFIG_WLAN_VENDOR_REALTEK) += realtek/
obj-$(CONFIG_WLAN_VENDOR_RSI) += rsi/
obj-$(CONFIG_WLAN_VENDOR_ST) += st/
obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/
obj-$(CONFIG_WLAN_VENDOR_QUANTENNA) += quantenna/
obj-$(CONFIG_AIC_WLAN_SUPPORT) += aic8800/
修改 kernel/drivers/net/wireless/Makefile

Confidential and Proprietary – AICSEMI INC. 3/8


AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.0

2. 将 aic_btusb.c 和 aic_btusb.h 放到 kernel/drivers/bluetooth/之下,并且修改


kernel/drivers/bluetooth/Kconfig 以及 kernel/drivers/bluetooth/Makefile

config BT_HCIBTUSB_RTL
bool "Realtek protocol support"
depends on BT_HCIBTUSB
select BT_RTL
default y
help
The Realtek protocol support enables firmware and configuration
download support for Realtek Bluetooth controllers.

Say Y here to compile support for Realtek protocol.

config BT_AICBTUSB
tristate "AIC HCI USB driver"
depends on USB
help
AIC Bluetooth HCI USB driver

config BT_RTKBTUSB
tristate "RTK HCI USB driver"
depends on USB
help
RTK Bluetooth HCI USB driver

config BT_HCIBTSDIO
tristate "HCI SDIO driver"
depends on MMC
help
Bluetooth HCI SDIO driver.
This driver is required if you want to use Bluetooth device with
SDIO interface.

Say Y here to compile support for Bluetooth SDIO devices into the
kernel or say M to compile it as module (btsdio).

config BT_HCIUART

kernel/drivers/bluetooth/Kconfig

obj-$(CONFIG_BT_HCIBTUSB) += btusb.o
obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o

Confidential and Proprietary – AICSEMI INC. 4/8


AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.0

obj-$(CONFIG_BT_AICBTUSB) += aic_btusb.o
obj-$(CONFIG_BT_RTKBTUSB) += rtk_usb.o
kernel/drivers/bluetooth/Makefile
修改内核的 config(或用 make menuconfig),为以下参数

#
# Bluetooth device drivers
#
# CONFIG_BT_HCIBTUSB is not set
CONFIG_BT_AICBTUSB=m
# CONFIG_BT_RTKBTUSB is not set
# CONFIG_BT_HCIBTSDIO is not set
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4
.
.
.
# CONFIG_RTL8822BS is not set
# CONFIG_MVL88W8977 is not set
CONFIG_AIC_WLAN_SUPPORT=y
CONFIG_AIC8800_WLAN_SUPPORT=m
CONFIG_AIC_LOADFW_SUPPORT=m
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_USB_NET_RNDIS_WLAN is

需添加在内核 config 之参数

3. 编译完后即可得到
aic_btusb.ko、aic8800_fdrv.ko、aic_load_fw.ko

4. 各驱动模块的功用
aic_load_fw.ko:模块固件初始化
aic8800_fdrv.ko:Wifi 驱动
aic_btusb.ko:USB 蓝牙接口

当 AIC8800 上电时(EVB 板请按下按键上电),USB 会侦测到


Bus 003 Device 007: ID a69c:8800
当 aic_load_fw 将固件加载到 AIC8800 时,设备 ID 会改为
Bus 003 Device 007: ID a69c:8801
此时模块固件便加载完成,之后即可加载 aic8800_fdrv.ko 以及 aic_btusb.ko

Confidential and Proprietary – AICSEMI INC. 5/8


AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.0

蓝牙移植
将 aic 包放在 andoird\hardware\之下。

aic 放置目录

针对蓝牙部分进行以下修改。
# Bluetooth HAL
PRODUCT_PACKAGES += \
libbt-vendor \
android.hardware.bluetooth@1.0-impl \
android.hardware.bluetooth@1.0-service \
android.hardware.bluetooth@1.0-service.rc

ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_RTK)), true)


include hardware/realtek/rtkbt/rtkbt.mk
endif

ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_AIC)), true)


include hardware/aic/aicbt/aicbt.mk
endif

ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)


include device/rockchip/common/samba/rk31_samba.mk
PRODUCT_COPY_FILES += \

$(LOCAL_PATH)/init.box.samba.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.box.
samba.rc \
device/rockchip/common/cifsmanager.sh:system/bin/cifsmanager.sh
修改 android/device/rockchip/common/device.mk

chmod 0660 /dev/rtk_btusb


chown bluetooth net_bt /dev/rtk_btusb

Confidential and Proprietary – AICSEMI INC. 6/8


AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.0

chmod 0660 /dev/rtkbt_dev


chown bluetooth net_bt /dev/rtkbt_dev
# for aic bt usb
chmod 0660 /dev/aicbt_dev
chown bluetooth net_bt /dev/aicbt_dev

# bluetooth MAC address programming


chown bluetooth net_bt ro.bt.bdaddr_path
chown bluetooth net_bt /data/misc/bluetooth
setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
修改 android/device/rockchip/common/init.connectivity.rc

# for BT
/dev/vflash 0660 bluetooth net_bt_stack
/dev/ttyS0 0660 bluetooth net_bt_stack
/dev/ttyS1 0660 bluetooth net_bt_stack
#/dev/ttyS2 0660 bluetooth net_bt_stack
/dev/rtk_btusb 0660 bluetooth net_bt_stack
/dev/aic_btusb 0660 bluetooth net_bt_stack

#for hid audio


/dev/hidraw0 0660 audio audio

# for serial
/dev/ttyS4 0660 system system

# for radio
/dev/ttyUSB0 0660 system radio
修改 android/device/rockchip/common/ueventd.rockchip.rc

ifeq ($(strip $(BOARD_CONNECTIVITY_MODULE)), ap6xxx_gps)


BLUETOOTH_USE_BPLUS := true
BLUETOOTH_ENABLE_FM := false
endif
endif

BOARD_HAVE_BLUETOOTH_RTK := false
BOARD_HAVE_BLUETOOTH_AIC := true
修改 android/device/rockchip/common/wifi_bt_common.mk

Android 移植
可选择当下开发的平台、主控、系统进行比对,例如:移植 RK3229 Android10 可到补丁包中
的 for_Rockchip/3229/Android10 目录下选择比对 orig 以及 mod 之间的差异,将不同之处

Confidential and Proprietary – AICSEMI INC. 7/8


AIC8800D Wi-Fi6/BT5.0 移植手册 Rev1.0

打上您 SDK 当中。

内核移植、蓝牙移植以及 Android 移植完成后,将 SDK 编译即可使用 AIC8800 Wifi 以及蓝


牙功能。 Enjoy!

Q&A
Q:GMS 测试发生问题。
A:需要确认 wifi-hal 是否有移植上,可比对移植包中的 orig 以及 mod 进行确认。

Confidential and Proprietary – AICSEMI INC. 8/8

You might also like