瑞芯微Rockchip开发者社区
登录
直播中
李萍
7年用户
1448经验值
私信
关注
[问答]
如何对Android 7.1 RK3288 Wifi进行调试呢
开启该帖子的消息推送
RK3288
WIFI
如何对Android 7.1 RK3288 Wifi进行调试呢?
回帖
(1)
王文
2022-3-4 16:29:03
【平台信息】
CPU:RK3288
Android:7.1
Linux:4.4
WIFI&BT:AP6255
【硬件连接】
1、芯片介绍
【代码梳理】
1、内核配置:
cd kernel;make ARCH=arm menuconfig
Device Drivers —>
[
] Network device support —>
[
] Wireless LAN —>
生成配置文件:
kernel/arch/arm/configs/rockchip_defconfig
CONFIG_WLAN=y
CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y
CONFIG_RKWIFI=y
CONFIG_AP6210=y
CONFIG_RKWIFI_26M=y
2、Dts配置
1) arch/arm/boot/dts/rk3288.dtsi
sdio: rksdmmc@ff0d0000 {
compatible = "rockchip,rk_mmc", "rockchip,rk32xx-sdmmc";
reg = <0xff0d0000 0x4000>;
interrupts =
;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default","idle";
pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
pinctrl-1 = <&sdio0_gpio>;
clocks = <&clk_sdio0>, <&clk_gates8 4>;
clock-names = "clk_mmc", "hclk_mmc";
num-slots = <1>;
fifo-depth = <0x100>;
bus-width = <4>; /* 4线模式 */
tune_reg***ase = <0x208>;
cru_reg***ase = <0x1d8>;
cru_reset_offset = <1>;
};
2) arch/arm/boot/dts/rk3288-n1904.dts
wireless-wlan {
compatible = "wlan-platdata";
/* wifi_chip_type - wifi chip define
* bcmwifi ==> like ap6xxx, rk90x;
* rtkwifi ==> like rtl8188xx, rtl8723xx,rtl8812auv;
* esp8089 ==> esp8089;
* other ==> for other wifi;
*/
wifi_chip_type = "ap6212"; /* 海华和正基模组兼容,realtek需要按实际修改 */
sdio_vref = <1800>; //1800mv or 3300mv,支持SDIO3.0的模组IO一定要接1.8V,SDIO2.0 1.8V/3.3V都可以
//需要根据实际硬件连接设置对应的电压
//keep_wifi_power_on;
//power_ctrl_by_pmu;
power_pmu_regulator = "act_ldo3";
power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
//vref_ctrl_enable;
//vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
vref_pmu_regulator = "act_ldo3";
vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>; //WL_REG_ON,wifi模组pin12
WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>; //WL_HOST_WAKE,wifi模组pin13
//WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
status = "okay";
};
&sdio {
clock-frequency = <50000000>;
clock-freq-min-max = <200000 50000000>;
supports-highspeed;
supports-sdio;
ignore-pm-notify;
keep-power-in-suspend;
//cap-sdio-irq;
status = "okay";
};
3) arch/arm/boot/dts/rk3288-pinctrl.dts
pinctrl: pinctrl@ff770000 {
gpio4_sdio0 {
// SDIO四线接口配置
sdio0_clk: sdio0_clk {
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
sdio0_cmd: sdio0_cmd {
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
sdio0_bus4: sdio0-bus-width4 {
rockchip,pins =
,
,
,
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
//连接wifi模组pin12(WL_REG_ON)
sdio0_pwr: sdio0-pwren{
//rock3288-rk3288.h #define SDIO0_PWREN 0x4d41(bank4、offset:c1、func1)
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
//连接wifi模组pin13(WL_HOST_WAKE)
sdio0_intn: sdio0-intn{
//rock3288-rk3288.h #define SDIO0_INTN 0x4d61(bank4、offset:d6、func1)
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
RK808 PMU芯片的RTC CLK32KOUT2信号接到AP6212芯片SUSCLK_IN脚输入时钟
2、驱动介绍
kernel/.config文件CONFIG_AP6210=y
wifi 驱动路径:kernel/net/rfkill/rfkill-wlan.c
wifi驱动代码:drivers/net/wireless/rockchip_wlan/
【调试过程】
查看芯片
/sys/bus/sdio/devices/mmc1:0001:3 $ dmesg | grep “card at address”
查看Wifi芯片型号
rk3288:/ $ cat /sys/class/rkwifi/chip
[ 267.558874] Current WiFi chip is AP6255.
查看Wifi日志打印
logcat | grep WifiHW
【平台信息】
CPU:RK3288
Android:7.1
Linux:4.4
WIFI&BT:AP6255
【硬件连接】
1、芯片介绍
【代码梳理】
1、内核配置:
cd kernel;make ARCH=arm menuconfig
Device Drivers —>
[
] Network device support —>
[
] Wireless LAN —>
生成配置文件:
kernel/arch/arm/configs/rockchip_defconfig
CONFIG_WLAN=y
CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y
CONFIG_RKWIFI=y
CONFIG_AP6210=y
CONFIG_RKWIFI_26M=y
2、Dts配置
1) arch/arm/boot/dts/rk3288.dtsi
sdio: rksdmmc@ff0d0000 {
compatible = "rockchip,rk_mmc", "rockchip,rk32xx-sdmmc";
reg = <0xff0d0000 0x4000>;
interrupts =
;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default","idle";
pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_bus4>;
pinctrl-1 = <&sdio0_gpio>;
clocks = <&clk_sdio0>, <&clk_gates8 4>;
clock-names = "clk_mmc", "hclk_mmc";
num-slots = <1>;
fifo-depth = <0x100>;
bus-width = <4>; /* 4线模式 */
tune_reg***ase = <0x208>;
cru_reg***ase = <0x1d8>;
cru_reset_offset = <1>;
};
2) arch/arm/boot/dts/rk3288-n1904.dts
wireless-wlan {
compatible = "wlan-platdata";
/* wifi_chip_type - wifi chip define
* bcmwifi ==> like ap6xxx, rk90x;
* rtkwifi ==> like rtl8188xx, rtl8723xx,rtl8812auv;
* esp8089 ==> esp8089;
* other ==> for other wifi;
*/
wifi_chip_type = "ap6212"; /* 海华和正基模组兼容,realtek需要按实际修改 */
sdio_vref = <1800>; //1800mv or 3300mv,支持SDIO3.0的模组IO一定要接1.8V,SDIO2.0 1.8V/3.3V都可以
//需要根据实际硬件连接设置对应的电压
//keep_wifi_power_on;
//power_ctrl_by_pmu;
power_pmu_regulator = "act_ldo3";
power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
//vref_ctrl_enable;
//vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
vref_pmu_regulator = "act_ldo3";
vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>; //WL_REG_ON,wifi模组pin12
WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>; //WL_HOST_WAKE,wifi模组pin13
//WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
status = "okay";
};
&sdio {
clock-frequency = <50000000>;
clock-freq-min-max = <200000 50000000>;
supports-highspeed;
supports-sdio;
ignore-pm-notify;
keep-power-in-suspend;
//cap-sdio-irq;
status = "okay";
};
3) arch/arm/boot/dts/rk3288-pinctrl.dts
pinctrl: pinctrl@ff770000 {
gpio4_sdio0 {
// SDIO四线接口配置
sdio0_clk: sdio0_clk {
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
sdio0_cmd: sdio0_cmd {
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
sdio0_bus4: sdio0-bus-width4 {
rockchip,pins =
,
,
,
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
//连接wifi模组pin12(WL_REG_ON)
sdio0_pwr: sdio0-pwren{
//rock3288-rk3288.h #define SDIO0_PWREN 0x4d41(bank4、offset:c1、func1)
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
//连接wifi模组pin13(WL_HOST_WAKE)
sdio0_intn: sdio0-intn{
//rock3288-rk3288.h #define SDIO0_INTN 0x4d61(bank4、offset:d6、func1)
rockchip,pins =
;
rockchip,pull =
;
rockchip,drive =
;
//rockchip,tristate =
;
};
RK808 PMU芯片的RTC CLK32KOUT2信号接到AP6212芯片SUSCLK_IN脚输入时钟
2、驱动介绍
kernel/.config文件CONFIG_AP6210=y
wifi 驱动路径:kernel/net/rfkill/rfkill-wlan.c
wifi驱动代码:drivers/net/wireless/rockchip_wlan/
【调试过程】
查看芯片
/sys/bus/sdio/devices/mmc1:0001:3 $ dmesg | grep “card at address”
查看Wifi芯片型号
rk3288:/ $ cat /sys/class/rkwifi/chip
[ 267.558874] Current WiFi chip is AP6255.
查看Wifi日志打印
logcat | grep WifiHW
举报
更多回帖
rotate(-90deg);
回复
相关问答
RK3288
WIFI
如何对
RK3288
android
7.1
进行
调试
呢
2022-03-03
1276
如何对
RK3288
[
android
7.1
]的lvds屏
进行
调试
呢
2022-03-03
1005
RK3288
Android
7.1
如何
调试
USB MIDI?
2022-03-03
737
怎样去解决
RK3288
Android7.1
系统虚拟按键方向不对的问题
呢
2022-03-03
1216
请问一下怎样对
RK3288
[
android
7.1
]的mipi屏
进行
调试
呢
2022-03-03
1660
请问一下
RK3288
Android
7.1
是怎样
调试
USB MIDI的
2022-03-03
1383
如何对
Android
7.1
RK3288
PMU
进行
调试
呢
2022-03-04
959
如何对
Android7.1
RK3288
Thermal
进行
控制
呢
2022-03-04
1293
如何对
RK3288
Android7.1
SD 3.0
进行
调试
?
2022-03-03
869
怎样去修改
RK3288
[
android
7.1
]强制横屏的模式
呢
2022-03-03
1456
发帖
登录/注册
20万+
工程师都在用,
免费
PCB检查工具
无需安装、支持浏览器和手机在线查看、实时共享
查看
点击登录
登录更多精彩功能!
英国威廉希尔公司网站
william hill官网 版块
小组
免费开发板试用
ebook
直播
搜索
登录
×
20
完善资料,
赚取积分