Description
This document uses the RTL8852BE module as an example to introduce how to enable the PCIe WiFi module function by modifying files in the SDK.
Device Tree Description
The main device tree file for TaishanPi-3M is:
kernel-6.1/arch/arm64/boot/dts/rockchip/tspi-3m-rk3576.dts
This file contains many .dtsi files. These .dtsi files are pre-defined hardware configuration files. To make it easy for you to use and modify, each functional interface has been split into a separate .dtsi file.
Device Tree Modification
Open kernel-6.1/arch/arm64/boot/dts/rockchip/tspi-3m-rk3576.dts, find the following code snippet:
// #include "tspi-3m-rk3576-pcie.dtsi"Uncomment it to enable the PCIe WiFi module hardware settings:
#include "tspi-3m-rk3576-pcie.dtsi"Precautions
When enabling tspi-3m-rk3576-pcie.dtsi in this type, make sure:
tspi-3m-rk3576-sata.dtsiis commented out.tspi-3m-rk3576-ec20-4g.dtsiis commented out.
Add Driver
After modifying the device tree, you also need to add corresponding driver support in the Debian configuration file. Open device/rockchip/.chips/rk3576/tspi_3m_rk3576_debian_*_defconfig, find the following code snippet:
############################################################
# Using SDIO Broadcom (AP6XXX) Modules
############################################################
RK_WIFIBT_MODULES="ALL_AP"
############################################################
# Using PCIe WiFi/Bluetooth (RTL8852BE) Modules
############################################################
# RK_WIFIBT_MODULES="RTL8852BE"
# RK_WIFIBT_CHIP="RTL8852BE"2
3
4
5
6
7
8
9
10
Comment out the RK_WIFIBT_MODULES="ALL_AP" module driver, and uncomment RK_WIFIBT_MODULES="RTL8852BE" and RK_WIFIBT_CHIP="RTL8852BE". After modification, it should look like this:
############################################################
# Using SDIO Broadcom (AP6XXX) Modules
############################################################
# RK_WIFIBT_MODULES="ALL_AP"
############################################################
# Using PCIe WiFi/Bluetooth (RTL8852BE) Modules
############################################################
RK_WIFIBT_MODULES="RTL8852BE"
RK_WIFIBT_CHIP="RTL8852BE"2
3
4
5
6
7
8
9
10
Compile SDK and Flash
You need to recompile the entire SDK to generate the Debian12 image, then flash the image to the development board to use the PCIe WiFi module.
For image compilation, refer to: Debian12 Image Compilation 🚀 chapter.
For image flashing, refer to: Finished Image Flashing 🚀 chapter.
For
PCIe WiFimodule usage, refer to: Debian12 PCIe WiFi Module Usage 🚀 chapter.
How to Add Other PCIe WiFi Module Models
If you need to add other PCIe WiFi module models, you need to find the driver source code for the corresponding module. It can generally be found in external/rkwifibt/drivers source code.
If you find the driver source code for the corresponding module, you can refer to the addition method of the RTL8852BE module to add it to the configuration file.
Note
The values of RK_WIFIBT_MODULES and RK_WIFIBT_CHIP variables can be found in the device/rockchip/common/scripts/post-wifibt.sh script for the supported list.