rageworx / rk3399_linux_kernel_4.4.179

Rock960 and most of Rockchip RK3399 embedded linux kernel, tuned for dual MIPI-CSI2, rkISP and some USB GbE device drivers
https://rageworx.info
GNU General Public License v2.0
5 stars 1 forks source link

dhd_module_init: Failed to load the driver #2

Open rageworx opened 4 years ago

rageworx commented 4 years ago

Looks dhd_wifi failure to load driver, as log :

>  dmesg | grep dhd
[    1.773928] dhd_module_init: in Dongle Host Driver, version 1.579.77.41.10 (r)
[    1.799830] ======== dhd_wlan_init_plat_data ========
[    1.801796] dhd_wlan_init_gpio: unknown oob irqflags !
[    1.802290] dhd_wlan_init_gpio: WL_HOST_WAKE=-1, oob_irq=-1, oob_irq_flags=0x410
[    1.803010] dhd_wlan_init_gpio: WL_REG_ON=-1
[    1.803437] dhd_wifi_platform_load: Enter
[   14.501517] dhd_wifi_platform_load_sdio: sdio_register_driver timeout or error
[   14.502033] ======== dhd_wlan_deinit_plat_data ========
[   14.502053] dhd_module_init: Failed to load the driver, try cnt 0
[   14.502158] dhd_module_init: Failed to load driver max retry reached**
[   14.502175] dhd_module_init: Exit err=-62

Looks SDIO not configured ?

rageworx commented 4 years ago

USB eth works well. WiFi not tested.

rageworx commented 4 years ago

checking rock960-model-ab-linux.dts,

 193     wireless-wlan {
 194         compatible = "wlan-platdata";
 195         rockchip,grf = <&grf>;
 196         wifi_chip_type = "ap6354";
 197         sdio_vref = <1800>;
 198         WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>;
 199         status = "okay";
 200     };

Seems fine.

rageworx commented 4 years ago

Rockchip Wi-Fi driver seems load as well.

[    1.773928] dhd_module_init: in Dongle Host Driver, version 1.579.77.41.10 (r)

[    1.773941] =======================================================
[    1.773943] ==== Launching Wi-Fi driver! (Powered by Rockchip) ====
[    1.773944] =======================================================
[    1.773947] Realtek 8188EU USB WiFi driver (Powered by Rockchip,Ver v5.2.2.3_24783.20171030) init.
[    1.773951] [WLAN_RFKILL]: rockchip_wifi_power: 1
[    1.773954] [WLAN_RFKILL]: rockchip_wifi_power: rfkill-wlan driver has not Successful initialized
[    1.773956] RTW: module init start
[    1.773958] RTW: rtl8188eu v5.2.2.3_24783.20171030
[    1.773961] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: Enter
[    1.773964] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: rfkill-wlan driver has not Successful initialized
rageworx commented 4 years ago

Testing Realtek RTL8188CU USB2.0 dongle USB

[ 6758.919453] usb 5-1.2: new high-speed USB device number 6 using xhci-hcd
[ 6759.009895] usb 5-1.2: New USB device found, idVendor=0bda, idProduct=8176
[ 6759.009935] usb 5-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6759.009960] usb 5-1.2: Product: 802.11n WLAN Adapter
[ 6759.009982] usb 5-1.2: Manufacturer: Realtek
[ 6759.010004] usb 5-1.2: SerialNumber: 00e04c000001

Result : not wlan%n% appears, something related problem of wpa-supplicant ?

rageworx commented 4 years ago

checking rfkill list ...

>  sudo rfkill list
0: bt_default: Bluetooth
        Soft blocked: yes
        Hard blocked: no

no such like wlan0,

rageworx commented 4 years ago

checking firmware has ...

>  ls /system/etc/firmware/nvram_ap6354.txt
/system/etc/firmware/nvram_ap6354.txt
rageworx commented 4 years ago

Checked between Rock960C ( successfully loads driver ) and 960B ( failure case)

Rock960B:

[    1.089568] dhd_module_init: in Dongle Host Driver, version 1.579.77.41.10 (r)
[    1.089580] ======== dhd_wlan_init_plat_data ========
[    1.089584] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: Enter
[    1.089588] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: rfkill-wlan driver has not Successful initialized
[    1.089591] dhd_wlan_init_gpio: unknown oob irqflags !
[    1.089595] dhd_wlan_init_gpio: WL_HOST_WAKE=-1, oob_irq=-1, oob_irq_flags=0x410
[    1.089598] dhd_wlan_init_gpio: WL_REG_ON=-1
[    1.089601] dhd_wifi_platform_load: Enter
[    1.089657] Power-up adapter 'DHD generic adapter'
[    1.089743] wifi_platform_set_power = 1
[    1.089746] ======== PULL WL_REG_ON(-1) HIGH! ========
[    1.089750] [WLAN_RFKILL]: rockchip_wifi_power: 1
[    1.089752] [WLAN_RFKILL]: rockchip_wifi_power: rfkill-wlan driver has not Successful initialized
[    1.096833] =======================================================
[    1.097425] ==== Launching Wi-Fi driver! (Powered by Rockchip) ====
[    1.098020] =======================================================

Rock960C:

[    1.681890] =======================================================
[    1.682330] dhd_module_init: in Dongle Host Driver, version 1.579.77.41.2 (r)
[    1.682334] ======== dhd_wlan_init_plat_data ========
[    1.682337] dhd_wlan_init_gpio: GPIO(WL_REG_ON) = -1
[    1.682340] dhd_wlan_init_gpio: GPIO(WL_HOST_WAKE) = -1
[    1.682343] [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: Enter
[    1.682349] dhd_wlan_init_gpio: host_oob_irq: 72
[    1.682351] dhd_wlan_init_gpio: host_oob_irq_flags=0x414
[    1.682353] dhd_wifi_platform_load: Enter
[    1.682370] Power-up adapter 'DHD generic adapter'
[    1.682405] wifi_platform_set_power = 1
[    1.682408] ======== PULL WL_REG_ON(-1) HIGH! ========
[    1.682411] [WLAN_RFKILL]: rockchip_wifi_power: 1
[    1.682415] [WLAN_RFKILL]: wifi turn on power. -1
[    1.688208] ==== Launching Wi-Fi driver! (Powered by Rockchip) ====
[    1.688761] =======================================================
rageworx commented 4 years ago

what IRQ of oob ?

 dhd_wlan_init_gpio: unknown oob irqflags !
rageworx commented 3 years ago

Maybe it belong to wrong dts. There's many wrong MIPI-CSI2 camera and ISP configuration on dts. Now it is testing to corrected dts.

rageworx commented 1 year ago

This is a bug as identified to reason driver not load from ext-4 file-system. Need exactly matched "dts" configuration for each different models of RK3399.

ikalkov commented 1 year ago

@rageworx, did you manage to fix this problem? I have a similar one.

rageworx commented 1 year ago

@ikalkov Sorry, I didn't advanced this issue for a while, by doing other project. This issue may solved by using different version of defconfig. I will check it further.

rageworx commented 1 year ago

@rageworx, did you manage to fix this problem? I have a similar one.

Dear @ikalkov, I'm on working kernel with gcc-8.3 for now. I will be in touch if to solve this issue.

yaoch168 commented 1 month ago

did you manage to fix this problem? I have a similar one.

rageworx commented 1 month ago

I will fix it soon, but now I'm on working for rk3588s. It will ve solved and share it.

2024년 7월 16일 (화) 오후 7:30, yaoch168 @.***>님이 작성:

did you manage to fix this problem? I have a similar one.

— Reply to this email directly, view it on GitHub https://github.com/rageworx/rk3399_linux_kernel_4.4.179/issues/2#issuecomment-2230558071, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVALAIXN6CDNEBZKOLO2JLZMTY3TAVCNFSM6AAAAABK6JKVT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZQGU2TQMBXGE . You are receiving this because you were mentioned.Message ID: @.***>

rageworx commented 1 month ago

This issue are occurs on different issue on Debian10.

image

Seems to related in rfkill_wifi or wlan logic ( segment fault )

rageworx commented 1 month ago

Plan to switching kernel version 5.10 ( as like rk3588/rk3588s )