From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Vanessa Maegima <vanessa.maegima@nxp.com>,
"van.ayumi@gmail.com" <van.ayumi@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"embed3d@gmail.com" <embed3d@gmail.com>,
"joerg.krause@embedded.rocks" <joerg.krause@embedded.rocks>
Subject: Re: AP6335 with mainline kernel
Date: Fri, 17 Nov 2017 13:55:01 +0100 [thread overview]
Message-ID: <5A0EDC25.7030505@broadcom.com> (raw)
In-Reply-To: <1510916848.26896.2.camel@nxp.com>
On 11/17/2017 12:08 PM, Vanessa Maegima wrote:
> Hi Arend,
>
> On Sex, 2017-11-10 at 20:58 +0100, Arend van Spriel wrote:
>> On 10-11-17 13:43, Vanessa Maegima wrote:
>>>
>>> Hi,
>>>
>>> On Qui, 2017-09-21 at 12:30 -0300, Vanessa Ayumi Maegima wrote:
>>>>
>>>> Hi Arend,
>>>>
>>>> On Thu, Sep 21, 2017 at 4:26 AM, Arend van Spriel
>>>> <arend.vanspriel@broadcom.com> wrote:
>>>>>
>>>>>
>>>>> On 20-09-17 21:33, Vanessa Ayumi Maegima wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to enable Wifi on imx7d-pico using mainline
>>>>>> kernel.
>>>>>> imx7d-pico
>>>>>> has an AP6335 chip.
>>>>>>
>>>>>> I am facing some issues related to the nvram file. I am using
>>>>>> the
>>>>>> firmware
>>>>>> provided by Buildroot (brcmfmac4339-sdio.bin). I get the
>>>>>> following error:
>>>>>>
>>>>>> [ 8.630380] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>>>> (1000000):
>>>>>> clkctl 0x50
>>>>>>
>>>>>> I have tried to use the firmware and nvram provided by
>>>>>> TechNexion
>>>>>> but I
>>>>>> get
>>>>>> the same error.
>>>>>>
>>>>>> Is there anyone that could enable Wifi on AP6335 using kernel
>>>>>> mainline?
>>>>>> What nvram file was used?
>>>>>>
>>>>>> I am able to use Wifi on the board if I use the firmware,
>>>>>> nvram
>>>>>> file and
>>>>>> kernel
>>>>>> provided by TechNexion. They use a 4.1 kernel from NXP with
>>>>>> the
>>>>>> bcmdhd
>>>>>> driver.
>>>>>>
>>>>>> So I know that the hardware is functional.
>>>>>>
>>>>>> Any suggestions as how to get it working with a 4.13 and
>>>>>> brcmfmac
>>>>>> driver
>>>>>> is
>>>>>> appreciated.
>>>>> So the nvram file is specific to the wifi chipset on your
>>>>> platform
>>>>> so best
>>>>> to stick with the provided one. The "HT Avail timeout" most
>>>>> often
>>>>> is an
>>>>> indication that the firmware crashed. So getting more debug
>>>>> output
>>>>> would
>>>>> help us understand how it ended up like that. Can you build the
>>>>> brcmfmac
>>>>> with CONFIG_BRCMDBG and load the driver using:
>>>>>
>>>>> $ insmod brcmfmac.ko debug=0x1416
>>>> Thanks for the reply!
>>>>
>>>> Here is the log (using 4.14-rc1):
>>>>
>>>> # dmesg | grep brcmfmac
>>>> [ 19.297206] brcmfmac: brcmfmac_module_init No platform data
>>>> available.
>>>> [ 19.307075] brcmfmac: brcmf_sdio_probe Enter
>>>> [ 19.308384] brcmfmac: F1 signature read @0x18000000=0x16224335
>>>> [ 19.309026] brcmfmac: brcmf_chip_recognition found AXI chip:
>>>> BCM4339, rev=2
>>>> [ 19.317115] brcmfmac: brcmf_chip_cores_check [1 ] core
>>>> 0x800:46
>>>> base 0x18000000 wrap 0x18100000
>>>> [ 19.317141] brcmfmac: brcmf_chip_cores_check [2 ] core
>>>> 0x812:46
>>>> base 0x18001000 wrap 0x18101000
>>>> [ 19.317165] brcmfmac: brcmf_chip_cores_check [3 ] core
>>>> 0x83e:4
>>>> base 0x18002000 wrap 0x18102000
>>>> [ 19.317188] brcmfmac: brcmf_chip_cores_check [4 ] core
>>>> 0x83c:4
>>>> base 0x18003000 wrap 0x18103000
>>>> [ 19.317210] brcmfmac: brcmf_chip_cores_check [5 ] core
>>>> 0x81a:20
>>>> base 0x18004000 wrap 0x18104000
>>>> [ 19.317233] brcmfmac: brcmf_chip_cores_check [6 ] core
>>>> 0x829:21
>>>> base 0x18005000 wrap 0x18105000
>>>> [ 19.317256] brcmfmac: brcmf_chip_cores_check [7 ] core
>>>> 0x135:0
>>>> base 0x00000000 wrap 0x18109000
>>>> [ 19.317279] brcmfmac: brcmf_chip_cores_check [8 ] core
>>>> 0x240:0
>>>> base 0x00000000 wrap 0x00000000
>>>> [ 19.317298] brcmfmac: brcmf_chip_set_passive Enter
>>>> [ 19.322232] brcmfmac: brcmf_chip_get_raminfo RAM:
>>>> base=0x180000
>>>> size=786432 (0xc0000) sr=0 (0x0)
>>>> [ 19.322457] brcmfmac: brcmf_chip_setup ccrev=46, pmurev=23,
>>>> pmucaps=0x39cc5f17
>>>> [ 19.322481] brcmfmac: brcmf_get_module_param Enter, bus=0,
>>>> chip=17209, rev=2
>>>> [ 19.322504] brcmfmac: brcmf_sdiod_sgtable_alloc nents=35
>>>> [ 19.322531] brcmfmac: brcmf_sdio_kso_init Enter
>>>> [ 19.322618] brcmfmac: brcmf_sdio_drivestrengthinit No SDIO
>>>> driver
>>>> strength init needed for chip 43
>>>> 39 rev 2 pmurev 23
>>>> [ 19.323235] brcmfmac: brcmf_attach Enter
>>>> [ 19.323725] brcmfmac: brcmf_proto_attach Enter
>>>> [ 19.323769] brcmfmac: brcmf_fweh_register event handler
>>>> registered
>>>> for PSM_WATCHDOG
>>>> [ 19.324306] brcmfmac: brcmf_sdio_probe completed!!
>>>> [ 19.324337] brcmfmac: brcmf_fw_map_chip_to_name: using
>>>> brcm/brcmfmac4339-sdio.bin for chip 0x00433
>>>> 9(17209) rev 0x000002
>>>> [ 19.335353] brcmfmac: brcmf_fw_get_firmwares_pcie enter:
>>>> dev=mmc0:0001:1
>>>> [ 19.351787] brcmfmac: brcmf_fw_request_code_done enter:
>>>> dev=mmc0:0001:1
>>>> [ 19.353202] brcmfmac: brcmf_fw_request_nvram_done enter:
>>>> dev=mmc0:0001:1
>>>> [ 19.353424] brcmfmac: brcmf_sdio_firmware_callback Enter:
>>>> dev=mmc0:0001:1, err=0
>>>> [ 19.353814] brcmfmac: brcmf_sdio_download_code_file Enter
>>>> [ 19.388586] brcmfmac: brcmf_sdio_verifymemory Compare RAM dl &
>>>> ul
>>>> at 0x00180000; size=493599
>>>> [ 19.546675] brcmfmac: brcmf_sdio_download_nvram Enter
>>>> [ 19.547432] brcmfmac: brcmf_sdio_verifymemory Compare RAM dl &
>>>> ul
>>>> at 0x0023f730; size=2256
>>>> [ 19.548665] brcmfmac: brcmf_chip_set_active Enter
>>>> [ 20.562974] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>> (1000000):
>>>> clkctl 0x50
>>>> [ 20.570490] brcmfmac: brcmf_sdio_firmware_callback failed:
>>>> dev=mmc0:0001:1, err=0
>>>> [ 20.570739] brcmfmac: brcmf_sdio_remove Enter
>>>> [ 20.570775] brcmfmac: brcmf_detach Enter
>>>> [ 20.610414] brcmfmac: brcmf_bus_change_state 0 -> 0
>>>> [ 20.610441] brcmfmac: brcmf_sdio_bus_stop Enter
>>>> [ 21.622477] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>> (1000000):
>>>> clkctl 0x50
>>>> [ 21.630912] brcmfmac: brcmf_proto_detach Enter
>>>> [ 21.630967] brcmfmac: brcmf_fweh_unregister event handler
>>>> cleared
>>>> for PSM_WATCHDOG
>>>> [ 22.642457] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>> (1000000):
>>>> clkctl 0x50
>>>> [ 22.680131] brcmfmac: brcmf_chip_set_passive Enter
>>>> [ 22.682580] brcmfmac: brcmf_sdio_remove Disconnected
>>>>
>>> Any suggestions on this?
>> Sorry for not getting back to your earlier email. Thanks for the
>> reminder. So you tried different firmwares, right? Can you provide
>> output of the following command:
>>
>> $ strings firmware.bin | tail -1
>>
>> for the firmwares you tried.
>>
>> Regards,
>> Arend
>
> Thanks for the reply!
>
> Here's the output:
>
> For Technexion firmware:
>
> # strings /lib/firmware/brcm/brcmfmac4339-sdio.bin | tail -1
> 4339a0-roml/sdio-ag-pool-p2p-pno-pktfilter-keepalive-aoe-sr-mchan-
> proptxstatus-lpc-tdls-autoabn-txbf-
> rcc-wepso-okc-ndoe Version: 6.37.32.28 CRC: 3075f12e Date: Thu 2014-04-
> 03 12:15:31 CST FWID 01-4ae4ad
> 03
>
> For linux-firmware and Buildroot firmware:
>
> # strings /lib/firmware/brcm/brcmfmac4339-sdio.bin | tail -1
> 4339a0-roml/sdio-ag-pool-autoabn-lpc Version: 6.37.34.28 CRC: a696897b
> Date: Thu 2014-08-28 18:40:12
> PDT FWID 01-a13120fc
>
> In both cases, I am using the nvram provided by Technexion.
That should be fine.
Can you try the patch below. It would give me more info on state of
firmware.
Regards,
Arend
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
b/drivers/ne
index f355612..631c5cb 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -828,8 +828,27 @@ static int brcmf_sdio_htclk(struct brcmf_sdio *bus,
bool on,
return -EBADE;
}
if (!SBSDIO_CLKAV(clkctl, bus->alp_only)) {
+ struct brcmf_core *pmu =
brcmf_chip_get_pmu(bus->ci);
+ u32 regaddr;
+ u32 val;
+
brcmf_err("HT Avail timeout (%d): clkctl 0x%02x\n",
PMU_MAX_TRANSITION_DLY, clkctl);
+
+ /* DEBUG INFO */
+ regaddr = CORE_CC_REG(pmu->base, pmucontrol);
+ val = brcmf_sdiod_regrl(bus->sdiodev, regaddr,
&err);
+ brcmf_err(" pmucontrol = %08x\n", val);
+ regaddr = CORE_CC_REG(pmu->base, pmustatus);
+ val = brcmf_sdiod_regrl(bus->sdiodev, regaddr,
&err);
+ brcmf_err(" pmustatus = %08x\n", val);
+ regaddr = CORE_CC_REG(pmu->base, min_res_mask);
+ val = brcmf_sdiod_regrl(bus->sdiodev, regaddr,
&err);
+ brcmf_err(" min_res_mask = %08x\n", val);
+ regaddr = CORE_CC_REG(pmu->base, max_res_mask);
+ val = brcmf_sdiod_regrl(bus->sdiodev, regaddr,
&err);
+ brcmf_err(" max_res_mask = %08x\n", val);
+
return -EBADE;
}
next prev parent reply other threads:[~2017-11-17 12:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 19:33 AP6335 with mainline kernel Vanessa Ayumi Maegima
2017-09-21 7:26 ` Arend van Spriel
2017-09-21 15:30 ` Vanessa Ayumi Maegima
2017-10-17 12:07 ` Vanessa Maegima
2017-11-10 12:43 ` Vanessa Maegima
2017-11-10 19:58 ` Arend van Spriel
2017-11-17 11:08 ` Vanessa Maegima
2017-11-17 12:55 ` Arend van Spriel [this message]
2017-11-17 15:24 ` Vanessa Maegima
2017-11-20 11:03 ` Arend van Spriel
2017-11-20 11:12 ` Arend van Spriel
2017-11-22 10:48 ` Vanessa Maegima
2017-11-22 10:58 ` Arend van Spriel
2017-11-23 15:24 ` Vanessa Maegima
2017-11-30 12:31 ` Arend van Spriel
2017-12-04 19:00 ` Vanessa Maegima
2017-12-05 9:06 ` Arend Van Spriel
2017-12-05 14:58 ` Vanessa Maegima
2018-01-15 20:08 ` Fabio Estevam
2018-01-16 20:21 ` Arend van Spriel
2018-01-18 11:47 ` Vanessa Maegima
2018-01-19 9:02 ` Arend van Spriel
2018-03-21 15:38 ` Vanessa Maegima
2018-03-23 9:28 ` Arend van Spriel
2018-03-23 13:15 ` Vanessa Maegima
2018-03-26 12:25 ` Vanessa Maegima
2018-03-26 13:34 ` Vanessa Maegima
2018-11-14 11:40 ` Arend van Spriel
2018-11-15 17:04 ` Vanessa Ayumi Maegima
[not found] ` <CAHWfWzm8Zwjc2tBQWVqpaa-cMYyEPWmUKYN7rspyb9W9spx2iQ@mail.gmail.com>
2018-11-17 19:10 ` Fabio Estevam
2018-11-28 15:59 ` Fabio Estevam
[not found] ` <CAF7Mx6p1DpRieCKy_1qOE5YT4_76UO8vhLMBFUD2B0FrQ9BJGw@mail.gmail.com>
2018-11-28 16:23 ` Fabio Estevam
2018-11-28 18:08 ` Fabio Estevam
2018-11-28 20:13 ` Arend van Spriel
2018-11-29 0:12 ` Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5A0EDC25.7030505@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=embed3d@gmail.com \
--cc=joerg.krause@embedded.rocks \
--cc=linux-wireless@vger.kernel.org \
--cc=van.ayumi@gmail.com \
--cc=vanessa.maegima@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).