TI中文支持网
TI专业的中文技术问题搜集分享网站

BeagleBone SDIO WIFI pinmux問題

我在BeaglebBone Black( SDK-PROCESSOR2.00.02.11版本 )上使用RTL8723BS的WIFI模塊,ifconfig -a发现没有wlan0设备,ifconfig wlan0 up回應No Such Deivce,我有額外安裝廠商給的rtl8723bs-master Drvier,開機也有init進去,目前感覺是SDIO pin mux有出錯,我是用的是mmc2(軟體為mmc3),以下為我修改的兩個dts,能幫我看看是否哪裡設定錯了嗎? 感謝。

 am335x-bone-common.dtsi檔案有新增的程式碼 :

&am33xx_pinmux {

mmc3_pins: pinmux_mmc3_pins {
               pinctrl-single,pins = <
                       0x44 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a1.mmc2_dat0, INPUT_PULLUP | MODE3 */
                       0x48 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a2.mmc2_dat1, INPUT_PULLUP | MODE3 */
                       0x4C (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a3.mmc2_dat2, INPUT_PULLUP | MODE3 */
                       0x78 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_ben1.mmc2_dat3, INPUT_PULLUP | MODE3 */
                       0x88 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_csn3.mmc2_cmd, INPUT_PULLUP | MODE3 */
                       0x8C (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_clk.mmc2_clk, INPUT_PULLUP | MODE3 */
               >;
       };

am335x-boneblack.dts 檔案:

{

wlan_en_reg: fixedregulator@2 {
        compatible = "regulator-fixed";
        regulator-name = "wlan-en-regulator";
        regulator-min-microvolt = <3000000>;
        regulator-max-microvolt = <3000000>;
        startup-delay-us = <70000>;
        enable-active-high;   };

};

&mmc3 {
dmas = <&edma_xbar 12 0 1
&edma_xbar 13 0 2>;
dma-names = "tx","rx";
status = "okay";
vmmc-supply = <&wlan_en_reg>;
bus-width = <4>;
pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins>;
ti,non-removable;
ti,needs-special-hs-handling;
cap-power-off-card;
keep-power-in-suspend;
#address-cells = <1>;
#size-cells = <0>;

};

補充 :
關於mmc的訊息

root@am335x-evm:~# dmesg | grep -i mmc[ 1.174537] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[ 1.174553] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.174579] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' – status (0)
[ 1.174653] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 1.179296] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[ 1.179303] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.179313] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
[ 1.179321] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
[ 1.179329] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[ 1.179338] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
[ 1.213443] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer cd
[ 1.213463] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[ 1.213475] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@481d8000[0]'
[ 1.213484] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@481d8000[0]'
[ 1.213492] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[ 1.213500] omap_hsmmc 481d8000.mmc: lookup for GPIO cd failed
[ 1.213590] omap_hsmmc 481d8000.mmc: GPIO lookup for consumer wp
[ 1.213598] omap_hsmmc 481d8000.mmc: using device tree for GPIO lookup
[ 1.213606] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@481d8000[0]'
[ 1.213614] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@481d8000[0]'
[ 1.213622] omap_hsmmc 481d8000.mmc: using lookup tables for GPIO lookup
[ 1.213629] omap_hsmmc 481d8000.mmc: lookup for GPIO wp failed
[ 1.250040] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.258396] omap_hsmmc 47810000.mmc: GPIO lookup for consumer cd
[ 1.258409] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
[ 1.258421] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@47810000[0]'
[ 1.258430] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@47810000[0]'
[ 1.258437] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
[ 1.258446] omap_hsmmc 47810000.mmc: lookup for GPIO cd failed
[ 1.258456] omap_hsmmc 47810000.mmc: GPIO lookup for consumer wp
[ 1.258463] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
[ 1.258471] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@47810000[0]'
[ 1.258479] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@47810000[0]'
[ 1.258486] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
[ 1.258494] omap_hsmmc 47810000.mmc: lookup for GPIO wp failed
[ 1.260980] mmc0: new high speed SDHC card at address 59b4
[ 1.267116] mmcblk0: mmc0:59b4 USD 7.36 GiB[ 1.273315] mmcblk0: p1 p2
[ 1.332862] mmc1: MAN_BKOPS_EN bit is not set
[ 1.384321] mmc1: new high speed MMC card at address 0001
[ 1.390303] mmcblk1: mmc1:0001 S10004 3.56 GiB[ 1.395553] mmcblk1boot0: mmc1:0001 S10004 partition 1 4.00 MiB
[ 1.402068] mmcblk1boot1: mmc1:0001 S10004 partition 2 4.00 MiB
[ 1.409885] mmcblk1: p1
[ 1.782804] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 4.146961] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 10.764207] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 11.143351] EXT4-fs (mmcblk1p1): recovery complete
[ 11.148205] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)

Denny%20Yang99373:

建议把相关PINMUX寄存器打印出来,有助于定位原因

Jian Zhou:

回复 Denny%20Yang99373:

Probe()函数有执行了么?

wen ting:

回复 Jian Zhou:

能請問什麼是Probe()函數嗎? 似乎沒有执行到類似的函數,我應該到哪裡去設定嗎?感謝。補充 : 這是我有關於 wlan 的訊息

root@am335x-evm:~# dmesg | grep -i wlan[ 0.286892] reg-fixed-voltage fixedregulator@2: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_wlan_pins_default, deferring probe[ 1.358128] pinctrl-single 44e10800.pinmux: could not request pin 100 (44e10990.0) from group pinmux_wlan_pins_default on device pinctrl-single[ 1.700279] wlan-en-regulator: disabling

wen ting:

回复 Denny%20Yang99373:

PINMUX寄存器是這個嗎?

root@am335x-evm:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins

registered pins: 142pin 0 (44e10800.0) 00000031 pinctrl-single pin 1 (44e10804.0) 00000031 pinctrl-single pin 2 (44e10808.0) 00000031 pinctrl-single pin 3 (44e1080c.0) 00000031 pinctrl-single pin 4 (44e10810.0) 00000031 pinctrl-single pin 5 (44e10814.0) 00000031 pinctrl-single pin 6 (44e10818.0) 00000031 pinctrl-single pin 7 (44e1081c.0) 00000031 pinctrl-single pin 8 (44e10820.0) 00000027 pinctrl-single pin 9 (44e10824.0) 00000027 pinctrl-single pin 10 (44e10828.0) 00000027 pinctrl-single pin 11 (44e1082c.0) 00000027 pinctrl-single pin 12 (44e10830.0) 00000027 pinctrl-single pin 13 (44e10834.0) 00000027 pinctrl-single pin 14 (44e10838.0) 00000027 pinctrl-single pin 15 (44e1083c.0) 00000027 pinctrl-single pin 16 (44e10840.0) 00000027 pinctrl-single pin 17 (44e10844.0) 0000002b pinctrl-single pin 18 (44e10848.0) 0000002b pinctrl-single pin 19 (44e1084c.0) 0000002b pinctrl-single pin 20 (44e10850.0) 00000027 pinctrl-single pin 21 (44e10854.0) 00000007 pinctrl-single pin 22 (44e10858.0) 00000017 pinctrl-single pin 23 (44e1085c.0) 00000007 pinctrl-single pin 24 (44e10860.0) 00000017 pinctrl-single pin 25 (44e10864.0) 00000027 pinctrl-single pin 26 (44e10868.0) 00000027 pinctrl-single pin 27 (44e1086c.0) 00000007 pinctrl-single pin 28 (44e10870.0) 00000037 pinctrl-single pin 29 (44e10874.0) 00000037 pinctrl-single pin 30 (44e10878.0) 0000002b pinctrl-single pin 31 (44e1087c.0) 00000037 pinctrl-single pin 32 (44e10880.0) 00000032 pinctrl-single pin 33 (44e10884.0) 00000032 pinctrl-single pin 34 (44e10888.0) 0000000b pinctrl-single pin 35 (44e1088c.0) 0000002b pinctrl-single pin 36 (44e10890.0) 00000037 pinctrl-single pin 37 (44e10894.0) 00000037 pinctrl-single pin 38 (44e10898.0) 00000037 pinctrl-single pin 39 (44e1089c.0) 00000037 pinctrl-single pin 40 (44e108a0.0) 00000008 pinctrl-single pin 41 (44e108a4.0) 00000008 pinctrl-single pin 42 (44e108a8.0) 00000008 pinctrl-single pin 43 (44e108ac.0) 00000008 pinctrl-single pin 44 (44e108b0.0) 00000008 pinctrl-single pin 45 (44e108b4.0) 00000008 pinctrl-single pin 46 (44e108b8.0) 00000008 pinctrl-single pin 47 (44e108bc.0) 00000008 pinctrl-single pin 48 (44e108c0.0) 00000008 pinctrl-single pin 49 (44e108c4.0) 00000008 pinctrl-single pin 50 (44e108c8.0) 00000008 pinctrl-single pin 51 (44e108cc.0) 00000008 pinctrl-single pin 52 (44e108d0.0) 00000008 pinctrl-single pin 53 (44e108d4.0) 00000008 pinctrl-single pin 54 (44e108d8.0) 00000008 pinctrl-single pin 55 (44e108dc.0) 00000008 pinctrl-single pin 56 (44e108e0.0) 00000000 pinctrl-single pin 57 (44e108e4.0) 00000000 pinctrl-single pin 58 (44e108e8.0) 00000000 pinctrl-single pin 59 (44e108ec.0) 00000000 pinctrl-single pin 60 (44e108f0.0) 00000030 pinctrl-single pin 61 (44e108f4.0) 00000030 pinctrl-single pin 62 (44e108f8.0) 00000030 pinctrl-single pin 63 (44e108fc.0) 00000030 pinctrl-single pin 64 (44e10900.0) 00000030 pinctrl-single pin 65 (44e10904.0) 00000030 pinctrl-single pin 66 (44e10908.0) 00000027 pinctrl-single pin 67 (44e1090c.0) 00000027 pinctrl-single pin 68 (44e10910.0) 00000030 pinctrl-single pin 69 (44e10914.0) 00000000 pinctrl-single pin 70 (44e10918.0) 00000030 pinctrl-single pin 71 (44e1091c.0) 00000000 pinctrl-single pin 72 (44e10920.0) 00000000 pinctrl-single pin 73 (44e10924.0) 00000000 pinctrl-single pin 74 (44e10928.0) 00000000 pinctrl-single pin 75 (44e1092c.0) 00000030 pinctrl-single pin 76 (44e10930.0) 00000030 pinctrl-single pin 77 (44e10934.0) 00000030 pinctrl-single pin 78 (44e10938.0) 00000030 pinctrl-single pin 79 (44e1093c.0) 00000030 pinctrl-single pin 80 (44e10940.0) 00000030 pinctrl-single pin 81 (44e10944.0) 00000027 pinctrl-single pin 82 (44e10948.0) 00000030 pinctrl-single pin 83 (44e1094c.0) 00000010 pinctrl-single pin 84 (44e10950.0) 00000020 pinctrl-single pin 85 (44e10954.0) 00000020 pinctrl-single pin 86 (44e10958.0) 00000030 pinctrl-single pin 87 (44e1095c.0) 00000030 pinctrl-single pin 88 (44e10960.0) 0000002f pinctrl-single pin 89 (44e10964.0) 00000027 pinctrl-single pin 90 (44e10968.0) 00000037 pinctrl-single pin 91 (44e1096c.0) 00000037 pinctrl-single pin 92 (44e10970.0) 00000030 pinctrl-single pin 93 (44e10974.0) 00000000 pinctrl-single pin 94 (44e10978.0) 00000033 pinctrl-single pin 95 (44e1097c.0) 00000033 pinctrl-single pin 96 (44e10980.0) 00000037 pinctrl-single pin 97 (44e10984.0) 00000037 pinctrl-single pin 98 (44e10988.0) 00000030 pinctrl-single pin 99 (44e1098c.0) 00000030 pinctrl-single pin 100 (44e10990.0) 00000000 pinctrl-single pin 101 (44e10994.0) 00000010 pinctrl-single pin 102 (44e10998.0) 00000027 pinctrl-single pin 103 (44e1099c.0) 00000002 pinctrl-single pin 104 (44e109a0.0) 00000024 pinctrl-single pin 105 (44e109a4.0) 00000027 pinctrl-single pin 106 (44e109a8.0) 00000027 pinctrl-single pin 107 (44e109ac.0) 00000030 pinctrl-single pin 108 (44e109b0.0) 00000003 pinctrl-single pin 109 (44e109b4.0) 00000003 pinctrl-single pin 110 (44e109b8.0) 00000030 pinctrl-single pin 111 (44e109bc.0) 00000028 pinctrl-single pin 112 (44e109c0.0) 00000030 pinctrl-single pin 113 (44e109c4.0) 00000028 pinctrl-single pin 114 (44e109c8.0) 00000028 pinctrl-single pin 115 (44e109cc.0) 00000028 pinctrl-single pin 116 (44e109d0.0) 00000030 pinctrl-single pin 117 (44e109d4.0) 00000030 pinctrl-single pin 118 (44e109d8.0) 00000030 pinctrl-single pin 119 (44e109dc.0) 00000030 pinctrl-single pin 120 (44e109e0.0) 00000020 pinctrl-single pin 121 (44e109e4.0) 00000030 pinctrl-single pin 122 (44e109e8.0) 00000030 pinctrl-single pin 123 (44e109ec.0) 00000028 pinctrl-single pin 124 (44e109f0.0) 00000028 pinctrl-single pin 125 (44e109f4.0) 00000028 pinctrl-single pin 126 (44e109f8.0) 00000030 pinctrl-single pin 127 (44e109fc.0) 00000028 pinctrl-single pin 128 (44e10a00.0) 00000028 pinctrl-single pin 129 (44e10a04.0) 00000020 pinctrl-single pin 130 (44e10a08.0) 00000028 pinctrl-single pin 131 (44e10a0c.0) 00000028 pinctrl-single pin 132 (44e10a10.0) 00000028 pinctrl-single pin 133 (44e10a14.0) 00000028 pinctrl-single pin 134 (44e10a18.0) 00000028 pinctrl-single pin 135 (44e10a1c.0) 00000020 pinctrl-single pin 136 (44e10a20.0) 00000028 pinctrl-single pin 137 (44e10a24.0) 00000028 pinctrl-single pin 138 (44e10a28.0) 00000028 pinctrl-single pin 139 (44e10a2c.0) 00000028 pinctrl-single pin 140 (44e10a30.0) 00000028 pinctrl-single pin 141 (44e10a34.0) 00000020 pinctrl-single

yongqing wang:

回复 wen ting:

Probe()就是探针函数

yongqing wang:

回复 wen ting:

在驱动程序注册的时候,会有一个match的过程,将驱动和设备两个匹配。在匹配的过程中会调用probe()

wen ting:

回复 yongqing wang:

請問Probe()函數通常在哪裡呢 ?我該如何修改Probe()函數 ?是類似下面這種檔案嗎? :

路徑 :

 ../drivers/net/wireless/rtl8723bs-master/os_dep/sdio_intf.c  

部分內容:

static const struct sdio_device_id sdio_ids[] ={  #ifdef CONFIG_RTL8723BS  { SDIO_DEVICE(0x024c, 0xB723) },  #endif  { SDIO_DEVICE_CLASS(SDIO_CLASS_WLAN) },  { /* end: all zeroes */ },};

static int rtw_drv_init(struct sdio_func *func, const struct sdio_device_id *id);

static struct sdio_drv_priv sdio_drvpriv = {  .r871xs_drv.probe = rtw_drv_init,  .r871xs_drv.remove = rtw_dev_remove,  .r871xs_drv.name = "rtl8723bs",  .r871xs_drv.id_table = sdio_ids,  .r871xs_drv.drv = {  .pm = &rtw_sdio_pm_ops,  }};

static int rtw_drv_init( struct sdio_func *func, const struct sdio_device_id *id){ int status = _FAIL; struct adapter *if1 = NULL, *if2 = NULL; struct dvobj_priv *dvobj;

switch (func->vendor) { case 0x024c: switch (func->device) { case 0x0523: case 0x0623: case 0x0626: case 0xb723: break; default: pr_info("RTL8723BS: Found unrecognized device 0x%x for vendor 0x%x\n", func->device, func->vendor); goto exit; } break; default: pr_info("RTL8723BS: Found unrecognized vendor 0x%x, device 0x%x\n", func->vendor, func->device); goto exit; } if ((dvobj = sdio_dvobj_init(func)) == NULL) { RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("initialize device object priv Failed!\n")); goto exit; }

if ((if1 = rtw_sdio_if1_init(dvobj, id)) == NULL) { DBG_871X("rtw_init_primarystruct adapter Failed!\n"); goto free_dvobj; }

/* dev_alloc_name && register_netdev */ if ((status = rtw_drv_register_netdev(if1)) != _SUCCESS) { goto free_if2; }

if (sdio_alloc_irq(dvobj) != _SUCCESS) goto free_if2;

#ifdef CONFIG_GPIO_WAKEUP gpio_hostwakeup_alloc_irq(if1);#endif

RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-871x_drv – drv_init, success!\n"));

rtw_ndev_notifier_register(); status = _SUCCESS;

free_if2: if (status != _SUCCESS && if2) { } if (status != _SUCCESS && if1) { rtw_sdio_if1_deinit(if1); }free_dvobj: if (status != _SUCCESS) sdio_dvobj_deinit(func);exit: return status == _SUCCESS?0:-ENODEV;}

user4923790:

回复 Jian Zhou:

你好,我遇到了同样的问题,我使用的是wl1835,下面是设备树配置,现象为wl1271_probe无法执行,似乎驱动没匹配上设备,请问该如何处理?


yongqing wang:

回复 user4923790:

使用是自己的驱动吗

wen ting:

回复 user4923790:

你的環境是使用Ti-SDK嗎? 你上驅動的詳細步驟與過程?
基本上步驟就是改SDIO的Device tree,然後上正確的WiFi驅動就可以了,需要特別注意的是kernel menuconfig下面三個選項有沒有記得on :
[*] cfg80211 – wireless configuration API
[*] cfg80211 wireless extensions compatibility
[*] Generic IEEE 802.11 Networking Stack (mac80211)

你是使用BBB wireless板子嗎或是分別獨立的BBB+wl1835 evm?
如果是後者,BBB+wl1835,記得走線不要過長,小於10cm,以免影響SDIO訊號。

赞(0)
未经允许不得转载:TI中文支持网 » BeagleBone SDIO WIFI pinmux問題
分享到: 更多 (0)