Platform: RK3399
OS: Android 7.1
Kernel: v4.4.83
框架:
引用网友一张框图,画得很不错
从硬件角度来看:
CPU -> SDIO -> AP6356S
从软件角度来看分:
电源/IO管理
SDIO通道(Host和Client)
WiFi驱动
电源/GPIO管理模块:
主要完成对电源、GPIO的初始化和控制等。
配置是在DTS中
rk3399-mid-818-android.dts:
wireless-wlan {
compatible = "wlan-platdata";
rockchip,grf = <&grf>;
//AP6354和AP6356S兼容
wifi_chip_type = "ap6354";
sdio_vref = <1800>;
//WiFi中断脚,有些模组没有这个脚可以不配置
WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
status = "okay";
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rk818 1>;
clock-names = "ext_clock";
pinctrl-names = "default";
pinctrl-0 = <&wifi_enable_h>;
/*
* On the module itself this is one of these (depending
* on the actual card populated):
* - SDIO_RESET_L_WL_REG_ON
* - PDN (power down when low)
*/