[RK3288][Android6.0] WiFi的dts配置說明(AP6335)
Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92
使用的是AP6335, 硬體上用的是SDIO0.
原理圖:
配置檔案:
電源部分:
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