问题:RK3568 Android11 AP6256 wifi重启后概率性连不上是什么原因导致的?
测过WL_REG_ON引脚的电压值是1.8v,这点应该是没问题的。
dts相关信息是这样配置的:
sdio-pwrseq {
wifi_enable_h: wifi-enable-h {
rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
};
wifi_32k: wifi-32k {
rockchip,pins = <2 RK_PC6 1 &pcfg_pull_none>;
};
};
wireless-wlan {
wifi_host_wake_irq: wifi-host-wake-irq {
rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
};
};
&sdio_pwrseq {
clocks = <&rk817 1>;
clock-names = "ext_clock";
pinctrl-names = "default";
/*
* 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)
*/
reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
};
&sdmmc1 {
max-frequency = <150000000>;
supports-sdio;
bus-width = <4>;
disable-wp;
cap-sd-highspeed;
cap-sdio-irq;
keep-power-in-suspend;
mmc-pwrseq = <&sdio_pwrseq>;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
sd-uhs-sdr104;
status = "okay";
};
附WiFi连不上时的log调试信息:
[ 8.338086] init: Verified that /data/nfc has the encryption policy 2f6da793d74b96554ee678c08f263fd4 v2 modes 1/4 flags 0xa
[ 8.338546] init: Inferred action different from explicit one, expected 0 but got 2
[ 8.338864] init: Verified that /data/nfc/param has the encryption policy 2f6da793d74b96554ee678c08f263fd4 v2 modes 1/4 flags 0xa
[ 8.655445] rk-pcie 3c0000000.pcie: PCIe Linking... LTSSM is 0x0
[ 8.723064] healthd: BatteryCycleCountPath not found
[ 8.736561] healthd: battery l=100 v=4440 t=18.8 h=2 st=5 c=-555000 fc=2500000 chg=au
[ 8.893058] file system registered
[ 8.895443] using random self ethernet address
[ 8.895459] using random host ethernet address
[ 8.969169] dhd_module_init: in Dongle Host Driver, version 1.579.77.41.22 (r-20191105-2)(20191120-1)
[ 8.969202] ======== dhd_wlan_init_plat_data ========
[ 8.969212] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: Enter
[ 8.969269] dhd_wlan_init_gpio: WL_HOST_WAKE=-1, oob_irq=120, oob_irq_flags=0x414
[ 8.969281] dhd_wlan_init_gpio: WL_REG_ON=-1
[ 8.969290] dhd_wifi_platform_load: Enter
[ 8.969300] Power-up adapter 'DHD generic adapter'
[ 8.973223] wifi_platform_set_power = 1
[ 8.973243] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 8.973265] [WLAN_RFKILL]: rockchip_wifi_power: 1
[ 8.973277] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 8.973287] [WLAN_RFKILL]: wifi turn on power [GPIO-1-0]
[ 9.278782] wifi_platform_bus_enumerate device present 1
[ 9.278801] ======== Card detection to detect SDIO card! ========
[ 9.278807] mmc1:mmc host rescan start!
[ 9.372942] read descriptors
[ 9.373022] read strings
[ 9.669762] rk-pcie 3c0000000.pcie: PCIe Linking... LTSSM is 0x0
[ 9.674597] dwc3 fcc00000.dwc3: device reset
[ 9.781491] android_work: sent uevent USB_STATE=CONNECTED
[ 9.797181] configfs-gadget gadget: high-speed config #1: b
[ 9.797389] android_work: sent uevent USB_STATE=CONFIGURED
[ 10.682160] rk-pcie 3c0000000.pcie: PCIe Linking... LTSSM is 0x1
[ 11.018198] init: Control message: Processed ctl.start for 'bootanim' from pid: 187 (/system/bin/surfaceflinger)
[ 11.447944] Freeing drm_logo memory: 6004K
[ 11.485581] failed to power up DHD generic adapter, 1 retry left
[ 11.501795] wifi_platform_set_power = 0
[ 11.501826] ======== PULL WL_REG_ON(-1) LOW! ========
[ 11.501832] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 11.501847] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 11.501852] [WLAN_RFKILL]: wifi shut off power [GPIO-1-1]
[ 11.501858] wifi_platform_bus_enumerate device present 0
[ 11.501862] ======== Card detection to remove SDIO card! ========
[ 11.501867] mmc1:mmc host rescan start!
[ 11.501958] wifi_platform_set_power = 1
[ 11.501965] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 11.501969] [WLAN_RFKILL]: rockchip_wifi_power: 1
[ 11.501975] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 11.501990] [WLAN_RFKILL]: wifi turn on power [GPIO-1-0]
[ 11.695466] rk-pcie 3c0000000.pcie: PCIe Link Fail
[ 11.695499] rk-pcie 3c0000000.pcie: failed to initialize host
[ 11.812170] wifi_platform_bus_enumerate device present 1
[ 11.812205] ======== Card detection to detect SDIO card! ========
[ 11.812211] mmc1:mmc host rescan start!
[ 13.828784] failed to power up DHD generic adapter, 0 retry left
[ 13.845528] wifi_platform_set_power = 0
[ 13.845560] ======== PULL WL_REG_ON(-1) LOW! ========
[ 13.845566] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 13.845580] [WLAN_RFKILL]: rockchip_wifi_power: toggle = false
[ 13.845586] [WLAN_RFKILL]: wifi shut off power [GPIO-1-1]
[ 13.845592] wifi_platform_bus_enumerate device present 0
[ 13.845596] ======== Card detection to remove SDIO card! ========
[ 13.845602] mmc1:mmc host rescan start!
[ 13.845607] failed to power up DHD generic adapter, max retry reached**
[ 13.845613] unregister wifi platform drivers
[ 13.845617] wifi_platform_bus_enumerate device present 0
[ 13.845621] ======== Card detection to remove SDIO card! ========
[ 13.845624] mmc1:mmc host rescan start!
[ 13.845629] ======== dhd_wlan_deinit_plat_data ========
[ 13.845635] dhd_module_init: Failed to load the driver, try cnt 0
[ 13.845688] dhd_module_init: Failed to load driver max retry reached**
[ 13.845696] dhd_module_init: Exit err=-19
【以下回答由 GPT 生成】
根据提供的dts配置和引脚信息,以下是对可能导致问题的原因的分析和解决方案:
wifi_enable_h: wifi-enable-h {
rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
};
&sdmmc1 {
max-frequency = <150000000>;
supports-sdio;
bus-width = <4>;
}
wifi_host_wake_irq: wifi-host-wake-irq {
rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
};
综上所述,通过分析dts配置和引脚信息,可能导致WiFi重启后无法连接的原因包括硬件电源序列配置不正确、SDIO时钟配置有问题和WiFi主机唤醒中断配置有问题等。请按照上述解决方案检查和调整相应的配置。