[RK3288][Android6.0] WiFi的dts配置说明(AP6335)

Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92

      • 原理图
      • 配置文件
      • 参考

使用的是AP6335, 硬件上用的是SDIO0.

原理图:

[RK3288][Android6.0] WiFi的dts配置说明(AP6335)_第1张图片

配置文件:

电源部分:

wireless-wlan {
    compatible = "wlan-platdata";

    /* wifi_chip_type - wifi chip define
             * ap6210, ap6330, ap6335
             * rtl8188eu, rtl8723bs, rtl8723bu
             * esp8089
    */
    wifi_chip_type = "ap6335";
    sdio_vref = <1800>; //1800mv or 3300mv
    //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>;
    WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
    //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
    status = "okay";
};

compatible = "wlan-platdata";
和rfkill-wlan.c电源驱动匹配

wifi_chip_type = "ap6335";
用它来判断使用哪个硬件模块,加载对应的wifi驱动,配置。

sdio_vref = <1800>; //1800mv or 3300mv
wifi模组的IO电压,设置错误会导致Wifi通信异常引起WiFi打不开或者工作不稳定问题。

keep_wifi_power_on;
默认关闭,打开后表示开机过程后就直接上电,并且一直保持上电状态,后续的电源操作会失效。
有些WiFi模组可能是WiFi和BT共用电源,这时需要一直保持上电状态。

power_ctrl_by_pmu;
表示WiFi的电源是否直接通过PMU控制,一般都是用GPIO控制,默认是关闭的。 

power_pmu_regulator = "act_ldo3";
power_pmu_enable_level = <1>; //1->HIGH, 0->LOW

PMU输出口以及有效电平

vref_ctrl_enable;
在模组不工作(模组上的所有功能芯片都不工作)的情况下切断 IO参考电压输出,以此来降低一定的系统功耗。这个是可选配置并非所有硬件都支持,也不是所有WiFi模组都支持。

WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>;
gpio控制WiFi Power

WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
WiFi中断脚的配置,某些WiFi模组没有这个脚可以不用配置,AP6335需要配置。

SDIO部分:

&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";
};

属性说明见
kernel/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt

  • clock-frequency: Stable clk freq for data transfer
  • clock-freq-min-max: Host issue slave devices for timing supportted ranges from this clk gap
  • supports-highspeed: Indicate if this controller support highspeed mode or not
  • supports-emmc: Indicate this controller works as emmc
  • supports-sd: Indicate this controller works as sd/mmc card
  • supports-sdio: Indicate this controller works as sdio function(card)
  • ignore-pm-notify: Indicate this controller will ignore pm notify
  • keep-power-in-suspend: Indicate this controller should keep power in system suspend

参考:

kernel/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt
RK 3.10版本Kernel WiFi&BT_开发配置参考说明_for_Android5.0.pdf

你可能感兴趣的:(子类__WiFi)