Ubuntu 无法检测到 wifi/bt 组合卡 BCM4330 (AP6383)

Ubuntu 无法检测到 wifi/bt 组合卡 BCM4330 (AP6383)

我正在使用 Zotac pi320。在 Windows 8.1 中,内置 (sdio) wifi 卡被检测到并在详细的设备设置中显示为 broadcom 4330。二次研究证实了这一点,拆解显示芯片为 AP6383,它也对应于 BCM 4330。

在全新安装的 ubuntu 14.10 中,没有添加或删除任何其他内容,根本无法识别此设备。我仔细检查了所有输出,lspci -v但什么都没有,也没有在其他地方找到任何东西,例如网络管理器。我确实确认了 /lib/firmware/brcm/ 中存在 *.fw 和 *.bin 文件,并且存在预期的 4330 和 43xx 文件。iwconfig也没有显示此设备。我重新运行,hw-detect但没有结果。

答案1

Promethean,我尝试了大约两周,并得到了 Broadcom 和 Intel 黑客的帮助,才让它工作起来。更详细的描述位于博客文章,但要点如下:

ACPI 当前已损坏,因此 WiFi 已关闭。通过发出以下命令进行确认

# cat /sys/bus/acpi/devices/INT33BB\:00/power_state
D3cold

因此使用

# echo on > /sys/bus/platform/devices/INT33BB\:00/power/control 

这就是全部了!:) 如果你需要固件,请将 brcmfmac4330-sdio.bin 从 linux-firmware 复制到

/lib/firmware/brcm/brcmfmac4330-sdio.bin

然后从 Windows 驱动程序中获取 NVRAM 文件并将其复制到

/lib/firmware/brcm/brcmfmac4330-sdio.txt

我的样子是这样的:

#Sample variables file for BCM94330 SD FC AGB board T77H360.04_EVT5_20120731
manfid=0x2d0
prodid=0x0547
vendid=0x14e4
devid=0x4360
boardtype=0x05e1
boardrev=0x1202
boardflags=0x10080a00
nocrc=1
xtalfreq=26000
boardnum=22
macaddr=00:90:4c:c5:12:38
ag0=0x40
ag1=0xBF
aa2g=1
aa5g=1
ccode=all
pa0itssit=0x20
pa0b0=4924
pa0b1=-595
pa0b2=-157
rssismf2g=0xa
rssismc2g=0x3
rssisav2g=0x7
#rssi params for 5GHz
rssismf5g=0x4
rssismc5g=0x3
rssisav5g=0x7
#PA parameters for lower a-band
pa1lob0=5050
pa1lob1=-630
pa1lob2=-195
#PA parameters for midband
pa1b0=4880
pa1b1=-625
pa1b2=-200
#PA parameters for high band
pa1hib0=4880
pa1hib1=-620
pa1hib2=-190
rxpo5g=0
maxp2ga0=0x44
maxp5ga0=0x3A
maxp5gla0=0x3A
maxp5gha0=0x3A
# 2.4G Tx Power offsets
ofdm2gpo=0x22222222
mcs2gpo0=0x4444
mcs2gpo1=0x4444
# 5G Tx Power offsets
ofdm5gpo=0x00000000
ofdm5glpo=0x00000000
ofdm5ghpo=0x00000000
mcs5gpo0=0x2222
mcs5gpo1=0x2222
mcs5glpo0=0x2222
mcs5glpo1=0x2222
mcs5ghpo0=0x2222
mcs5ghpo1=0x2222
sromrev=3
il0macaddr=00:90:4c:c5:12:38
wl0id=0x431b
cckPwrOffset=6
triso2g=3
#swctrlmap_2g=0x44844484,0x42824282,0x42824282,0x18282,0x1ff
swctrlmap_2g=0x04040404,0x02020202,0x02020202,0x18282,0x1ff
triso5g=6
swctrlmap_5g=0x10101010,0x28282020,0x20202020,0x10202,0x0f8
noise_cal_ref_2g=53
rfreg033=0x19
rfreg033_cck=0x1f
dacrate2g=160
dacrate5g=160
txalpfbyp2g=1
bphyscale=17
cckPwrIdxCorr=-15
pacalpwr5glo=13
pacalpwr5glo1=11
pacalpwr5g=13
pacalpwr5g1=11
pacalpwr5ghi=13
pacalpwr5ghi1=11
#pacalpwr2g1=13
#pacalath2g=180
#pacalidx2g1=55
pacalpwr2g=13
txgaintbl=1
rfreg088=15
cckdigfilttype=20
noise_cal_adj_2g=-3
#wake on wireless LAN
sd_gpout=0
sd_gpval=1
sd_gpdc=0

我让 STA 和 AP 都工作了。

电源按钮是 ACPI 问题。英特尔的 Mika Westerberg 针对 3.19 制作了一个补丁:

From 3404c6f2422c9e8d3f51a8832fbce01483c423d9 Mon Sep 17 00:00:00 2001
From: Mika Westerberg <mika.westerberg@...>
Date: Wed, 11 Feb 2015 17:21:18 +0200
Subject: [PATCH] pinctrl: baytrail: Relax GPIO request rules for certain pin

On Baytrail-T based machines the power button is part of GPIO keys like
button array (and implemented as a GPIO). However, Zotac ZBOX BIOS fails to
configure the pin properly which prevents the driver to request it.
Following is printed on the console:

  byt_gpio INT33FC:02: pin 16 cannot be used as GPIO.

Fix this by relaxing GPIO request rules for this particular pin.

Reported-by: Benjamin Adler <benadler@...>
Signed-off-by: Mika Westerberg <mika.westerberg@...>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 40 +++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 9 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 5afe03e28b91..44a7fef8a0f8 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -158,17 +158,29 @@ static void __iomem *byt_gpio_reg(struct gpio_chip *chip, unsigned offset,
    return vg->reg_base + reg_offset + reg;
 }

-static bool is_special_pin(struct byt_gpio *vg, unsigned offset)
+static unsigned get_gpio_mux(struct byt_gpio *vg, unsigned offset)
 {
    /* SCORE pin 92-93 */
    if (!strcmp(vg->range->name, BYT_SCORE_ACPI_UID) &&
    offset >= 92 && offset <= 93)
-       return true;
+       return 1;

    /* SUS pin 11-21 */
    if (!strcmp(vg->range->name, BYT_SUS_ACPI_UID) &&
    offset >= 11 && offset <= 21)
-       return true;
+       return 1;
+
+   return 0;
+}
+
+static bool can_mux_as_gpio(struct byt_gpio *vg, unsigned offset)
+{
+   if (!strcmp(vg->range->name, BYT_SUS_ACPI_UID)) {
+       switch (offset) {
+       case 16: /* Power button on BYT-T machines */
+           return true;
+       }
+   }

    return false;
 }
@@ -177,8 +189,10 @@ static int byt_gpio_request(struct gpio_chip *chip, unsigned offset)
 {
    struct byt_gpio *vg = to_byt_gpio(chip);
    void __iomem *reg = byt_gpio_reg(chip, offset, BYT_CONF0_REG);
+   unsigned long flags;
    u32 value;
-   bool special;
+
+   spin_lock_irqsave(&vg->lock, flags);

    /*
     * In most cases, func pin mux 000 means GPIO function.
@@ -187,13 +201,21 @@ static int byt_gpio_request(struct gpio_chip *chip, unsigned offset)
     * func pin mux preset as GPIO function by BIOS/FW.
     */
    value = readl(reg) & BYT_PIN_MUX;
-   special = is_special_pin(vg, offset);
-   if ((special && value != 1) || (!special && value)) {
-       dev_err(&vg->pdev->dev,
-           "pin %u cannot be used as GPIO.\n", offset);
-       return -EINVAL;
+   if (value != get_gpio_mux(vg, offset)) {
+       /* Some misconfigured pins can still be muxed as GPIOs */
+       if (can_mux_as_gpio(vg, offset)) {
+           value = readl(reg);
+           value |= 1;
+           writel(value, reg);
+       } else {
+           dev_err(&vg->pdev->dev,
+               "pin %u cannot be used as GPIO.\n", offset);
+           spin_unlock_irqrestore(&vg->lock, flags);
+           return -EINVAL;
+       }
    }

+   spin_unlock_irqrestore(&vg->lock, flags);
    pm_runtime_get(&vg->pdev->dev);

    return 0;

这样电源按钮就可以正常工作了。Mika 说这个补丁会进入主线,但不想确认 3.20,因为这需要做更多的工作。

相关内容