??瑞芯微RK系列對(duì)“REALTEK瑞昱公司”的wifi、藍(lán)牙雙模的模組都有內(nèi)置適配的,因此HAL層、Framework層、協(xié)議棧及庫(kù)文件都不需要移植適配,只需修改設(shè)備樹和一些配置文件即可。
一、RTL8723DS WiFi 適配 — 篇章
1、原理圖分析(WiFi部分)
補(bǔ)充:
RTL8723DS時(shí)鐘輸入源講解
??RTL8723DS模組的第24號(hào)引腳是模組的時(shí)鐘輸入源,需要給此提供1.8V~3.3V,32KHz的輸入源。由原理圖可知,提供時(shí)鐘輸入源的是RK808 CLK32KOUT1引腳提供的外部32KHz時(shí)鐘。因此需要添加:
clocks =<&rk808 1>;
clock-name = "ext_clock";
PATCH文件和規(guī)格書和參考文檔?? — 提取碼:baeg
2、根據(jù)原理圖修改設(shè)備樹和編輯驅(qū)動(dòng)文件
??由原理圖可以看出,板子上使用的RTL8723DS模塊WIFI部分的接口是SDIO接口的,因此在設(shè)備樹上修改對(duì)應(yīng)的GPIO即可。
??Ⅰ、首先打開對(duì)RTL8723DS模塊的供電,也就是WL_ON引腳->GPIO8_A4,先需要使用pinctrl將其復(fù)用成GPIO功能,然后將其WL_ON引腳拉低電平,讓其P-MOS管導(dǎo)通,處理方法如下圖所示:
??我這在HD_gpio_control.c這個(gè)GPIO驅(qū)動(dòng)程序上初始化GPIO8_A4,默認(rèn)拉低電平,如下圖所示,這里隨意寫個(gè)驅(qū)動(dòng)即可。
??Ⅱ、修改sdio0設(shè)備樹節(jié)點(diǎn),如下圖所示:
??將RTL8723DS驅(qū)動(dòng)添加到內(nèi)核嗎,如下圖所示:
??Ⅳ、修改make menuconfig,如下圖所示:
3、實(shí)驗(yàn)驗(yàn)證
??通過以上配置,基本驅(qū)動(dòng)移植就配置好了,如下圖所示:
4、RTL8723DS WIFI驅(qū)動(dòng)參考文檔和博客網(wǎng)站
博客參網(wǎng)站??
路徑:a\RKDocs\android\wifi\Rockchip_Introduction_REALTEK_WIFI_Driver_Porting_CN&EN.pdf和a\RKDocs\android\wifi\Rockchip_Introduction_WIFI_Configuration_CN&EN.pdf
二、RTL8723DS 藍(lán)牙Bluetooth 適配 — 篇章
1、原理圖分析(藍(lán)牙Bluetooth部分)
??上圖黃色框框就是本次藍(lán)牙功能適配需要關(guān)注的引腳接口。
2、根據(jù)原理圖修改設(shè)備樹
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-723391.html
3、修改藍(lán)牙相關(guān)的配置
diff --git a/device/rockchip/common/init.connectivity.rc b/device/rockchip/common/init.connectivity.rc
index 40fa8d31b2..66c4abf930 100755
--- a/device/rockchip/common/init.connectivity.rc
+++ b/device/rockchip/common/init.connectivity.rc
@@ -17,16 +17,16 @@ on zygote-start
chown bluetooth net_bt ro.bt.bdaddr_path
setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
- #chmod 0660 /dev/ttyS0
+ chmod 0660 /dev/ttyS0
chmod 0660 /dev/ttyS1
- #chmod 0660 /dev/ttyS8
+ chmod 0660 /dev/ttyS4
chmod 0660 /dev/vflash
chmod 0664 /dev/vendor_storage
chown bluetooth net_bt /dev/vflash
chown bluetooth net_bt /dev/vendor_storage
#chown bluetooth net_bt /dev/ttyS0
- chown bluetooth net_bt /dev/ttyS1
- #chown bluetooth net_bt /dev/ttyS8
+ #chown bluetooth net_bt /dev/ttyS1
+ chown bluetooth net_bt /dev/ttyS4
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
chmod 0664 /sys/class/rfkill/rfkill0/state
diff --git a/device/rockchip/common/ueventd.rockchip.rc b/device/rockchip/common/ueventd.rockchip.rc
index b69c909155..92fac57a91 100755
--- a/device/rockchip/common/ueventd.rockchip.rc
+++ b/device/rockchip/common/ueventd.rockchip.rc
@@ -65,18 +65,18 @@
/dev/gps 0660 gps gps
# for BT
-/dev/vflash 0660 bluetooth net_bt
/dev/ttyS0 0777 system system
-/dev/ttyS1 0660 bluetooth net_bt
+/dev/ttyS1 0777 system system
/dev/ttyS2 0777 system system
/dev/ttyS3 0777 system system
-/dev/ttyS4 0777 system system
/dev/ttyS5 0777 system system
/dev/ttyS7 0777 system system
/dev/ttyS8 0777 system system
/dev/ttyS9 0777 system system
-/dev/rtk_btusb 0660 bluetooth net_bt
+/dev/vflash 0660 bluetooth net_bt_stack
+/dev/ttyS4 0660 bluetooth net_bt_stack
+/dev/rtk_btusb 0660 bluetooth net_bt_stack
#for hid audio
/dev/hidraw0 0660 audio audio
diff --git a/device/rockchip/rk3288/bluetooth/rtkbt.conf b/device/rockchip/rk3288/bluetooth/rtkbt.conf
index 2bc297212b..42951cb793 100644
--- a/device/rockchip/rk3288/bluetooth/rtkbt.conf
+++ b/device/rockchip/rk3288/bluetooth/rtkbt.conf
@@ -9,7 +9,7 @@ DevClassMinorClass=0x1C
#Indicate USB or UART driver bluetooth
#BtDeviceNode=/dev/rtk_btusb
-BtDeviceNode=/dev/ttyS0
+BtDeviceNode=/dev/ttyS4
# Enable BtSnoop logging function
# valid value : true, false
diff --git a/device/rockchip/rk3288/rk3288_Android11/bt_vendor.conf b/device/rockchip/rk3288/rk3288_Android11/bt_vendor.conf
index 3714843d5b..a133cad89f 100755
--- a/device/rockchip/rk3288/rk3288_Android11/bt_vendor.conf
+++ b/device/rockchip/rk3288/rk3288_Android11/bt_vendor.conf
@@ -1,5 +1,5 @@
# UART device port where Bluetooth controller is attached
-UartPort = /dev/ttyS0
+UartPort = /dev/ttyS4
# Firmware patch file location
FwPatchFilePath = /vendor/etc/firmware/
diff --git a/hardware/realtek/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h b/hardware/realtek/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h
index a11546837e..f5a6080ffe 100755
--- a/hardware/realtek/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h
+++ b/hardware/realtek/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h
@@ -87,7 +87,7 @@
/* Device port name where Bluetooth controller attached */
#ifndef BLUETOOTH_UART_DEVICE_PORT
-#define BLUETOOTH_UART_DEVICE_PORT "/dev/ttyS1" /* maguro */
+#define BLUETOOTH_UART_DEVICE_PORT "/dev/ttyS4" /* maguro */
#endif
/* Location of firmware patch files */
diff --git a/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt.conf b/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt.conf
index a1e9b39361..c137c0ebd5 100755
--- a/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt.conf
+++ b/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt.conf
@@ -9,7 +9,11 @@ DevClassMinorClass=0x1C
#Indicate USB or UART driver bluetooth
#BtDeviceNode=/dev/rtkbt_dev
-BtDeviceNode=?/dev/ttyS1:H5
+BtDeviceNode=?/dev/ttyS4:H5
+
+# Enable BtSnoop logging function
+# valid value : true, false
+RtkBtsnoopDump=true
# BtSnoop log output file
BtSnoopFileName=/data/misc/bluedroid/btsnoop_hci.cfa
diff --git a/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt_S0.conf b/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt_S0.conf
index 87a8241f17..89cd47356a 100755
--- a/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt_S0.conf
+++ b/hardware/realtek/rtkbt/vendor/etc/bluetooth/rtkbt_S0.conf
@@ -9,7 +9,7 @@ DevClassMinorClass=0x1C
#Indicate USB or UART driver bluetooth
#BtDeviceNode=/dev/rtk_btusb
-BtDeviceNode=?/dev/ttyS0:H5
+BtDeviceNode=?/dev/ttyS4:H5
# Enable BtSnoop logging function
# valid value : true, false
4、RTL8723DS 藍(lán)牙Bluetooth驅(qū)動(dòng)參考文檔
路徑:a\RKDocs\android\bt\Rockchip_Introduction_Android9.0_BT_Configuration_CN.pdf文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-723391.html
到了這里,關(guān)于RK3288 Android11 RTL8723DS WiFi 和 藍(lán)牙Bluetooth 適配的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!