cyw43438 insmod error

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
WIFI-01
Level 4
Level 4
100 sign-ins First like given 50 replies posted

主控平台君正x2000,内核4.4,具体日志和驱动程序见附件,reg_on 加载的过程是高电平,帮忙解答一下

谢谢。

[21:59:26:710]# insmod bcmdhd.ko
[21:59:26:734][ 191.958273] dhd_module_init in
[21:59:26:734][ 191.961567] CFG80211-ERROR) wl_netlink_init : nl_sk is not ready
[21:59:26:745][ 191.968002] Power-up adapter 'DHD generic adapter'
[21:59:26:745][ 191.973261] wifi_platform_set_power = 1
[21:59:26:756][ 191.977229] ======== PULL WL_REG_ON(-1) HIGH! ========
[21:59:27:062][ 192.290040] wifi_platform_bus_enumerate device present 1
[21:59:27:075][ 192.295541] ======== Card detection to detect SDIO card! ========
[21:59:27:105][ 192.318827] F1 signature read @0x18000000=0x1541a9a6
[21:59:27:105][ 192.333391] dhdsdio_probe_attach: si_attach failed!
[21:59:27:122][ 192.338430] dhdsdio_probe: dhdsdio_probe_attach failed
[21:59:27:124][ 192.343912] bcmsdh_sdmmc: probe of mmc1:0001:2 failed with error -12
[21:59:39:125][ 204.350038] dhd_wifi_platform_load_sdio: sdio_register_driver timeout or error
[21:59:39:127][ 204.357726] wifi_platform_set_power = 0
[21:59:39:135][ 204.361738] ======== PULL WL_REG_ON(-1) LOW! ========
[21:59:39:136][ 204.367033] wifi_platform_bus_enumerate device present 0
[21:59:39:149][ 204.372547] ======== Card detection to remove SDIO card! ========
[21:59:39:149][ 204.378899] unregister wifi platform drivers
[21:59:39:159][ 204.383327] dhd_module_init: Failed to load the driver, try cnt 3
[21:59:39:159][ 204.389686] CFG80211-ERROR) wl_netlink_init : nl_sk is not ready
[21:59:39:172][ 204.395917] Power-up adapter 'DHD generic adapter'
[21:59:39:173][ 204.401258] wifi_platform_set_power = 1
[21:59:39:183][ 204.405231] ======== PULL WL_REG_ON(-1) HIGH! ========
[21:59:39:492][ 204.720033] wifi_platform_bus_enumerate device present 1
[21:59:39:506][ 204.725521] ======== Card detection to detect SDIO card! ========
[21:59:39:533][ 204.748619] F1 signature read @0x18000000=0x1541a9a6
[21:59:39:546][ 204.763207] sdhci: Tuning procedure failed, falling back to fixed sampling clock
[21:59:39:546][ 204.770876] mmc1: tuning execution failed
[21:59:39:547][ 204.775100] dhdsdio_probe_attach: si_attach failed!
[21:59:39:569][ 204.780159] dhdsdio_probe: dhdsdio_probe_attach failed
[21:59:39:570][ 204.785627] bcmsdh_sdmmc: probe of mmc1:0001:2 failed with error -12
[21:59:51:564][ 216.790033] dhd_wifi_platform_load_sdio: sdio_register_driver timeout or error
[21:59:51:566][ 216.797720] wifi_platform_set_power = 0
[21:59:51:576][ 216.801728] ======== PULL WL_REG_ON(-1) LOW! ========
[21:59:51:576][ 216.807126] wifi_platform_bus_enumerate device present 0
[21:59:51:591][ 216.812644] ======== Card detection to remove SDIO card! ========
[21:59:51:592][ 216.819047] unregister wifi platform drivers
[21:59:51:599][ 216.823481] dhd_module_init: Failed to load the driver, try cnt 2
[21:59:51:600][ 216.829885] CFG80211-ERROR) wl_netlink_init : nl_sk is not ready
[21:59:51:610][ 216.836116] Power-up adapter 'DHD generic adapter'
[21:59:51:611][ 216.841448] wifi_platform_set_power = 1
[21:59:51:620][ 216.845411] ======== PULL WL_REG_ON(-1) HIGH! ========
[21:59:51:932]^C[ 217.160033] wifi_platform_bus_enumerate device present 1
[21:59:51:944][ 217.165518] ======== Card detection to detect SDIO card! ========
[21:59:51:980][ 217.189770] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[21:59:51:980][ 217.203740] mmc1: tuning execution failed
[21:59:51:980][ 217.208045] F1 signature read @0x18000000=0xffffffff
[21:59:51:992][ 217.214545] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[21:59:52:005][ 217.228509] mmc1: tuning execution failed
[21:59:52:006][ 217.232743] dhdsdio_probe_attach: si_attach failed!
[21:59:52:019][ 217.237783] dhdsdio_probe: dhdsdio_probe_attach failed
[21:59:52:019][ 217.243301] bcmsdh_sdmmc: probe of mmc1:0001:2 failed with error -12
[22:00:04:017][ 229.240034] dhd_wifi_platform_load_sdio: sdio_register_driver timeout or error
[22:00:04:018][ 229.247723] wifi_platform_set_power = 0
[22:00:04:026][ 229.251738] ======== PULL WL_REG_ON(-1) LOW! ========
[22:00:04:026][ 229.257129] wifi_platform_bus_enumerate device present 0
[22:00:04:039][ 229.262645] ======== Card detection to remove SDIO card! ========
[22:00:04:039][ 229.269045] unregister wifi platform drivers
[22:00:04:049][ 229.273483] dhd_module_init: Failed to load the driver, try cnt 1
[22:00:04:049][ 229.279891] CFG80211-ERROR) wl_netlink_init : nl_sk is not ready
[22:00:04:061][ 229.286116] Power-up adapter 'DHD generic adapter'
[22:00:04:062][ 229.291445] wifi_platform_set_power = 1
[22:00:04:074][ 229.295414] ======== PULL WL_REG_ON(-1) HIGH! ========
[22:00:04:382][ 229.610035] wifi_platform_bus_enumerate device present 1
[22:00:04:394][ 229.615526] ======== Card detection to detect SDIO card! ========
[22:00:04:415][ 229.638681] F1 signature read @0x18000000=0x1541a9a6
[22:00:04:432][ 229.645165] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[22:00:04:433][ 229.659139] mmc1: tuning execution failed
[22:00:04:443][ 229.665444] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[22:00:04:457][ 229.679416] mmc1: tuning execution failed
[22:00:04:470][ 229.685805] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[22:00:04:472][ 229.699766] mmc1: tuning execution failed
[22:00:04:483][ 229.703986] dhdsdio_probe_attach: si_attach failed!
[22:00:04:484][ 229.709022] dhdsdio_probe: dhdsdio_probe_attach failed
[22:00:04:502][ 229.714503] bcmsdh_sdmmc: probe of mmc1:0001:2 failed with error -12
[22:00:16:495][ 241.720038] dhd_wifi_platform_load_sdio: sdio_register_driver timeout or error
[22:00:16:495][ 241.727722] wifi_platform_set_power = 0
[22:00:16:505][ 241.731735] ======== PULL WL_REG_ON(-1) LOW! ========
[22:00:16:506][ 241.737128] wifi_platform_bus_enumerate device present 0
[22:00:16:630][ 241.742644] ======== Card detection to remove SDIO card! ========
[22:00:16:630][ 241.749062] unregister wifi platform drivers
[22:00:16:630][ 241.753496] dhd_module_init: Failed to load the driver, try cnt 0
[22:00:16:630][ 241.759846] dhd_module_init: Failed to load driver max retry reached**
[22:00:16:630][ 241.766605] dhd_module_init out

0 Likes
1 Solution
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

如果还是board.c 的define,需要在board file中添加类似的定义:

static struct resource wifi_resource[] = {
[0] = {
.name = "bcmdhd_wlan_irq",
.start = MSM_GPIO_TO_INT(WLAN_HOSTWAKE),
.end = MSM_GPIO_TO_INT(WLAN_HOSTWAKE),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_SHAREABLE, 
,}}

View solution in original post

0 Likes
10 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

 这个是insmod的完整command 吗,我们需要对应的chip的nvram和firmware一起才可以bringup起来。

[21:59:26:710]# insmod bcmdhd.ko

0 Likes
lock attach
Attachments are accessible only for community members.

您好,感谢支持,加了参数也是一样,感觉加载的过程很奇怪,不往下执行也没有download 估计的日志,加载的过程reg_on也拉被控制拉高了,WL_HOST_WAKE硬件设计是接高电平。附件是日志,谢谢。

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

[21:56:17:950][ 3.171637] mmc1: new ultra high speed SDR104 SDIO card at address 0001

这个应该是3.0的speed,我看了spec,43438应该是支持2.0的,可以修改下看下是否可以。

0 Likes
lock attach
Attachments are accessible only for community members.

您好,改成sdio 2.0的目前驱动加载起来了 download nvram成功了,后面个崩溃的问题注册oob失败。帮忙再看看。

谢谢。

dhdsdio_download_nvram: nvram file: /nvram_20220502.txt
[11:04:13:307][ 40.822459] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[11:04:13:361][ 40.891608] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[11:04:13:361][ 40.897773] ------------[ cut here ]------------
[11:04:13:385][ 40.902569] WARNING: CPU: 0 PID: 969 at /home/x2000/sdk/kernel/kernel-4.4.94/kernel/irq/manage.c:1633 request_threaded_irq+0xd4/0x18c()
[11:04:13:385][ 40.915220] Modules linked in: cywdhd(+)
[11:04:13:386][ 40.919285] CPU: 0 PID: 969 Comm: insmod Not tainted 4.4.94 #2
[11:04:13:394][ 40.925303] Stack : 80997a2a 00000032 00000000 809a0000 00000000 00000000 80078d14 808ad867
[11:04:13:407] 807df7c0 00000000 000003c9 80994748 00000000 00000004 00000001 80078d08
[11:04:13:408] 00000001 80275b5c 00000001 00000000 807e5268 84df7984 84df796c 800aac94
[11:04:13:416] 8007c9a4 80038558 00000000 00000004 84df7984 00000002 80476344 841e0ef0
[11:04:13:431] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

  如果是OOB hardware interrupt的问题:

DHD Makefile

–Define the “OOB_INTR_ONLY” and the “HW_OOB”

–Un-define the “SDIO_ISR_THREAD”

nvram file

–Remove the software OOB related configurations

sd_oobonly

sd_gpout

sd_gpval

–Set the “muxenab” flag

–WL_HOST_WAKE: muxenab=0x10

0 Likes
lock attach
Attachments are accessible only for community members.

您好,按照你说的改了还是相同的问题,附件是nvram和fw,Makefile。现在不知道是驱动还是固件的问题。

谢谢。

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

   可以先用sdio  inband的中断模式来看下是否可以跑起来,然后确定只是OOB中断的问题,再来调试。

 

In-band Interrupt: In this mechanism, sdio interrupt is triggered through DAT1 line (normal SDIO interrupt raising mechanism).
Platforms based on this interrupt mechanism need to add SDIO_ISR_THREAD to DHDCFLAGS and remove OOB_INTR_ONLY and HW_OOB to DHDCFLAGS.

NVRAM中可以将muxenab去除。

 

0 Likes

您好,Makefile 改成这样是可以加载成功的,应该是oob的问题,开oob就会崩。

DHDCFLAGS += -DSDIO_ISR_THREAD

# DHDCFLAGS += -DOOB_INTR_ONLY -DHW_OOB

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

  如果使用DTS的话,需要添加这个配置:

 

DHDCFLAGS for DT or Device-Tree architecture:

1. Add “-DCONFIG_DTS” flag to DHDCFLAGS in bcmdhd/Makefile.
2. Modify DTS file accordingly for wlreg_on and Out-of band interrupt line.

For Ex: wlreg_on:

fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "wlreg_on";
gpio = <&gpio6 27 0>;
startup-delay-us = <600000>;
enable-active-high;
};

bcmdhd_wlan_0: bcmdhd_wlan@0 {
compatible = "android,bcmdhd_wlan";
gpios = <&gpio6 28 0>;
wlreg_on-supply = <&wlreg_on>;
};

代码中,这部分会读取中断源并注册到驱动中,修改中断触发方式的匹配也是在这边:

#ifdef CONFIG_DTS
wifi_regulator = regulator_get(&pdev->dev, "wlreg_on");
if (wifi_regulator == NULL) {
DHD_ERROR(("%s regulator is null\n", __FUNCTION__));
return -1;
}

/* This is to get the irq for the OOB */
gpio = of_get_gpio(pdev->dev.of_node, 0);

if (gpio < 0) {
DHD_ERROR(("%s gpio information is incorrect\n", __FUNCTION__));
return -1;
}
irq = gpio_to_irq(gpio);
if (irq < 0) {
DHD_ERROR(("%s irq information is incorrect\n", __FUNCTION__));
return -1;
}
adapter->irq_num = irq;

/* need to change the flags according to our requirement */
adapter->intr_flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL |
IORESOURCE_IRQ_SHAREABLE;
#endif /* CONFIG_DTS */

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

如果还是board.c 的define,需要在board file中添加类似的定义:

static struct resource wifi_resource[] = {
[0] = {
.name = "bcmdhd_wlan_irq",
.start = MSM_GPIO_TO_INT(WLAN_HOSTWAKE),
.end = MSM_GPIO_TO_INT(WLAN_HOSTWAKE),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_SHAREABLE, 
,}}

0 Likes