diff mbox

AP6335 with mainline kernel

Message ID e14bdc26-5092-18c9-4caa-c45fd1d12984@broadcom.com (mailing list archive)
State RFC
Delegated to: Kalle Valo
Headers show

Commit Message

Arend van Spriel Nov. 20, 2017, 11:12 a.m. UTC
On 20-11-17 12:03, Arend van Spriel wrote:
> On 17-11-17 16:24, Vanessa Maegima wrote:
>> Hi Arend,
>>
>> On Sex, 2017-11-17 at 13:55 +0100, Arend van Spriel wrote:
>>> 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;
>>>                   }
>>>
>>>
>>
>> Here's the output for both firmwares:
>>
>> Technexion:
>> # dmesg | grep brcmfmac
>> [    5.307067] brcmfmac: brcmf_fw_map_chip_to_name: using
>> brcm/brcmfmac4339-sdio.bin for chip 0x00433
>> 9(17209) rev 0x000002
>> [    6.400792] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
>> clkctl 0x50
>> [    6.408444] brcmfmac: brcmf_sdio_htclk:   pmucontrol   = 01774381
>> [    6.415595] brcmfmac: brcmf_sdio_htclk:   pmustatus    = 0000002a
>> [    6.421915] brcmfmac: brcmf_sdio_htclk:   min_res_mask = 0fcaff77
>> [    6.428124] brcmfmac: brcmf_sdio_htclk:   max_res_mask = 0fceff77
>> [    7.482668] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
>> clkctl 0x50
>> [    7.490214] brcmfmac: brcmf_sdio_htclk:   pmucontrol   = 01774381
>> [    7.496414] brcmfmac: brcmf_sdio_htclk:   pmustatus    = 0000002a
>> [    7.503873] brcmfmac: brcmf_sdio_htclk:   min_res_mask = 0fcaff77
>> [    7.510182] brcmfmac: brcmf_sdio_htclk:   max_res_mask = 0fceff77
>> #  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
>>
>> Buildroot:
>> # dmesg | grep brcmfmac
>> [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name: using
>> brcm/brcmfmac4339-sdio.bin for chip 0x00433
>> 9(17209) rev 0x000002
>> [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
>> clkctl 0x50
>> [    6.427722] brcmfmac: brcmf_sdio_htclk:   pmucontrol   = 01774381
>> [    6.434865] brcmfmac: brcmf_sdio_htclk:   pmustatus    = 0000002a
>> [    6.441174] brcmfmac: brcmf_sdio_htclk:   min_res_mask = 0fcaff77
>> [    6.447379] brcmfmac: brcmf_sdio_htclk:   max_res_mask = 0fceff77
>> [    7.502653] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
>> clkctl 0x50
>> [    7.510200] brcmfmac: brcmf_sdio_htclk:   pmucontrol   = 01774381
>> [    7.516398] brcmfmac: brcmf_sdio_htclk:   pmustatus    = 0000002a
>> [    7.523826] brcmfmac: brcmf_sdio_htclk:   min_res_mask = 0fcaff77
>> [    7.530117] brcmfmac: brcmf_sdio_htclk:   max_res_mask = 0fceff77
>> # 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
> 
> Thanks for the info. The pmustatus indeed shows there is no HT clock for 
> the backplane. Will have to discuss with h/w guys. Meanwhile, can you 
> try the patch below. It will create a memory dump of the device using 
> the dev_coredump framework, ie. under /sys/class/devcoredump/. It will 
> probably create two dumps as the error occurs twice during probe. Just 
> sent me the first or put it somewhere on internet so I can download it 
> and have a look at it.

with patch :-(

Comments

Vanessa Maegima Nov. 22, 2017, 10:48 a.m. UTC | #1
Hi Arend,

On Seg, 2017-11-20 at 12:12 +0100, Arend van Spriel wrote:
> On 20-11-17 12:03, Arend van Spriel wrote:

> > 

> > On 17-11-17 16:24, Vanessa Maegima wrote:

> > > 

> > > Hi Arend,

> > > 

> > > On Sex, 2017-11-17 at 13:55 +0100, Arend van Spriel wrote:

> > > > 

> > > > 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;

> > > >                   }

> > > > 

> > > > 

> > > Here's the output for both firmwares:

> > > 

> > > Technexion:

> > > # dmesg | grep brcmfmac

> > > [    5.307067] brcmfmac: brcmf_fw_map_chip_to_name: using

> > > brcm/brcmfmac4339-sdio.bin for chip 0x00433

> > > 9(17209) rev 0x000002

> > > [    6.400792] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > (1000000):

> > > clkctl 0x50

> > > [    6.408444] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > 01774381

> > > [    6.415595] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > 0000002a

> > > [    6.421915] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > 0fcaff77

> > > [    6.428124] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > 0fceff77

> > > [    7.482668] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > (1000000):

> > > clkctl 0x50

> > > [    7.490214] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > 01774381

> > > [    7.496414] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > 0000002a

> > > [    7.503873] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > 0fcaff77

> > > [    7.510182] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > 0fceff77

> > > #  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

> > > 

> > > Buildroot:

> > > # dmesg | grep brcmfmac

> > > [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name: using

> > > brcm/brcmfmac4339-sdio.bin for chip 0x00433

> > > 9(17209) rev 0x000002

> > > [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > (1000000):

> > > clkctl 0x50

> > > [    6.427722] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > 01774381

> > > [    6.434865] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > 0000002a

> > > [    6.441174] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > 0fcaff77

> > > [    6.447379] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > 0fceff77

> > > [    7.502653] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > (1000000):

> > > clkctl 0x50

> > > [    7.510200] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > 01774381

> > > [    7.516398] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > 0000002a

> > > [    7.523826] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > 0fcaff77

> > > [    7.530117] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > 0fceff77

> > > # 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

> > Thanks for the info. The pmustatus indeed shows there is no HT

> > clock for 

> > the backplane. Will have to discuss with h/w guys. Meanwhile, can

> > you 

> > try the patch below. It will create a memory dump of the device

> > using 

> > the dev_coredump framework, ie. under /sys/class/devcoredump/. It

> > will 

> > probably create two dumps as the error occurs twice during probe.

> > Just 

> > sent me the first or put it somewhere on internet so I can download

> > it 

> > and have a look at it.

> with patch :-(

> 

> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 

> b/drivers/ne

> index f355612..f7ded91 100644

> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

> @@ -830,6 +830,11 @@ static int brcmf_sdio_htclk(struct brcmf_sdio

> *bus, 

> bool on,

>                  if (!SBSDIO_CLKAV(clkctl, bus->alp_only)) {

>                          brcmf_err("HT Avail timeout (%d): clkctl

> 0x%02x\n",

>                                    PMU_MAX_TRANSITION_DLY, clkctl);

> +

> +                       /* DEBUG INFO */

> +                       brcmf_debug_create_memdump(bus->sdiodev-

> >bus_if,

> +                                                  NULL, 0);

> +

>                          return -EBADE;

>                  }

> 

> 


I am applying this patch and apparently the dumps are not created.

# ls /sys/class/devcoredump/                                          
disabled

Is there something else I need to modify? I am using mainline kernel.

Thanks!
Arend van Spriel Nov. 22, 2017, 10:58 a.m. UTC | #2
On 11/22/2017 11:48 AM, Vanessa Maegima wrote:
> Hi Arend,
>
> On Seg, 2017-11-20 at 12:12 +0100, Arend van Spriel wrote:
>> On 20-11-17 12:03, Arend van Spriel wrote:
>>>
>>> On 17-11-17 16:24, Vanessa Maegima wrote:
>>>>
>>>> Hi Arend,
>>>>
>>>> On Sex, 2017-11-17 at 13:55 +0100, Arend van Spriel wrote:
>>>>>
>>>>> 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;
>>>>>                    }
>>>>>
>>>>>
>>>> Here's the output for both firmwares:
>>>>
>>>> Technexion:
>>>> # dmesg | grep brcmfmac
>>>> [    5.307067] brcmfmac: brcmf_fw_map_chip_to_name: using
>>>> brcm/brcmfmac4339-sdio.bin for chip 0x00433
>>>> 9(17209) rev 0x000002
>>>> [    6.400792] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>> (1000000):
>>>> clkctl 0x50
>>>> [    6.408444] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =
>>>> 01774381
>>>> [    6.415595] brcmfmac: brcmf_sdio_htclk:   pmustatus    =
>>>> 0000002a
>>>> [    6.421915] brcmfmac: brcmf_sdio_htclk:   min_res_mask =
>>>> 0fcaff77
>>>> [    6.428124] brcmfmac: brcmf_sdio_htclk:   max_res_mask =
>>>> 0fceff77
>>>> [    7.482668] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>> (1000000):
>>>> clkctl 0x50
>>>> [    7.490214] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =
>>>> 01774381
>>>> [    7.496414] brcmfmac: brcmf_sdio_htclk:   pmustatus    =
>>>> 0000002a
>>>> [    7.503873] brcmfmac: brcmf_sdio_htclk:   min_res_mask =
>>>> 0fcaff77
>>>> [    7.510182] brcmfmac: brcmf_sdio_htclk:   max_res_mask =
>>>> 0fceff77
>>>> #  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
>>>>
>>>> Buildroot:
>>>> # dmesg | grep brcmfmac
>>>> [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name: using
>>>> brcm/brcmfmac4339-sdio.bin for chip 0x00433
>>>> 9(17209) rev 0x000002
>>>> [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>> (1000000):
>>>> clkctl 0x50
>>>> [    6.427722] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =
>>>> 01774381
>>>> [    6.434865] brcmfmac: brcmf_sdio_htclk:   pmustatus    =
>>>> 0000002a
>>>> [    6.441174] brcmfmac: brcmf_sdio_htclk:   min_res_mask =
>>>> 0fcaff77
>>>> [    6.447379] brcmfmac: brcmf_sdio_htclk:   max_res_mask =
>>>> 0fceff77
>>>> [    7.502653] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>> (1000000):
>>>> clkctl 0x50
>>>> [    7.510200] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =
>>>> 01774381
>>>> [    7.516398] brcmfmac: brcmf_sdio_htclk:   pmustatus    =
>>>> 0000002a
>>>> [    7.523826] brcmfmac: brcmf_sdio_htclk:   min_res_mask =
>>>> 0fcaff77
>>>> [    7.530117] brcmfmac: brcmf_sdio_htclk:   max_res_mask =
>>>> 0fceff77
>>>> # 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
>>> Thanks for the info. The pmustatus indeed shows there is no HT
>>> clock for
>>> the backplane. Will have to discuss with h/w guys. Meanwhile, can
>>> you
>>> try the patch below. It will create a memory dump of the device
>>> using
>>> the dev_coredump framework, ie. under /sys/class/devcoredump/. It
>>> will
>>> probably create two dumps as the error occurs twice during probe.
>>> Just
>>> sent me the first or put it somewhere on internet so I can download
>>> it
>>> and have a look at it.
>> with patch :-(
>>
>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
>> b/drivers/ne
>> index f355612..f7ded91 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
>> @@ -830,6 +830,11 @@ static int brcmf_sdio_htclk(struct brcmf_sdio
>> *bus,
>> bool on,
>>                   if (!SBSDIO_CLKAV(clkctl, bus->alp_only)) {
>>                           brcmf_err("HT Avail timeout (%d): clkctl
>> 0x%02x\n",
>>                                     PMU_MAX_TRANSITION_DLY, clkctl);
>> +
>> +                       /* DEBUG INFO */
>> +                       brcmf_debug_create_memdump(bus->sdiodev-
>>> bus_if,
>> +                                                  NULL, 0);
>> +
>>                           return -EBADE;
>>                   }
>>
>>
>
> I am applying this patch and apparently the dumps are not created.
>
> # ls /sys/class/devcoredump/
> disabled
>
> Is there something else I need to modify? I am using mainline kernel.

You need to build brcmfmac with CONFIG_BRCMDBG set in Kconfig. Not sure 
if you already have that. I assume a cat of that 'disabled' file with 
show '0'.

Regards,
Arend
Vanessa Maegima Nov. 23, 2017, 3:24 p.m. UTC | #3
Hi Arend,

On Qua, 2017-11-22 at 11:58 +0100, Arend van Spriel wrote:
> On 11/22/2017 11:48 AM, Vanessa Maegima wrote:

> > 

> > Hi Arend,

> > 

> > On Seg, 2017-11-20 at 12:12 +0100, Arend van Spriel wrote:

> > > 

> > > On 20-11-17 12:03, Arend van Spriel wrote:

> > > > 

> > > > 

> > > > On 17-11-17 16:24, Vanessa Maegima wrote:

> > > > > 

> > > > > 

> > > > > Hi Arend,

> > > > > 

> > > > > On Sex, 2017-11-17 at 13:55 +0100, Arend van Spriel wrote:

> > > > > > 

> > > > > > 

> > > > > > 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;

> > > > > >                    }

> > > > > > 

> > > > > > 

> > > > > Here's the output for both firmwares:

> > > > > 

> > > > > Technexion:

> > > > > # dmesg | grep brcmfmac

> > > > > [    5.307067] brcmfmac: brcmf_fw_map_chip_to_name: using

> > > > > brcm/brcmfmac4339-sdio.bin for chip 0x00433

> > > > > 9(17209) rev 0x000002

> > > > > [    6.400792] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > > > (1000000):

> > > > > clkctl 0x50

> > > > > [    6.408444] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > > > 01774381

> > > > > [    6.415595] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > > > 0000002a

> > > > > [    6.421915] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > > > 0fcaff77

> > > > > [    6.428124] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > > > 0fceff77

> > > > > [    7.482668] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > > > (1000000):

> > > > > clkctl 0x50

> > > > > [    7.490214] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > > > 01774381

> > > > > [    7.496414] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > > > 0000002a

> > > > > [    7.503873] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > > > 0fcaff77

> > > > > [    7.510182] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > > > 0fceff77

> > > > > #  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

> > > > > 

> > > > > Buildroot:

> > > > > # dmesg | grep brcmfmac

> > > > > [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name: using

> > > > > brcm/brcmfmac4339-sdio.bin for chip 0x00433

> > > > > 9(17209) rev 0x000002

> > > > > [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > > > (1000000):

> > > > > clkctl 0x50

> > > > > [    6.427722] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > > > 01774381

> > > > > [    6.434865] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > > > 0000002a

> > > > > [    6.441174] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > > > 0fcaff77

> > > > > [    6.447379] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > > > 0fceff77

> > > > > [    7.502653] brcmfmac: brcmf_sdio_htclk: HT Avail timeout

> > > > > (1000000):

> > > > > clkctl 0x50

> > > > > [    7.510200] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =

> > > > > 01774381

> > > > > [    7.516398] brcmfmac: brcmf_sdio_htclk:   pmustatus    =

> > > > > 0000002a

> > > > > [    7.523826] brcmfmac: brcmf_sdio_htclk:   min_res_mask =

> > > > > 0fcaff77

> > > > > [    7.530117] brcmfmac: brcmf_sdio_htclk:   max_res_mask =

> > > > > 0fceff77

> > > > > # 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

> > > > Thanks for the info. The pmustatus indeed shows there is no HT

> > > > clock for

> > > > the backplane. Will have to discuss with h/w guys. Meanwhile,

> > > > can

> > > > you

> > > > try the patch below. It will create a memory dump of the device

> > > > using

> > > > the dev_coredump framework, ie. under /sys/class/devcoredump/.

> > > > It

> > > > will

> > > > probably create two dumps as the error occurs twice during

> > > > probe.

> > > > Just

> > > > sent me the first or put it somewhere on internet so I can

> > > > download

> > > > it

> > > > and have a look at it.

> > > with patch :-(

> > > 

> > > diff --git

> > > a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

> > > b/drivers/ne

> > > index f355612..f7ded91 100644

> > > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

> > > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

> > > @@ -830,6 +830,11 @@ static int brcmf_sdio_htclk(struct

> > > brcmf_sdio

> > > *bus,

> > > bool on,

> > >                   if (!SBSDIO_CLKAV(clkctl, bus->alp_only)) {

> > >                           brcmf_err("HT Avail timeout (%d):

> > > clkctl

> > > 0x%02x\n",

> > >                                     PMU_MAX_TRANSITION_DLY,

> > > clkctl);

> > > +

> > > +                       /* DEBUG INFO */

> > > +                       brcmf_debug_create_memdump(bus->sdiodev-

> > > > 

> > > > bus_if,

> > > +                                                  NULL, 0);

> > > +

> > >                           return -EBADE;

> > >                   }

> > > 

> > > 

> > I am applying this patch and apparently the dumps are not created.

> > 

> > # ls /sys/class/devcoredump/

> > disabled

> > 

> > Is there something else I need to modify? I am using mainline

> > kernel.

> You need to build brcmfmac with CONFIG_BRCMDBG set in Kconfig. Not

> sure 

> if you already have that. I assume a cat of that 'disabled' file

> with 

> show '0'.

> 

> Regards,

> Arend

> 


Sorry for the delayed answer, I had some trouble to copy the symlinks
files corretly from /sys/class/devcoredump.

I uploaded this folder to: https://drive.google.com/open?id=1fosahjLN1K
I5NKS59_aPZdHLpENPFHtK

Thanks!

Regards,
Vanessa
Arend van Spriel Nov. 30, 2017, 12:31 p.m. UTC | #4
On 11/23/2017 4:24 PM, Vanessa Maegima wrote:
>>>>>> Buildroot:
>>>>>> # dmesg | grep brcmfmac
>>>>>> [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name: using
>>>>>> brcm/brcmfmac4339-sdio.bin for chip 0x00433
>>>>>> 9(17209) rev 0x000002
>>>>>> [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail timeout
>>>>>> (1000000):
>>>>>> clkctl 0x50
>>>>>> [    6.427722] brcmfmac: brcmf_sdio_htclk:   pmucontrol   =
>>>>>> 01774381
>>>>>> [    6.434865] brcmfmac: brcmf_sdio_htclk:   pmustatus    =
>>>>>> 0000002a
>>>>>> [    6.441174] brcmfmac: brcmf_sdio_htclk:   min_res_mask =
>>>>>> 0fcaff77
>>>>>> [    6.447379] brcmfmac: brcmf_sdio_htclk:   max_res_mask =
>>>>>> 0fceff77

It toook me a while to look into this. Unfortunately I do not have a 
4339 to replicate your issue. The closest I have is a 4335. What looks 
wrong here is the max_res_mask because the HT Avail resource is bit 29 
which needs to be set in max_res_mask in order to make the request work. 
On my 4335 the max_res_mask is 0x7fffffff before calling 
brcmf_sdio_htclk(). So that is the cause of the failure in 
brcmf_sdio_htclk(). However, now the question is why it is not properly set.

Between your device and mine there is once discrepancy in the pmucontrol 
register, ie. bit 9 is set for your device. According the documentation 
the power-on reset value for this bit is 0 and I don't seen any code in 
our proprietary driver touching it.

> Sorry for the delayed answer, I had some trouble to copy the symlinks
> files corretly from /sys/class/devcoredump.
>
> I uploaded this folder to: https://drive.google.com/open?id=1fosahjLN1K
> I5NKS59_aPZdHLpENPFHtK

That worked nicely. So the firmware seems to crash very early. I have 
rebuilt the firmware to provide me more info. Can you redo the 
devcoredump trick with that firmware.

Regards,
Arend
Vanessa Maegima Dec. 4, 2017, 7 p.m. UTC | #5
Hi Arend,

On Qui, 2017-11-30 at 13:31 +0100, Arend van Spriel wrote:
> On 11/23/2017 4:24 PM, Vanessa Maegima wrote:

> > 

> > > 

> > > > 

> > > > > 

> > > > > > 

> > > > > > > 

> > > > > > > Buildroot:

> > > > > > > # dmesg | grep brcmfmac

> > > > > > > [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name: using

> > > > > > > brcm/brcmfmac4339-sdio.bin for chip 0x00433

> > > > > > > 9(17209) rev 0x000002

> > > > > > > [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail

> > > > > > > timeout

> > > > > > > (1000000):

> > > > > > > clkctl 0x50

> > > > > > > [    6.427722] brcmfmac:

> > > > > > > brcmf_sdio_htclk:   pmucontrol   =

> > > > > > > 01774381

> > > > > > > [    6.434865] brcmfmac:

> > > > > > > brcmf_sdio_htclk:   pmustatus    =

> > > > > > > 0000002a

> > > > > > > [    6.441174] brcmfmac: brcmf_sdio_htclk:   min_res_mask

> > > > > > > =

> > > > > > > 0fcaff77

> > > > > > > [    6.447379] brcmfmac: brcmf_sdio_htclk:   max_res_mask

> > > > > > > =

> > > > > > > 0fceff77

> It toook me a while to look into this. Unfortunately I do not have a 

> 4339 to replicate your issue. The closest I have is a 4335. What

> looks 

> wrong here is the max_res_mask because the HT Avail resource is bit

> 29 

> which needs to be set in max_res_mask in order to make the request

> work. 

> On my 4335 the max_res_mask is 0x7fffffff before calling 

> brcmf_sdio_htclk(). So that is the cause of the failure in 

> brcmf_sdio_htclk(). However, now the question is why it is not

> properly set.

> 

> Between your device and mine there is once discrepancy in the

> pmucontrol 

> register, ie. bit 9 is set for your device. According the

> documentation 

> the power-on reset value for this bit is 0 and I don't seen any code

> in 

> our proprietary driver touching it.

> 

> > 

> > Sorry for the delayed answer, I had some trouble to copy the

> > symlinks

> > files corretly from /sys/class/devcoredump.

> > 

> > I uploaded this folder to: https://emea01.safelinks.protection.outl

> > ook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1fosahjLN

> > 1K&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cb643e57876e44140aa300

> > 8d537ee44aa%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6364764188

> > 49464214&sdata=BrsDz0Ncm786g169TQOqFlbWuylR1pc1JklEkqeL%2FA0%3D&res

> > erved=0

> > I5NKS59_aPZdHLpENPFHtK

> That worked nicely. So the firmware seems to crash very early. I

> have 

> rebuilt the firmware to provide me more info. Can you redo the 

> devcoredump trick with that firmware.

> 

> Regards,

> Arend


Thanks for your reply!

I tried your new firmware and here is the output (new_firmware folder):
https://drive.google.com/drive/folders/1fosahjLN1KI5NKS59_aPZdHLpENPFHt
K

Thanks!

Regards,
Vanessa
Arend van Spriel Dec. 5, 2017, 9:06 a.m. UTC | #6
On Mon, Dec 4, 2017 at 8:00 PM, Vanessa Maegima <vanessa.maegima@nxp.com> wrote:
> Hi Arend,
>
> On Qui, 2017-11-30 at 13:31 +0100, Arend van Spriel wrote:
>> On 11/23/2017 4:24 PM, Vanessa Maegima wrote:
>> >
>> > >
>> > > >
>> > > > >
>> > > > > >
>> > > > > > >
>> > > > > > > Buildroot:
>> > > > > > > # dmesg | grep brcmfmac
>> > > > > > > [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name: using
>> > > > > > > brcm/brcmfmac4339-sdio.bin for chip 0x00433
>> > > > > > > 9(17209) rev 0x000002
>> > > > > > > [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail
>> > > > > > > timeout
>> > > > > > > (1000000):
>> > > > > > > clkctl 0x50
>> > > > > > > [    6.427722] brcmfmac:
>> > > > > > > brcmf_sdio_htclk:   pmucontrol   =
>> > > > > > > 01774381
>> > > > > > > [    6.434865] brcmfmac:
>> > > > > > > brcmf_sdio_htclk:   pmustatus    =
>> > > > > > > 0000002a
>> > > > > > > [    6.441174] brcmfmac: brcmf_sdio_htclk:   min_res_mask
>> > > > > > > =
>> > > > > > > 0fcaff77
>> > > > > > > [    6.447379] brcmfmac: brcmf_sdio_htclk:   max_res_mask
>> > > > > > > =
>> > > > > > > 0fceff77
>> It toook me a while to look into this. Unfortunately I do not have a
>> 4339 to replicate your issue. The closest I have is a 4335. What
>> looks
>> wrong here is the max_res_mask because the HT Avail resource is bit
>> 29
>> which needs to be set in max_res_mask in order to make the request
>> work.
>> On my 4335 the max_res_mask is 0x7fffffff before calling
>> brcmf_sdio_htclk(). So that is the cause of the failure in
>> brcmf_sdio_htclk(). However, now the question is why it is not
>> properly set.
>>
>> Between your device and mine there is once discrepancy in the
>> pmucontrol
>> register, ie. bit 9 is set for your device. According the
>> documentation
>> the power-on reset value for this bit is 0 and I don't seen any code
>> in
>> our proprietary driver touching it.
>>
>> >
>> > Sorry for the delayed answer, I had some trouble to copy the
>> > symlinks
>> > files corretly from /sys/class/devcoredump.
>> >
>> > I uploaded this folder to: https://emea01.safelinks.protection.outl
>> > ook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1fosahjLN
>> > 1K&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cb643e57876e44140aa300
>> > 8d537ee44aa%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6364764188
>> > 49464214&sdata=BrsDz0Ncm786g169TQOqFlbWuylR1pc1JklEkqeL%2FA0%3D&res
>> > erved=0
>> > I5NKS59_aPZdHLpENPFHtK
>> That worked nicely. So the firmware seems to crash very early. I
>> have
>> rebuilt the firmware to provide me more info. Can you redo the
>> devcoredump trick with that firmware.
>>
>> Regards,
>> Arend
>
> Thanks for your reply!
>
> I tried your new firmware and here is the output (new_firmware folder):
> https://drive.google.com/drive/folders/1fosahjLN1KI5NKS59_aPZdHLpENPFHt
> K

Hi Vanessa.

The only file of interest is one named 'data' and it is not present in
the new folder. These core dumps are removed from the filesystem after
some timeout (not sure how long) so that may be the reason.

Regards,
Arend

> Thanks!
>
> Regards,
> Vanessa
Vanessa Maegima Dec. 5, 2017, 2:58 p.m. UTC | #7
On Ter, 2017-12-05 at 10:06 +0100, Arend Van Spriel wrote:
> On Mon, Dec 4, 2017 at 8:00 PM, Vanessa Maegima <vanessa.maegima@nxp.

> com> wrote:

> > 

> > Hi Arend,

> > 

> > On Qui, 2017-11-30 at 13:31 +0100, Arend van Spriel wrote:

> > > 

> > > On 11/23/2017 4:24 PM, Vanessa Maegima wrote:

> > > > 

> > > > 

> > > > > 

> > > > > 

> > > > > > 

> > > > > > 

> > > > > > > 

> > > > > > > 

> > > > > > > > 

> > > > > > > > 

> > > > > > > > > 

> > > > > > > > > 

> > > > > > > > > Buildroot:

> > > > > > > > > # dmesg | grep brcmfmac

> > > > > > > > > [    5.343118] brcmfmac: brcmf_fw_map_chip_to_name:

> > > > > > > > > using

> > > > > > > > > brcm/brcmfmac4339-sdio.bin for chip 0x00433

> > > > > > > > > 9(17209) rev 0x000002

> > > > > > > > > [    6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail

> > > > > > > > > timeout

> > > > > > > > > (1000000):

> > > > > > > > > clkctl 0x50

> > > > > > > > > [    6.427722] brcmfmac:

> > > > > > > > > brcmf_sdio_htclk:   pmucontrol   =

> > > > > > > > > 01774381

> > > > > > > > > [    6.434865] brcmfmac:

> > > > > > > > > brcmf_sdio_htclk:   pmustatus    =

> > > > > > > > > 0000002a

> > > > > > > > > [    6.441174] brcmfmac:

> > > > > > > > > brcmf_sdio_htclk:   min_res_mask

> > > > > > > > > =

> > > > > > > > > 0fcaff77

> > > > > > > > > [    6.447379] brcmfmac:

> > > > > > > > > brcmf_sdio_htclk:   max_res_mask

> > > > > > > > > =

> > > > > > > > > 0fceff77

> > > It toook me a while to look into this. Unfortunately I do not

> > > have a

> > > 4339 to replicate your issue. The closest I have is a 4335. What

> > > looks

> > > wrong here is the max_res_mask because the HT Avail resource is

> > > bit

> > > 29

> > > which needs to be set in max_res_mask in order to make the

> > > request

> > > work.

> > > On my 4335 the max_res_mask is 0x7fffffff before calling

> > > brcmf_sdio_htclk(). So that is the cause of the failure in

> > > brcmf_sdio_htclk(). However, now the question is why it is not

> > > properly set.

> > > 

> > > Between your device and mine there is once discrepancy in the

> > > pmucontrol

> > > register, ie. bit 9 is set for your device. According the

> > > documentation

> > > the power-on reset value for this bit is 0 and I don't seen any

> > > code

> > > in

> > > our proprietary driver touching it.

> > > 

> > > > 

> > > > 

> > > > Sorry for the delayed answer, I had some trouble to copy the

> > > > symlinks

> > > > files corretly from /sys/class/devcoredump.

> > > > 

> > > > I uploaded this folder to: https://emea01.safelinks.protection.

> > > > outlook.com/?url=https%3A%2F%2Femea01.safelinks.protection.outl

> > > > &data=02%7C01%7Cvanessa.maegima%40nxp.com%7C2190be1208204b984b9

> > > > 608d53bbf8432%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6364

> > > > 80616101839805&sdata=w9DZK5w1GPQaOfDPkB%2FfE2tbUanIxmztdx570FON

> > > > 4t8%3D&reserved=0

> > > > ook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1fosa

> > > > hjLN

> > > > 1K&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cb643e57876e44140a

> > > > a300

> > > > 8d537ee44aa%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636476

> > > > 4188

> > > > 49464214&sdata=BrsDz0Ncm786g169TQOqFlbWuylR1pc1JklEkqeL%2FA0%3D

> > > > &res

> > > > erved=0

> > > > I5NKS59_aPZdHLpENPFHtK

> > > That worked nicely. So the firmware seems to crash very early. I

> > > have

> > > rebuilt the firmware to provide me more info. Can you redo the

> > > devcoredump trick with that firmware.

> > > 

> > > Regards,

> > > Arend

> > Thanks for your reply!

> > 

> > I tried your new firmware and here is the output (new_firmware

> > folder):

> > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2F

> > drive.google.com%2Fdrive%2Ffolders%2F1fosahjLN1KI5NKS59_aPZdHLpENPF

> > Ht&data=02%7C01%7Cvanessa.maegima%40nxp.com%7C2190be1208204b984b960

> > 8d53bbf8432%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6364806161

> > 01839805&sdata=aEzIN7Xi0R45GsEZjcV0HLMb3eIQIroiKOYnNge2Hk8%3D&reser

> > ved=0

> > K

> Hi Vanessa.

> 

> The only file of interest is one named 'data' and it is not present

> in

> the new folder. These core dumps are removed from the filesystem

> after

> some timeout (not sure how long) so that may be the reason.

> 


Hi Arend,

Sorry for this!

I updated the folder on https://drive.google.com/drive/folders/1fosahjL
N1KI5NKS59_aPZdHLpENPFHtK

Thanks!

Regards,
Vanessa

> Regards,

> Arend

> 

> > 

> > Thanks!

> > 

> > Regards,

> > Vanessa
Fabio Estevam Jan. 15, 2018, 8:08 p.m. UTC | #8
Hi Arend,

On Tue, Dec 5, 2017 at 12:58 PM, Vanessa Maegima
<vanessa.maegima@nxp.com> wrote:

> Hi Arend,
>
> Sorry for this!
>
> I updated the folder on https://drive.google.com/drive/folders/1fosahjL
> N1KI5NKS59_aPZdHLpENPFHtK
>
> Thanks!

Any ideas, please?

Thanks
Arend van Spriel Jan. 16, 2018, 8:21 p.m. UTC | #9
On 1/15/2018 9:08 PM, Fabio Estevam wrote:
> Hi Arend,
>
> On Tue, Dec 5, 2017 at 12:58 PM, Vanessa Maegima
> <vanessa.maegima@nxp.com> wrote:
>
>> Hi Arend,
>>
>> Sorry for this!
>>
>> I updated the folder on https://drive.google.com/drive/folders/1fosahjL
>> N1KI5NKS59_aPZdHLpENPFHtK
>>
>> Thanks!
>
> Any ideas, please?

Well, the dumps confirm a crash early in the firmware boot. However, I 
could not obtain more information from it. To capture the failure I need 
to rework some firmware functionality which is not trivial and I can not 
claim time for it right now.

Regards,
Arend
Vanessa Maegima Jan. 18, 2018, 11:47 a.m. UTC | #10
Hi Arend,

On Ter, 2018-01-16 at 21:21 +0100, Arend van Spriel wrote:
> On 1/15/2018 9:08 PM, Fabio Estevam wrote:

> > 

> > Hi Arend,

> > 

> > On Tue, Dec 5, 2017 at 12:58 PM, Vanessa Maegima

> > <vanessa.maegima@nxp.com> wrote:

> > 

> > > 

> > > Hi Arend,

> > > 

> > > Sorry for this!

> > > 

> > > I updated the folder on https://emea01.safelinks.protection.outlo

> > > ok.com/?url=https%3A%2F%2Fdrive.google.com%2Fdrive%2Ffolders%2F1f

> > > osahjL&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cf07cd1a6ffb34c0

> > > 961f608d55d1eb901%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63

> > > 6517308901643244&sdata=6JAqSN%2BVPJ%2FCF7cbnBjm8geMKWydWkG9JcUhGB

> > > Pj644%3D&reserved=0

> > > N1KI5NKS59_aPZdHLpENPFHtK

> > > 

> > > Thanks!

> > Any ideas, please?

> Well, the dumps confirm a crash early in the firmware boot. However,

> I 

> could not obtain more information from it. To capture the failure I

> need 

> to rework some firmware functionality which is not trivial and I can

> not 

> claim time for it right now.

> 

> Regards,

> Arend

> 


Thanks for all your investigation here!

I just want to report one more thing that I noticed from my tests.

I have tried to use an html file that I downloaded using wget as the
nvram file (https://github.com/OpenELEC/wlan-firmware/blob/master/firmw
are/brcm/nvram_ap6335.txt) and the wifi seems to work. I have not
noticed the wrong format file until testing it.

Please see attached the file I used as nvram and the log from my test.

Thanks!

Best,
Vanessa
U-Boot 2017.11+fslc+gca0c3f3 (Jan 16 2018 - 12:27:42 -0200)

CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 45C
Reset cause: POR
Board: i.MX7D PICOSOM in non-secure mode
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   FEC0
Hit any key to stop autoboot:  0 
8134704 bytes read in 322 ms (24.1 MiB/s)
Booting from mmc ...
27395 bytes read in 108 ms (247.1 KiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x7c2030 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 83009b02

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.1-fslc+ga4f7f0a (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP 
Tue Jan 16 12:32:44 -02 2018
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Technexion Pico i.MX7D Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 64 MiB at 0xbc000000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 17 pages/cpu @ef7be000 s40296 r8192 d21144 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttymxc4,115200 root=PARTUUID=7b01d6c5-01 rootwait rw
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 948792K/1048576K available (11264K kernel code, 851K rwdata, 3532K rodata, 102
4K init, 7726K bss, 34248K reserved, 65536K cma-reserved, 196608K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0c00000   (12256 kB)
[    0.000000]       .init : 0xc1000000 - 0xc1100000   (1024 kB)
[    0.000000]       .data : 0xc1100000 - 0xc11d4d58   ( 852 kB)
[    0.000000]        .bss : 0xc11d6000 - 0xc1961a6c   (7727 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] ftrace: allocating 34900 entries in 103 pages
[    0.000000] Running RCU self tests
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU lockdep checking is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 8.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idl
e_ns: 440795202120 ns
[    0.000010] sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns
[    0.000035] Switching to timer-based delay loop, resolution 125ns
[    0.000503] Switching to timer-based delay loop, resolution 41ns
[    0.000533] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000561] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7963585
1949 ns
[    0.002106] Console: colour dummy device 80x30
[    0.002136] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.002154] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.002172] ... MAX_LOCK_DEPTH:          48
[    0.002190] ... MAX_LOCKDEP_KEYS:        8191
[    0.002208] ... CLASSHASH_SIZE:          4096
[    0.002225] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.002243] ... MAX_LOCKDEP_CHAINS:      65536
[    0.002261] ... CHAINHASH_SIZE:          32768
[    0.002279]  memory used by lock dependency info: 4655 kB
[    0.002297]  per task-struct memory footprint: 1536 bytes
[    0.002357] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoM
IPS (lpj=240000)
[    0.002394] pid_max: default: 32768 minimum: 301
[    0.002719] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002753] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.004604] CPU: Testing write buffer coherency: ok
[    0.005540] CPU0: update cpu_capacity 1024
[    0.005566] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.006841] Setting up static identity map for 0x80100000 - 0x80100078
[    0.007261] Hierarchical SRCU implementation.
[    0.009076] smp: Bringing up secondary CPUs ...
[    0.011229] CPU1: update cpu_capacity 1024
[    0.011242] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.011848] smp: Brought up 1 node, 2 CPUs
[    0.011885] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.011904] CPU: All CPU(s) started in HYP mode.
[    0.011922] CPU: Virtualization extensions available.
[    0.014117] devtmpfs: initialized
[    0.038021] random: get_random_u32 called from bucket_table_alloc+0xf0/0x254 with crng_init=0
[    0.038300] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.040618] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446
2750000 ns
[    0.040669] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.044183] pinctrl core: initialized pinctrl subsystem
[    0.048044] NET: Registered protocol family 16
[    0.071734] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.075383] cpuidle: using governor menu
[    0.076328] No ATAGs?
[    0.076626] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.076678] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.087744] imx7d-pinctrl 302c0000.iomuxc-lpsr: initialized IMX pinctrl driver
[    0.090408] imx7d-pinctrl 30330000.iomuxc: initialized IMX pinctrl driver
[    0.093214] vdd1p0d: supplied by regulator-dummy
[    0.093553] vdd1p0d: Bringing 0uV into 800000-800000uV
[    0.179105] mxs-dma 33000000.dma-apbh: initialized
[    0.186209] vgaarb: loaded
[    0.187469] SCSI subsystem initialized
[    0.188786] usbcore: registered new interface driver usbfs
[    0.188989] usbcore: registered new interface driver hub
[    0.189220] usbcore: registered new device driver usb
[    0.189736] usb_phy_generic 30800000.aips-bus:usbphynop1: 30800000.aips-bus:usbphynop1 supply vcc 
not found, using dummy regulator
[    0.190415] usb_phy_generic 30800000.aips-bus:usbphynop3: 30800000.aips-bus:usbphynop3 supply vcc 
not found, using dummy regulator
[    0.191036] usb_phy_generic 30800000.aips-bus:usbphynop2: 30800000.aips-bus:usbphynop2 supply vcc 
not found, using dummy regulator
[    0.193880] i2c i2c-0: IMX I2C adapter registered
[    0.193923] i2c i2c-0: can't use DMA, using PIO instead.
[    0.195480] i2c i2c-3: IMX I2C adapter registered
[    0.195520] i2c i2c-3: can't use DMA, using PIO instead.
[    0.195879] media: Linux media interface: v0.10
[    0.196007] Linux video capture interface: v2.00
[    0.196264] pps_core: LinuxPPS API ver. 1 registered
[    0.196286] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.i
t>
[    0.196353] PTP clock support registered
[    0.197348] Advanced Linux Sound Architecture Driver Initialized.
[    0.199355] random: fast init done
[    0.199708] Bluetooth: Core ver 2.22
[    0.199820] NET: Registered protocol family 31
[    0.199842] Bluetooth: HCI device and connection manager initialized
[    0.199913] Bluetooth: HCI socket layer initialized
[    0.199950] Bluetooth: L2CAP socket layer initialized
[    0.200105] Bluetooth: SCO socket layer initialized
[    0.203205] clocksource: Switched to clocksource arch_sys_counter
[    0.460827] VFS: Disk quotas dquot_6.6.0
[    0.461027] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.491778] NET: Registered protocol family 2
[    0.493828] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.494046] TCP bind hash table entries: 8192 (order: 6, 294912 bytes)
[    0.497712] TCP: Hash tables configured (established 8192 bind 8192)
[    0.498181] UDP hash table entries: 512 (order: 3, 40960 bytes)
[    0.498710] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes)
[    0.500023] NET: Registered protocol family 1
[    0.501625] RPC: Registered named UNIX socket transport module.
[    0.501662] RPC: Registered udp transport module.
[    0.501683] RPC: Registered tcp transport module.
[    0.501704] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.507419] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.524560] NFS: Registering the id_resolver key type
[    0.524811] Key type id_resolver registered
[    0.524844] Key type id_legacy registered
[    0.524990] jffs2: version 2.2. (NAND) �੩ 2001-2006 Red Hat, Inc.
[    0.526732] fuse init (API version 7.26)
[    0.538339] bounce: pool size: 64 pages
[    0.538498] io scheduler noop registered
[    0.538522] io scheduler deadline registered
[    0.538886] io scheduler cfq registered (default)
[    0.538911] io scheduler mq-deadline registered
[    0.538933] io scheduler kyber registered
[    0.547092] imx-sdma 30bd0000.sdma: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with e
rror -2
[    0.547194] imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware
[    0.560404] pfuze100-regulator 3-0008: Full layer: 1, Metal layer: 1
[    0.561328] pfuze100-regulator 3-0008: FAB: 0, FIN: 0
[    0.561353] pfuze100-regulator 3-0008: pfuze3000 found.
[    0.588874] 30a70000.serial: ttymxc4 at MMIO 0x30a70000 (irq = 47, base_baud = 15000000) is a IMX
[    1.444800] console [ttymxc4] enabled
[    1.483788] brd: module loaded
[    1.514465] loop: module loaded
[    1.524854] libphy: Fixed MDIO Bus: probed
[    1.530478] CAN device driver interface
[    1.538334] fec 30be0000.ethernet: 30be0000.ethernet supply phy not found, using dummy regulator
[    1.548877] pps pps0: new PPS source ptp0
[    1.555576] libphy: fec_enet_mii_bus: probed
[    1.564928] fec 30be0000.ethernet eth0: registered PHC device 0
[    1.572255] usbcore: registered new interface driver asix
[    1.577892] usbcore: registered new interface driver ax88179_178a
[    1.584163] usbcore: registered new interface driver cdc_ether
[    1.590118] usbcore: registered new interface driver net1080
[    1.595960] usbcore: registered new interface driver cdc_subset
[    1.602000] usbcore: registered new interface driver zaurus
[    1.607811] usbcore: registered new interface driver cdc_ncm
[    1.613551] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.620102] ehci-pci: EHCI PCI platform driver
[    1.624728] ehci-mxc: Freescale On-Chip EHCI Host driver
[    1.630741] usbcore: registered new interface driver usb-storage
[    1.650879] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    1.656151] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    1.693216] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    1.702267] hub 1-0:1.0: USB hub found
[    1.706409] hub 1-0:1.0: 1 port detected
[    1.715996] input: 30370000.snvs:snvs-powerkey as /devices/platform/soc/30000000.aips-bus/30370000
.snvs/30370000.snvs:snvs-powerkey/input/input0
[    1.734744] snvs_rtc 30370000.snvs:snvs-rtc-lp: rtc core: registered 30370000.snvs:snvs-rtc-lp as 
rtc0
[    1.744436] i2c /dev entries driver
[    1.749859] IR NEC protocol handler initialized
[    1.754502] IR RC5(x/sz) protocol handler initialized
[    1.759580] IR RC6 protocol handler initialized
[    1.764200] IR JVC protocol handler initialized
[    1.768756] IR Sony protocol handler initialized
[    1.773441] IR SANYO protocol handler initialized
[    1.778169] IR Sharp protocol handler initialized
[    1.782897] IR MCE Keyboard/mouse protocol handler initialized
[    1.788806] IR XMP protocol handler initialized
[    1.798578] imx2-wdt 30280000.wdog: timeout 60 sec (nowayout=0)
[    1.804957] Bluetooth: HCI UART driver ver 2.3
[    1.809430] Bluetooth: HCI UART protocol H4 registered
[    1.817702] sdhci: Secure Digital Host Controller Interface driver
[    1.823989] sdhci: Copyright(c) Pierre Ossman
[    1.828369] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.903565] mmc0: SDHCI controller on 30b50000.usdhc [30b50000.usdhc] using ADMA
[    1.931494] mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.939174] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.946719] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.957651] mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.983213] mmc1: SDHCI controller on 30b60000.usdhc [30b60000.usdhc] using ADMA
[    2.000514] usbcore: registered new interface driver usbhid
[    2.006301] usbhid: USB HID core driver
[    2.030590] sgtl5000 0-000a: sgtl5000 revision 0x11
[    2.039538] sgtl5000 0-000a: Using internal LDO instead of VDDD: check ER1
[    2.079799] mmc1: new DDR MMC card at address 0001
[    2.087712] mmcblk1: mmc1:0001 M62704 3.56 GiB 
[    2.093293] mmcblk1boot0: mmc1:0001 M62704 partition 1 2.00 MiB
[    2.099888] mmcblk1boot1: mmc1:0001 M62704 partition 2 2.00 MiB
[    2.116730] mmcblk1rpmb: mmc1:0001 M62704 partition 3 512 KiB
[    2.128627]  mmcblk1: p1
[    2.137262] mmc0: new high speed SDIO card at address 0001
[    2.151702] NET: Registered protocol family 10
[    2.159838] Segment Routing with IPv6
[    2.163829] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.171635] NET: Registered protocol family 17
[    2.176209] can: controller area network core (rev 20170425 abi 9)
[    2.182627] NET: Registered protocol family 29
[    2.187149] can: raw protocol (rev 20170425)
[    2.191514] can: broadcast manager protocol (rev 20170425 t)
[    2.197268] can: netlink gateway (rev 20170425) max_hops=1
[    2.203430] Key type dns_resolver registered
[    2.207892] Registering SWP/SWPB emulation handler
[    2.354535] asoc-simple-card sound: sgtl5000 <-> 308a0000.sai mapping ok
[    2.368272] snvs_rtc 30370000.snvs:snvs-rtc-lp: setting system clock to 2018-01-16 14:43:27 UTC (1
516113807)
[    2.400857] usb_otg1_vbus: disabling
[    2.404655] SWBST: disabling
[    2.407620] VLDO2: disabling
[    2.411548] ALSA device list:
[    2.414636]   #0: imx7-sgtl5000
[    2.423420] EXT4-fs (mmcblk1p1): couldn't mount as ext3 due to feature incompatibilities
[    2.456394] EXT4-fs (mmcblk1p1): recovery complete
[    2.462340] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
[    2.470812] VFS: Mounted root (ext4 filesystem) on device 179:1.
[    2.481204] devtmpfs: mounted
[    2.489487] Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
Framebuffer /dev/fb0 not detected
Boot splashscreen disabled
Starting udev
[    2.951961] udevd[98]: starting version 3.2.2
[    3.013982] udevd[99]: starting eudev-3.2.2
[    3.721795] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac4339-sdio.bin for chip 0x00433
9(17209) rev 0x000002
[    3.988192] EXT4-fs (mmcblk1p1): re-mounted. Opts: data=ordered
[    4.230435] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 28 2014 18:39:28 version 
6.37.32.RC23.34.28 (r499539)
ALSA: Restoring mixer settings...
INIT: Entering runlevel: 5
No state is present for card imx7sgtl5000
Found hardware: "imx7-sgtl5000" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card imx7sgtl5000
Configuring network interfaces... [    5.213722] Atheros 8035 ethernet 30be0000.ethernet-1:01: attach
ed PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=30be0000.ethernet-1:01, irq=POLL)
[    5.230129] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Starting system message bus: dbus.
Starting rpcbind daemon...done.
Starting bluetooth: bluetoothd.
Starting syslogd/klogd: done
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
   ...done.
Starting Telephony daemon
Starting Linux NFC daemon
umount: can't unmount /mnt/.psplash: Invalid argument

FSLC X11 2.3-snapshot imx7d-pico /dev/ttymxc4

imx7d-pico login: root
root@imx7d-pico:~# lsmod
Module                  Size  Used by
brcmfmac              208896  0
brcmutil               16384  1 brcmfmac
root@imx7d-pico:~# ifconfig wlan0 up
[   77.155838] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@imx7d-pico:~# wpa_passphrase test 12345678 > /etc/wpa_supplicant.conf 
root@imx7d-pico:~# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211 &
root@imx7d-pico:~# Successfully initialized wpa_supplicant

[1]+  Done                       wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211
root@imx7d-pico:~# udhcpc -i wlan0
udhcpc (v1.24.1) started
Sending discover...
[  103.831648] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Sending discover...
Sending discover...
Sending select for 192.168.43.41...
Lease of 192.168.43.41 obtained, lease time 3600
[  112.054952] brcmfmac: brcmf_inetaddr_changed: fail to get arp ip table err:-23
/etc/udhcpc.d/50default: Adding DNS 192.168.43.1
root@imx7d-pico:~# ping www.google.com
PING www.google.com (172.217.28.196): 56 data bytes
64 bytes from 172.217.28.196: seq=0 ttl=50 time=1027.928 ms
64 bytes from 172.217.28.196: seq=1 ttl=50 time=143.620 ms
64 bytes from 172.217.28.196: seq=2 ttl=50 time=143.497 ms
64 bytes from 172.217.28.196: seq=4 ttl=50 time=190.728 ms
^C
--- www.google.com ping statistics ---
5 packets transmitted, 4 packets received, 20% packet loss
round-trip min/avg/max = 143.497/376.443/1027.928 ms
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://assets-cdn.github.com">
  <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
  <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
  <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">



  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-3e3f370097e3a4bec29b24356300a7ba8316af25f4576ce2170d64678fee6d17.css" media="all" rel="stylesheet" />
  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-659082d0d52633c8b6e949a8b95f4f9c70ab20dab1ddc29985963e02a8c2aa28.css" media="all" rel="stylesheet" />
  
  
  <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/site-e2f78def14631b7fd769bf918598cd7d437e67a706a2676aa466634d28ffaabd.css" media="all" rel="stylesheet" />
  

  <meta name="viewport" content="width=device-width">
  
  <title>wlan-firmware/nvram_ap6335.txt at master · OpenELEC/wlan-firmware · GitHub</title>
  <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
  <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
  <meta property="fb:app_id" content="1401488693436528">

    
    <meta content="https://avatars3.githubusercontent.com/u/487665?s=400&amp;v=4" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="OpenELEC/wlan-firmware" property="og:title" /><meta content="https://github.com/OpenELEC/wlan-firmware" property="og:url" /><meta content="Contribute to wlan-firmware development by creating an account on GitHub." property="og:description" />

  <link rel="assets" href="https://assets-cdn.github.com/">
  
  <meta name="pjax-timeout" content="1000">
  
  <meta name="request-id" content="ED25:08C3:19F03:2E706:5A5E193C" data-pjax-transient>
  

  <meta name="selected-link" value="repo_source" data-pjax-transient>

    <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
  <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
  <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
    <meta name="google-analytics" content="UA-3769691-2">

<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="https://collector.githubapp.com/github-external/browser_event" name="octolytics-event-url" /><meta content="ED25:08C3:19F03:2E706:5A5E193C" name="octolytics-dimension-request_id" /><meta content="iad" name="octolytics-dimension-region_edge" /><meta content="iad" name="octolytics-dimension-region_render" />
<meta content="/&lt;user-name&gt;/&lt;repo-name&gt;/blob/show" data-pjax-transient="true" name="analytics-location" />




  <meta class="js-ga-set" name="dimension1" content="Logged Out">


  

      <meta name="hostname" content="github.com">
  <meta name="user-login" content="">

      <meta name="expected-hostname" content="github.com">
    <meta name="js-proxy-site-detection-payload" content="NTFhYTIyZThlNjhlMzQyMzEwY2QxOTA1ODUxZmY5ZjMyN2NmMTEzNTYxOTY4OTM1OTgwYWE2ZTk1ZTYwZGE1NHx7InJlbW90ZV9hZGRyZXNzIjoiMTY4LjIyNy4xNC4yNDIiLCJyZXF1ZXN0X2lkIjoiRUQyNTowOEMzOjE5RjAzOjJFNzA2OjVBNUUxOTNDIiwidGltZXN0YW1wIjoxNTE2MTE2Mjg1LCJob3N0IjoiZ2l0aHViLmNvbSJ9">

    <meta name="enabled-features" content="UNIVERSE_BANNER,FREE_TRIALS">

  <meta name="html-safe-nonce" content="7ff3cf9e8c78bfc583c84228d73b0cd1926e8c63">

  <meta http-equiv="x-pjax-version" content="9edc8190d6a5d88afe68a2514819e0c3">
  

      <link href="https://github.com/OpenELEC/wlan-firmware/commits/master.atom" rel="alternate" title="Recent Commits to wlan-firmware:master" type="application/atom+xml">

  <meta name="description" content="Contribute to wlan-firmware development by creating an account on GitHub.">
  <meta name="go-import" content="github.com/OpenELEC/wlan-firmware git https://github.com/OpenELEC/wlan-firmware.git">

  <meta content="487665" name="octolytics-dimension-user_id" /><meta content="OpenELEC" name="octolytics-dimension-user_login" /><meta content="1426898" name="octolytics-dimension-repository_id" /><meta content="OpenELEC/wlan-firmware" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="1426898" name="octolytics-dimension-repository_network_root_id" /><meta content="OpenELEC/wlan-firmware" name="octolytics-dimension-repository_network_root_nwo" /><meta content="false" name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" />


    <link rel="canonical" href="https://github.com/OpenELEC/wlan-firmware/blob/master/firmware/brcm/nvram_ap6335.txt" data-pjax-transient>


  <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">

  <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">

  <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
  <link rel="icon" type="image/x-icon" class="js-site-favicon" href="https://assets-cdn.github.com/favicon.ico">

<meta name="theme-color" content="#1e2327">



  </head>

  <body class="logged-out env-production page-blob">
    

  <div class="position-relative js-header-wrapper ">
    <a href="#start-of-content" tabindex="1" class="px-2 py-4 show-on-focus js-skip-to-content">Skip to content</a>
    <div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>

    
    
    



        <header class="Header header-logged-out  position-relative f4 py-3" role="banner">
  <div class="container-lg d-flex px-3">
    <div class="d-flex flex-justify-between flex-items-center">
      <a class="header-logo-invertocat my-0" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
        <svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
      </a>

    </div>

    <div class="HeaderMenu HeaderMenu--bright d-flex flex-justify-between flex-auto">
        <nav class="mt-0">
          <ul class="d-flex list-style-none">
              <li class="ml-2">
                <a href="/features" class="js-selected-navigation-item HeaderNavlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:features" data-selected-links="/features /features/project-management /features/code-review /features/project-management /features/integrations /features">
                  Features
</a>              </li>
              <li class="ml-4">
                <a href="/business" class="js-selected-navigation-item HeaderNavlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:business" data-selected-links="/business /business/security /business/customers /business">
                  Business
</a>              </li>

              <li class="ml-4">
                <a href="/explore" class="js-selected-navigation-item HeaderNavlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship showcases showcases_search showcases_landing /explore">
                  Explore
</a>              </li>

              <li class="ml-4">
                    <a href="/marketplace" class="js-selected-navigation-item HeaderNavlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:marketplace" data-selected-links=" /marketplace">
                      Marketplace
</a>              </li>
              <li class="ml-4">
                <a href="/pricing" class="js-selected-navigation-item HeaderNavlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:pricing" data-selected-links="/pricing /pricing/developer /pricing/team /pricing/business-hosted /pricing/business-enterprise /pricing">
                  Pricing
</a>              </li>
          </ul>
        </nav>

      <div class="d-flex">
          <div class="d-lg-flex flex-items-center mr-3">
            <div class="header-search scoped-search site-scoped-search js-site-search" role="search">
  <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/OpenELEC/wlan-firmware/search" class="js-site-search-form" data-scoped-search-url="/OpenELEC/wlan-firmware/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
    <label class="form-control header-search-wrapper js-chromeless-input-container">
        <a href="/OpenELEC/wlan-firmware/blob/master/firmware/brcm/nvram_ap6335.txt" class="header-search-scope no-underline">This repository</a>
      <input type="text"
        class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
        data-hotkey="s"
        name="q"
        value=""
        placeholder="Search"
        aria-label="Search this repository"
        data-unscoped-placeholder="Search GitHub"
        data-scoped-placeholder="Search"
        autocapitalize="off">
        <input type="hidden" class="js-site-search-type-field" name="type" >
    </label>
</form></div>

          </div>

        <span class="d-inline-block">
            <div class="HeaderNavlink px-0 py-2 m-0">
              <a class="text-bold text-white no-underline" href="/login?return_to=%2FOpenELEC%2Fwlan-firmware%2Fblob%2Fmaster%2Ffirmware%2Fbrcm%2Fnvram_ap6335.txt" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
                <span class="text-gray">or</span>
                <a class="text-bold text-white no-underline" href="/join?source=header-repo" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
            </div>
        </span>
      </div>
    </div>
  </div>
</header>

  </div>

  <div id="start-of-content" class="show-on-focus"></div>

    <div id="js-flash-container">
</div>



  <div role="main" >
        <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class="">
    <div id="js-repo-pjax-container" data-pjax-container >
      




  



  <div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav  ">
    <div class="repohead-details-container clearfix container">

      <ul class="pagehead-actions">
  <li>
      <a href="/login?return_to=%2FOpenELEC%2Fwlan-firmware"
    class="btn btn-sm btn-with-count tooltipped tooltipped-n"
    aria-label="You must be signed in to watch a repository" rel="nofollow">
    <svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
    Watch
  </a>
  <a class="social-count" href="/OpenELEC/wlan-firmware/watchers"
     aria-label="18 users are watching this repository">
    18
  </a>

  </li>

  <li>
      <a href="/login?return_to=%2FOpenELEC%2Fwlan-firmware"
    class="btn btn-sm btn-with-count tooltipped tooltipped-n"
    aria-label="You must be signed in to star a repository" rel="nofollow">
    <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
    Star
  </a>

    <a class="social-count js-social-count" href="/OpenELEC/wlan-firmware/stargazers"
      aria-label="25 users starred this repository">
      25
    </a>

  </li>

  <li>
      <a href="/login?return_to=%2FOpenELEC%2Fwlan-firmware"
        class="btn btn-sm btn-with-count tooltipped tooltipped-n"
        aria-label="You must be signed in to fork a repository" rel="nofollow">
        <svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
        Fork
      </a>

    <a href="/OpenELEC/wlan-firmware/network" class="social-count"
       aria-label="26 users forked this repository">
      26
    </a>
  </li>
</ul>

      <h1 class="public ">
  <svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg>
  <span class="author" itemprop="author"><a href="/OpenELEC" class="url fn" rel="author">OpenELEC</a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name"><a href="/OpenELEC/wlan-firmware" data-pjax="#js-repo-pjax-container">wlan-firmware</a></strong>

</h1>

    </div>
    
<nav class="reponav js-repo-nav js-sidenav-container-pjax container"
     itemscope
     itemtype="http://schema.org/BreadcrumbList"
     role="navigation"
     data-pjax="#js-repo-pjax-container">

  <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
    <a href="/OpenELEC/wlan-firmware" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages /OpenELEC/wlan-firmware" itemprop="url">
      <svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
      <span itemprop="name">Code</span>
      <meta itemprop="position" content="1">
</a>  </span>

    <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
      <a href="/OpenELEC/wlan-firmware/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /OpenELEC/wlan-firmware/issues" itemprop="url">
        <svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/></svg>
        <span itemprop="name">Issues</span>
        <span class="Counter">0</span>
        <meta itemprop="position" content="2">
</a>    </span>

  <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
    <a href="/OpenELEC/wlan-firmware/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /OpenELEC/wlan-firmware/pulls" itemprop="url">
      <svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
      <span itemprop="name">Pull requests</span>
      <span class="Counter">0</span>
      <meta itemprop="position" content="3">
</a>  </span>

    <a href="/OpenELEC/wlan-firmware/projects" class="js-selected-navigation-item reponav-item" data-hotkey="g b" data-selected-links="repo_projects new_repo_project repo_project /OpenELEC/wlan-firmware/projects">
      <svg aria-hidden="true" class="octicon octicon-project" height="16" version="1.1" viewBox="0 0 15 16" width="15"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
      Projects
      <span class="Counter" >0</span>
</a>


  <a href="/OpenELEC/wlan-firmware/pulse" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors dependency_graph pulse /OpenELEC/wlan-firmware/pulse">
    <svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg>
    Insights
</a>

</nav>


  </div>

<div class="container new-discussion-timeline experiment-repo-nav ">
  <div class="repository-content ">

    
  <a href="/OpenELEC/wlan-firmware/blob/3be9d8274352e36073c635991e7f29063bdf2c53/firmware/brcm/nvram_ap6335.txt" class="d-none js-permalink-shortcut" data-hotkey="y">Permalink</a>

  <!-- blob contrib key: blob_contributors:v21:2fbffccbca9e94b5406f269502fa8d21 -->

  <div class="file-navigation js-zeroclipboard-container">
    
<div class="select-menu branch-select-menu js-menu-container js-select-menu float-left">
  <button class=" btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w"
    
    type="button" aria-label="Switch branches or tags" aria-expanded="false" aria-haspopup="true">
      <i>Branch:</i>
      <span class="js-select-button css-truncate-target">master</span>
  </button>

  <div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax>

    <div class="select-menu-modal">
      <div class="select-menu-header">
        <svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
        <span class="select-menu-title">Switch branches/tags</span>
      </div>

      <div class="select-menu-filters">
        <div class="select-menu-text-filter">
          <input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="form-control js-filterable-field js-navigation-enable" placeholder="Filter branches/tags">
        </div>
        <div class="select-menu-tabs">
          <ul>
            <li class="select-menu-tab">
              <a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a>
            </li>
            <li class="select-menu-tab">
              <a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a>
            </li>
          </ul>
        </div>
      </div>

      <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu">

        <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">


            <a class="select-menu-item js-navigation-item js-navigation-open selected"
               href="/OpenELEC/wlan-firmware/blob/master/firmware/brcm/nvram_ap6335.txt"
               data-name="master"
               data-skip-pjax="true"
               rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
                master
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
               href="/OpenELEC/wlan-firmware/blob/rtl8723befw-firmware/firmware/brcm/nvram_ap6335.txt"
               data-name="rtl8723befw-firmware"
               data-skip-pjax="true"
               rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target js-select-menu-filter-text">
                rtl8723befw-firmware
              </span>
            </a>
        </div>

          <div class="select-menu-no-results">Nothing to show</div>
      </div>

      <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
        <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">


            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.31/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.31"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.31">
                0.0.31
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.30/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.30"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.30">
                0.0.30
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.29/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.29"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.29">
                0.0.29
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.28/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.28"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.28">
                0.0.28
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.27/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.27"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.27">
                0.0.27
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.26/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.26"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.26">
                0.0.26
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.25/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.25"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.25">
                0.0.25
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.24/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.24"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.24">
                0.0.24
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.23/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.23"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.23">
                0.0.23
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.22/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.22"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.22">
                0.0.22
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.21/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.21"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.21">
                0.0.21
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.20/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.20"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.20">
                0.0.20
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.19/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.19"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.19">
                0.0.19
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.18/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.18"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.18">
                0.0.18
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.17/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.17"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.17">
                0.0.17
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.16/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.16"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.16">
                0.0.16
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.15/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.15"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.15">
                0.0.15
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.14/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.14"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.14">
                0.0.14
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.13/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.13"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.13">
                0.0.13
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.12/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.12"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.12">
                0.0.12
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.11/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.11"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.11">
                0.0.11
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.10/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.10"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.10">
                0.0.10
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.9/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.9"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.9">
                0.0.9
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.8/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.8"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.8">
                0.0.8
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.7/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.7"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.7">
                0.0.7
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.6/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.6"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.6">
                0.0.6
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.5/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.5"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.5">
                0.0.5
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.4/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.4"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.4">
                0.0.4
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.3/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.3"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.3">
                0.0.3
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.2/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.2"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.2">
                0.0.2
              </span>
            </a>
            <a class="select-menu-item js-navigation-item js-navigation-open "
              href="/OpenELEC/wlan-firmware/tree/0.0.1/firmware/brcm/nvram_ap6335.txt"
              data-name="0.0.1"
              data-skip-pjax="true"
              rel="nofollow">
              <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
              <span class="select-menu-item-text css-truncate-target" title="0.0.1">
                0.0.1
              </span>
            </a>
        </div>

        <div class="select-menu-no-results">Nothing to show</div>
      </div>

    </div>
  </div>
</div>

    <div class="BtnGroup float-right">
      <a href="/OpenELEC/wlan-firmware/find/master"
            class="js-pjax-capture-input btn btn-sm BtnGroup-item"
            data-pjax
            data-hotkey="t">
        Find file
      </a>
      <button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm BtnGroup-item tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button>
    </div>
    <div class="breadcrumb js-zeroclipboard-target">
      <span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/OpenELEC/wlan-firmware"><span>wlan-firmware</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a href="/OpenELEC/wlan-firmware/tree/master/firmware"><span>firmware</span></a></span><span class="separator">/</span><span class="js-path-segment"><a href="/OpenELEC/wlan-firmware/tree/master/firmware/brcm"><span>brcm</span></a></span><span class="separator">/</span><strong class="final-path">nvram_ap6335.txt</strong>
    </div>
  </div>


  
  <div class="commit-tease">
      <span class="float-right">
        <a class="commit-tease-sha" href="/OpenELEC/wlan-firmware/commit/35e36956d7707fc86bbb48ed70ddb6289e2bbafd" data-pjax>
          35e3695
        </a>
        <relative-time datetime="2016-09-15T10:54:37Z">Sep 15, 2016</relative-time>
      </span>
      <div>
        <img alt="@sraue" class="avatar" height="20" src="https://avatars0.githubusercontent.com/u/306166?s=40&amp;v=4" width="20" />
        <a href="/sraue" class="user-mention" rel="contributor">sraue</a>
          <a href="/OpenELEC/wlan-firmware/commit/35e36956d7707fc86bbb48ed70ddb6289e2bbafd" class="message" data-pjax="true" title="add some amlogic brcm firmwares

Signed-off-by: Stephan Raue &lt;stephan@openelec.tv&gt;">add some amlogic brcm firmwares</a>
      </div>

    <div class="commit-tease-contributors">
      <button type="button" class="btn-link muted-link contributors-toggle" data-facebox="#blob_contributors_box">
        <strong>1</strong>
         contributor
      </button>
      
    </div>

    <div id="blob_contributors_box" style="display:none">
      <h2 class="facebox-header" data-facebox-id="facebox-header">Users who have contributed to this file</h2>
      <ul class="facebox-user-list" data-facebox-id="facebox-description">
          <li class="facebox-user-list-item">
            <img alt="@sraue" height="24" src="https://avatars1.githubusercontent.com/u/306166?s=48&amp;v=4" width="24" />
            <a href="/sraue">sraue</a>
          </li>
      </ul>
    </div>
  </div>


  <div class="file">
    <div class="file-header">
  <div class="file-actions">

    <div class="BtnGroup">
      <a href="/OpenELEC/wlan-firmware/raw/master/firmware/brcm/nvram_ap6335.txt" class="btn btn-sm BtnGroup-item" id="raw-url">Raw</a>
        <a href="/OpenELEC/wlan-firmware/blame/master/firmware/brcm/nvram_ap6335.txt" class="btn btn-sm js-update-url-with-hash BtnGroup-item" data-hotkey="b">Blame</a>
      <a href="/OpenELEC/wlan-firmware/commits/master/firmware/brcm/nvram_ap6335.txt" class="btn btn-sm BtnGroup-item" rel="nofollow">History</a>
    </div>


        <button type="button" class="btn-octicon disabled tooltipped tooltipped-nw"
          aria-label="You must be signed in to make or propose changes">
          <svg aria-hidden="true" class="octicon octicon-pencil" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"/></svg>
        </button>
        <button type="button" class="btn-octicon btn-octicon-danger disabled tooltipped tooltipped-nw"
          aria-label="You must be signed in to make or propose changes">
          <svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"/></svg>
        </button>
  </div>

  <div class="file-info">
      100 lines (99 sloc)
      <span class="file-info-divider"></span>
    2.32 KB
  </div>
</div>

    

  <div itemprop="text" class="blob-wrapper data type-text">
      <table class="highlight tab-size js-file-line-container" data-tab-size="8">
      <tr>
        <td id="L1" class="blob-num js-line-number" data-line-number="1"></td>
        <td id="LC1" class="blob-code blob-code-inner js-file-line">#AP6335_NVRAM_V1.5_03112014</td>
      </tr>
      <tr>
        <td id="L2" class="blob-num js-line-number" data-line-number="2"></td>
        <td id="LC2" class="blob-code blob-code-inner js-file-line">NVRAMRev=$Rev: 410316 $
</td>
      </tr>
      <tr>
        <td id="L3" class="blob-num js-line-number" data-line-number="3"></td>
        <td id="LC3" class="blob-code blob-code-inner js-file-line">sromrev=11
</td>
      </tr>
      <tr>
        <td id="L4" class="blob-num js-line-number" data-line-number="4"></td>
        <td id="LC4" class="blob-code blob-code-inner js-file-line">boardrev=0x1203
</td>
      </tr>
      <tr>
        <td id="L5" class="blob-num js-line-number" data-line-number="5"></td>
        <td id="LC5" class="blob-code blob-code-inner js-file-line">boardtype=0x06c5
</td>
      </tr>
      <tr>
        <td id="L6" class="blob-num js-line-number" data-line-number="6"></td>
        <td id="LC6" class="blob-code blob-code-inner js-file-line">boardflags=0x00000c01
</td>
      </tr>
      <tr>
        <td id="L7" class="blob-num js-line-number" data-line-number="7"></td>
        <td id="LC7" class="blob-code blob-code-inner js-file-line">boardflags2=0x00002000
</td>
      </tr>
      <tr>
        <td id="L8" class="blob-num js-line-number" data-line-number="8"></td>
        <td id="LC8" class="blob-code blob-code-inner js-file-line">boardflags3=0x8101188
</td>
      </tr>
      <tr>
        <td id="L9" class="blob-num js-line-number" data-line-number="9"></td>
        <td id="LC9" class="blob-code blob-code-inner js-file-line">macaddr=00:90:4c:c5:12:38
</td>
      </tr>
      <tr>
        <td id="L10" class="blob-num js-line-number" data-line-number="10"></td>
        <td id="LC10" class="blob-code blob-code-inner js-file-line">ccode=0
</td>
      </tr>
      <tr>
        <td id="L11" class="blob-num js-line-number" data-line-number="11"></td>
        <td id="LC11" class="blob-code blob-code-inner js-file-line">regrev=0
</td>
      </tr>
      <tr>
        <td id="L12" class="blob-num js-line-number" data-line-number="12"></td>
        <td id="LC12" class="blob-code blob-code-inner js-file-line">antswitch=0
</td>
      </tr>
      <tr>
        <td id="L13" class="blob-num js-line-number" data-line-number="13"></td>
        <td id="LC13" class="blob-code blob-code-inner js-file-line">pdgain2g=7
</td>
      </tr>
      <tr>
        <td id="L14" class="blob-num js-line-number" data-line-number="14"></td>
        <td id="LC14" class="blob-code blob-code-inner js-file-line">pdgain5g=7
</td>
      </tr>
      <tr>
        <td id="L15" class="blob-num js-line-number" data-line-number="15"></td>
        <td id="LC15" class="blob-code blob-code-inner js-file-line">tworangetssi2g=0
</td>
      </tr>
      <tr>
        <td id="L16" class="blob-num js-line-number" data-line-number="16"></td>
        <td id="LC16" class="blob-code blob-code-inner js-file-line">tworangetssi5g=0
</td>
      </tr>
      <tr>
        <td id="L17" class="blob-num js-line-number" data-line-number="17"></td>
        <td id="LC17" class="blob-code blob-code-inner js-file-line">femctrl=7
</td>
      </tr>
      <tr>
        <td id="L18" class="blob-num js-line-number" data-line-number="18"></td>
        <td id="LC18" class="blob-code blob-code-inner js-file-line">pcieingress_war=15
</td>
      </tr>
      <tr>
        <td id="L19" class="blob-num js-line-number" data-line-number="19"></td>
        <td id="LC19" class="blob-code blob-code-inner js-file-line">vendid=0x14e4
</td>
      </tr>
      <tr>
        <td id="L20" class="blob-num js-line-number" data-line-number="20"></td>
        <td id="LC20" class="blob-code blob-code-inner js-file-line">devid=0x43ae
</td>
      </tr>
      <tr>
        <td id="L21" class="blob-num js-line-number" data-line-number="21"></td>
        <td id="LC21" class="blob-code blob-code-inner js-file-line">manfid=0x2d0
</td>
      </tr>
      <tr>
        <td id="L22" class="blob-num js-line-number" data-line-number="22"></td>
        <td id="LC22" class="blob-code blob-code-inner js-file-line">nocrc=1
</td>
      </tr>
      <tr>
        <td id="L23" class="blob-num js-line-number" data-line-number="23"></td>
        <td id="LC23" class="blob-code blob-code-inner js-file-line">otpimagesize=502
</td>
      </tr>
      <tr>
        <td id="L24" class="blob-num js-line-number" data-line-number="24"></td>
        <td id="LC24" class="blob-code blob-code-inner js-file-line">xtalfreq=37400
</td>
      </tr>
      <tr>
        <td id="L25" class="blob-num js-line-number" data-line-number="25"></td>
        <td id="LC25" class="blob-code blob-code-inner js-file-line">extpagain2g=2
</td>
      </tr>
      <tr>
        <td id="L26" class="blob-num js-line-number" data-line-number="26"></td>
        <td id="LC26" class="blob-code blob-code-inner js-file-line">pdetrange2g=2
</td>
      </tr>
      <tr>
        <td id="L27" class="blob-num js-line-number" data-line-number="27"></td>
        <td id="LC27" class="blob-code blob-code-inner js-file-line">extpagain5g=2
</td>
      </tr>
      <tr>
        <td id="L28" class="blob-num js-line-number" data-line-number="28"></td>
        <td id="LC28" class="blob-code blob-code-inner js-file-line">pdetrange5g=2
</td>
      </tr>
      <tr>
        <td id="L29" class="blob-num js-line-number" data-line-number="29"></td>
        <td id="LC29" class="blob-code blob-code-inner js-file-line">rxgains2gelnagaina0=0
</td>
      </tr>
      <tr>
        <td id="L30" class="blob-num js-line-number" data-line-number="30"></td>
        <td id="LC30" class="blob-code blob-code-inner js-file-line">rxgains2gtrisoa0=7
</td>
      </tr>
      <tr>
        <td id="L31" class="blob-num js-line-number" data-line-number="31"></td>
        <td id="LC31" class="blob-code blob-code-inner js-file-line">rxgains2gtrelnabypa0=0
</td>
      </tr>
      <tr>
        <td id="L32" class="blob-num js-line-number" data-line-number="32"></td>
        <td id="LC32" class="blob-code blob-code-inner js-file-line">rxgains5gelnagaina0=0
</td>
      </tr>
      <tr>
        <td id="L33" class="blob-num js-line-number" data-line-number="33"></td>
        <td id="LC33" class="blob-code blob-code-inner js-file-line">rxgains5gtrisoa0=11
</td>
      </tr>
      <tr>
        <td id="L34" class="blob-num js-line-number" data-line-number="34"></td>
        <td id="LC34" class="blob-code blob-code-inner js-file-line">rxgains5gtrelnabypa0=0
</td>
      </tr>
      <tr>
        <td id="L35" class="blob-num js-line-number" data-line-number="35"></td>
        <td id="LC35" class="blob-code blob-code-inner js-file-line">rxchain=1
</td>
      </tr>
      <tr>
        <td id="L36" class="blob-num js-line-number" data-line-number="36"></td>
        <td id="LC36" class="blob-code blob-code-inner js-file-line">txchain=1
</td>
      </tr>
      <tr>
        <td id="L37" class="blob-num js-line-number" data-line-number="37"></td>
        <td id="LC37" class="blob-code blob-code-inner js-file-line">aa2g=1
</td>
      </tr>
      <tr>
        <td id="L38" class="blob-num js-line-number" data-line-number="38"></td>
        <td id="LC38" class="blob-code blob-code-inner js-file-line">aa5g=1
</td>
      </tr>
      <tr>
        <td id="L39" class="blob-num js-line-number" data-line-number="39"></td>
        <td id="LC39" class="blob-code blob-code-inner js-file-line">tssipos5g=0
</td>
      </tr>
      <tr>
        <td id="L40" class="blob-num js-line-number" data-line-number="40"></td>
        <td id="LC40" class="blob-code blob-code-inner js-file-line">tssipos2g=0
</td>
      </tr>
      <tr>
        <td id="L41" class="blob-num js-line-number" data-line-number="41"></td>
        <td id="LC41" class="blob-code blob-code-inner js-file-line">pa2ga0=-161,6269,-723
</td>
      </tr>
      <tr>
        <td id="L42" class="blob-num js-line-number" data-line-number="42"></td>
        <td id="LC42" class="blob-code blob-code-inner js-file-line">pa2gccka0=-116,7568,-852
</td>
      </tr>
      <tr>
        <td id="L43" class="blob-num js-line-number" data-line-number="43"></td>
        <td id="LC43" class="blob-code blob-code-inner js-file-line">pa5ga0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
</td>
      </tr>
      <tr>
        <td id="L44" class="blob-num js-line-number" data-line-number="44"></td>
        <td id="LC44" class="blob-code blob-code-inner js-file-line">pa5gbw40a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
</td>
      </tr>
      <tr>
        <td id="L45" class="blob-num js-line-number" data-line-number="45"></td>
        <td id="LC45" class="blob-code blob-code-inner js-file-line">pa5gbw80a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D
</td>
      </tr>
      <tr>
        <td id="L46" class="blob-num js-line-number" data-line-number="46"></td>
        <td id="LC46" class="blob-code blob-code-inner js-file-line">pdoffset40ma0=0
</td>
      </tr>
      <tr>
        <td id="L47" class="blob-num js-line-number" data-line-number="47"></td>
        <td id="LC47" class="blob-code blob-code-inner js-file-line">pdoffset80ma0=0
</td>
      </tr>
      <tr>
        <td id="L48" class="blob-num js-line-number" data-line-number="48"></td>
        <td id="LC48" class="blob-code blob-code-inner js-file-line">pdoffsetcckma0=0
</td>
      </tr>
      <tr>
        <td id="L49" class="blob-num js-line-number" data-line-number="49"></td>
        <td id="LC49" class="blob-code blob-code-inner js-file-line">maxp2ga0=75
</td>
      </tr>
      <tr>
        <td id="L50" class="blob-num js-line-number" data-line-number="50"></td>
        <td id="LC50" class="blob-code blob-code-inner js-file-line">maxp5ga0=64,64,72,72
</td>
      </tr>
      <tr>
        <td id="L51" class="blob-num js-line-number" data-line-number="51"></td>
        <td id="LC51" class="blob-code blob-code-inner js-file-line">cckbw202gpo=0x0000
</td>
      </tr>
      <tr>
        <td id="L52" class="blob-num js-line-number" data-line-number="52"></td>
        <td id="LC52" class="blob-code blob-code-inner js-file-line">cckbw20ul2gpo=0x0
</td>
      </tr>
      <tr>
        <td id="L53" class="blob-num js-line-number" data-line-number="53"></td>
        <td id="LC53" class="blob-code blob-code-inner js-file-line">mcsbw202gpo=0x99445533
</td>
      </tr>
      <tr>
        <td id="L54" class="blob-num js-line-number" data-line-number="54"></td>
        <td id="LC54" class="blob-code blob-code-inner js-file-line">mcsbw402gpo=0x99775533
</td>
      </tr>
      <tr>
        <td id="L55" class="blob-num js-line-number" data-line-number="55"></td>
        <td id="LC55" class="blob-code blob-code-inner js-file-line">dot11agofdmhrbw202gpo=0x2233
</td>
      </tr>
      <tr>
        <td id="L56" class="blob-num js-line-number" data-line-number="56"></td>
        <td id="LC56" class="blob-code blob-code-inner js-file-line">ofdmlrbw202gpo=0x0000
</td>
      </tr>
      <tr>
        <td id="L57" class="blob-num js-line-number" data-line-number="57"></td>
        <td id="LC57" class="blob-code blob-code-inner js-file-line">tssifloor2g=500
</td>
      </tr>
      <tr>
        <td id="L58" class="blob-num js-line-number" data-line-number="58"></td>
        <td id="LC58" class="blob-code blob-code-inner js-file-line">mcsbw205glpo=0x66333330
</td>
      </tr>
      <tr>
        <td id="L59" class="blob-num js-line-number" data-line-number="59"></td>
        <td id="LC59" class="blob-code blob-code-inner js-file-line">mcsbw405glpo=0x66665530
</td>
      </tr>
      <tr>
        <td id="L60" class="blob-num js-line-number" data-line-number="60"></td>
        <td id="LC60" class="blob-code blob-code-inner js-file-line">mcsbw805glpo=0xAA555530
</td>
      </tr>
      <tr>
        <td id="L61" class="blob-num js-line-number" data-line-number="61"></td>
        <td id="LC61" class="blob-code blob-code-inner js-file-line">mcsbw1605glpo=0x99555530
</td>
      </tr>
      <tr>
        <td id="L62" class="blob-num js-line-number" data-line-number="62"></td>
        <td id="LC62" class="blob-code blob-code-inner js-file-line">mcsbw205gmpo=0x99BB5530
</td>
      </tr>
      <tr>
        <td id="L63" class="blob-num js-line-number" data-line-number="63"></td>
        <td id="LC63" class="blob-code blob-code-inner js-file-line">mcsbw405gmpo=0x99BB5530
</td>
      </tr>
      <tr>
        <td id="L64" class="blob-num js-line-number" data-line-number="64"></td>
        <td id="LC64" class="blob-code blob-code-inner js-file-line">mcsbw805gmpo=0xEE555530
</td>
      </tr>
      <tr>
        <td id="L65" class="blob-num js-line-number" data-line-number="65"></td>
        <td id="LC65" class="blob-code blob-code-inner js-file-line">mcsbw1605gmpo=0x99555530
</td>
      </tr>
      <tr>
        <td id="L66" class="blob-num js-line-number" data-line-number="66"></td>
        <td id="LC66" class="blob-code blob-code-inner js-file-line">mcsbw205ghpo=0x99995530
</td>
      </tr>
      <tr>
        <td id="L67" class="blob-num js-line-number" data-line-number="67"></td>
        <td id="LC67" class="blob-code blob-code-inner js-file-line">mcsbw405ghpo=0x99BB5530
</td>
      </tr>
      <tr>
        <td id="L68" class="blob-num js-line-number" data-line-number="68"></td>
        <td id="LC68" class="blob-code blob-code-inner js-file-line">mcsbw805ghpo=0xEE555530
</td>
      </tr>
      <tr>
        <td id="L69" class="blob-num js-line-number" data-line-number="69"></td>
        <td id="LC69" class="blob-code blob-code-inner js-file-line">mcsbw1605ghpo=0x99555530
</td>
      </tr>
      <tr>
        <td id="L70" class="blob-num js-line-number" data-line-number="70"></td>
        <td id="LC70" class="blob-code blob-code-inner js-file-line">mcslr5glpo=0x0000
</td>
      </tr>
      <tr>
        <td id="L71" class="blob-num js-line-number" data-line-number="71"></td>
        <td id="LC71" class="blob-code blob-code-inner js-file-line">mcslr5gmpo=0x0000
</td>
      </tr>
      <tr>
        <td id="L72" class="blob-num js-line-number" data-line-number="72"></td>
        <td id="LC72" class="blob-code blob-code-inner js-file-line">mcslr5ghpo=0x0000
</td>
      </tr>
      <tr>
        <td id="L73" class="blob-num js-line-number" data-line-number="73"></td>
        <td id="LC73" class="blob-code blob-code-inner js-file-line">sb20in40hrrpo=0x0
</td>
      </tr>
      <tr>
        <td id="L74" class="blob-num js-line-number" data-line-number="74"></td>
        <td id="LC74" class="blob-code blob-code-inner js-file-line">sb20in80and160hr5glpo=0x0
</td>
      </tr>
      <tr>
        <td id="L75" class="blob-num js-line-number" data-line-number="75"></td>
        <td id="LC75" class="blob-code blob-code-inner js-file-line">sb40and80hr5glpo=0x0
</td>
      </tr>
      <tr>
        <td id="L76" class="blob-num js-line-number" data-line-number="76"></td>
        <td id="LC76" class="blob-code blob-code-inner js-file-line">sb20in80and160hr5gmpo=0x0
</td>
      </tr>
      <tr>
        <td id="L77" class="blob-num js-line-number" data-line-number="77"></td>
        <td id="LC77" class="blob-code blob-code-inner js-file-line">sb40and80hr5gmpo=0x0
</td>
      </tr>
      <tr>
        <td id="L78" class="blob-num js-line-number" data-line-number="78"></td>
        <td id="LC78" class="blob-code blob-code-inner js-file-line">sb20in80and160hr5ghpo=0x0
</td>
      </tr>
      <tr>
        <td id="L79" class="blob-num js-line-number" data-line-number="79"></td>
        <td id="LC79" class="blob-code blob-code-inner js-file-line">sb40and80hr5ghpo=0x0
</td>
      </tr>
      <tr>
        <td id="L80" class="blob-num js-line-number" data-line-number="80"></td>
        <td id="LC80" class="blob-code blob-code-inner js-file-line">sb20in40lrpo=0x0
</td>
      </tr>
      <tr>
        <td id="L81" class="blob-num js-line-number" data-line-number="81"></td>
        <td id="LC81" class="blob-code blob-code-inner js-file-line">sb20in80and160lr5glpo=0x0
</td>
      </tr>
      <tr>
        <td id="L82" class="blob-num js-line-number" data-line-number="82"></td>
        <td id="LC82" class="blob-code blob-code-inner js-file-line">sb40and80lr5glpo=0x0
</td>
      </tr>
      <tr>
        <td id="L83" class="blob-num js-line-number" data-line-number="83"></td>
        <td id="LC83" class="blob-code blob-code-inner js-file-line">sb20in80and160lr5gmpo=0x0
</td>
      </tr>
      <tr>
        <td id="L84" class="blob-num js-line-number" data-line-number="84"></td>
        <td id="LC84" class="blob-code blob-code-inner js-file-line">sb40and80lr5gmpo=0x0
</td>
      </tr>
      <tr>
        <td id="L85" class="blob-num js-line-number" data-line-number="85"></td>
        <td id="LC85" class="blob-code blob-code-inner js-file-line">sb20in80and160lr5ghpo=0x0
</td>
      </tr>
      <tr>
        <td id="L86" class="blob-num js-line-number" data-line-number="86"></td>
        <td id="LC86" class="blob-code blob-code-inner js-file-line">sb40and80lr5ghpo=0x0
</td>
      </tr>
      <tr>
        <td id="L87" class="blob-num js-line-number" data-line-number="87"></td>
        <td id="LC87" class="blob-code blob-code-inner js-file-line">dot11agduphrpo=0x0
</td>
      </tr>
      <tr>
        <td id="L88" class="blob-num js-line-number" data-line-number="88"></td>
        <td id="LC88" class="blob-code blob-code-inner js-file-line">dot11agduplrpo=0x0
</td>
      </tr>
      <tr>
        <td id="L89" class="blob-num js-line-number" data-line-number="89"></td>
        <td id="LC89" class="blob-code blob-code-inner js-file-line">phycal_tempdelta=25
</td>
      </tr>
      <tr>
        <td id="L90" class="blob-num js-line-number" data-line-number="90"></td>
        <td id="LC90" class="blob-code blob-code-inner js-file-line">cckdigfilttype=2
</td>
      </tr>
      <tr>
        <td id="L91" class="blob-num js-line-number" data-line-number="91"></td>
        <td id="LC91" class="blob-code blob-code-inner js-file-line">pacalidx2g=65
</td>
      </tr>
      <tr>
        <td id="L92" class="blob-num js-line-number" data-line-number="92"></td>
        <td id="LC92" class="blob-code blob-code-inner js-file-line">dacrate2g=160
</td>
      </tr>
      <tr>
        <td id="L93" class="blob-num js-line-number" data-line-number="93"></td>
        <td id="LC93" class="blob-code blob-code-inner js-file-line">swctrlmap_5g=0x00000008,0x00000010,0x00000008,0x000000,0x038
</td>
      </tr>
      <tr>
        <td id="L94" class="blob-num js-line-number" data-line-number="94"></td>
        <td id="LC94" class="blob-code blob-code-inner js-file-line">swctrlmap_2g=0x00000001,0x00000002,0x00000001,0x040002,0x0ff
</td>
      </tr>
      <tr>
        <td id="L95" class="blob-num js-line-number" data-line-number="95"></td>
        <td id="LC95" class="blob-code blob-code-inner js-file-line">swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
</td>
      </tr>
      <tr>
        <td id="L96" class="blob-num js-line-number" data-line-number="96"></td>
        <td id="LC96" class="blob-code blob-code-inner js-file-line">swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000
</td>
      </tr>
      <tr>
        <td id="L97" class="blob-num js-line-number" data-line-number="97"></td>
        <td id="LC97" class="blob-code blob-code-inner js-file-line">rssicorrnorm_c0=3,3
</td>
      </tr>
      <tr>
        <td id="L98" class="blob-num js-line-number" data-line-number="98"></td>
        <td id="LC98" class="blob-code blob-code-inner js-file-line">rssicorrnorm5g_c0=2,3,4,2,3,3,0,1,2,0,1,2</td>
      </tr>
      <tr>
        <td id="L99" class="blob-num js-line-number" data-line-number="99"></td>
        <td id="LC99" class="blob-code blob-code-inner js-file-line">muxenab=0x10
</td>
      </tr>
</table>

  <div class="BlobToolbar position-absolute js-file-line-actions dropdown js-menu-container js-select-menu d-none" aria-hidden="true">
    <button class="btn-octicon ml-0 px-2 p-0 bg-white border border-gray-dark rounded-1 dropdown-toggle js-menu-target" id="js-file-line-action-button" type="button" aria-expanded="false" aria-haspopup="true" aria-label="Inline file action toolbar" aria-controls="inline-file-actions">
      <svg aria-hidden="true" class="octicon octicon-kebab-horizontal" height="16" version="1.1" viewBox="0 0 13 16" width="13"><path fill-rule="evenodd" d="M1.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/></svg>
    </button>
    <div class="dropdown-menu-content js-menu-content" id="inline-file-actions">
      <ul class="BlobToolbar-dropdown dropdown-menu dropdown-menu-se mt-2">
        <li><a class="js-zeroclipboard dropdown-item" style="cursor:pointer;" id="js-copy-lines" data-original-text="Copy lines">Copy lines</a></li>
        <li><a class="js-zeroclipboard dropdown-item" id= "js-copy-permalink" style="cursor:pointer;" data-original-text="Copy permalink">Copy permalink</a></li>
        <li><a href="/OpenELEC/wlan-firmware/blame/3be9d8274352e36073c635991e7f29063bdf2c53/firmware/brcm/nvram_ap6335.txt" class="dropdown-item js-update-url-with-hash" id="js-view-git-blame">View git blame</a></li>
          <li><a href="/OpenELEC/wlan-firmware/issues/new" class="dropdown-item" id="js-new-issue">Open new issue</a></li>
      </ul>
    </div>
  </div>

  </div>

  </div>

  <button type="button" data-facebox="#jump-to-line" data-facebox-class="linejump" data-hotkey="l" class="d-none">Jump to Line</button>
  <div id="jump-to-line" style="display:none">
    <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
      <input class="form-control linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line&hellip;" aria-label="Jump to line" autofocus>
      <button type="submit" class="btn">Go</button>
</form>  </div>


  </div>
  <div class="modal-backdrop js-touch-events"></div>
</div>

    </div>
  </div>

  </div>

      
<div class="footer container-lg px-3" role="contentinfo">
  <div class="position-relative d-flex flex-justify-between py-6 mt-6 f6 text-gray border-top border-gray-light ">
    <ul class="list-style-none d-flex flex-wrap ">
      <li class="mr-3">&copy; 2018 <span title="0.12270s from unicorn-311687902-6q6rv">GitHub</span>, Inc.</li>
        <li class="mr-3"><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
        <li class="mr-3"><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
        <li class="mr-3"><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
        <li class="mr-3"><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
        <li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
    </ul>

    <a href="https://github.com" aria-label="Homepage" class="footer-octicon" title="GitHub">
      <svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
</a>
    <ul class="list-style-none d-flex flex-wrap ">
        <li class="mr-3"><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
      <li class="mr-3"><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
      <li class="mr-3"><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
      <li class="mr-3"><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
        <li class="mr-3"><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
        <li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>

    </ul>
  </div>
</div>



  <div id="ajax-error-message" class="ajax-error-message flash flash-error">
    <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
    <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
      <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
    </button>
    You can't perform that action at this time.
  </div>


    <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/compat-2339acd4bcb939ffb8168786ea2970b341723088c55b776a8b58a99962692f05.js"></script>
    <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-02920776e68ff3d8a92fedaed18330d138c2c201239ebfe4d1b25cbefebe9d1d.js"></script>
    
    <script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-5b6f30e918ac3a67fab0ed33e6efbfd41e68ee83429d60000c5c04668c7477fb.js"></script>
    
    
    
    
  <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
    <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
    <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
    <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
  </div>
  <div class="facebox" id="facebox" style="display:none;">
  <div class="facebox-popup">
    <div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
    </div>
    <button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
      <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
    </button>
  </div>
</div>


  </body>
</html>
Arend van Spriel Jan. 19, 2018, 9:02 a.m. UTC | #11
On 1/18/2018 12:47 PM, Vanessa Maegima wrote:
> Hi Arend,
>
> On Ter, 2018-01-16 at 21:21 +0100, Arend van Spriel wrote:
>> On 1/15/2018 9:08 PM, Fabio Estevam wrote:
>>>
>>> Hi Arend,
>>>
>>> On Tue, Dec 5, 2017 at 12:58 PM, Vanessa Maegima
>>> <vanessa.maegima@nxp.com> wrote:
>>>
>>>>
>>>> Hi Arend,
>>>>
>>>> Sorry for this!
>>>>
>>>> I updated the folder on https://emea01.safelinks.protection.outlo
>>>> ok.com/?url=https%3A%2F%2Fdrive.google.com%2Fdrive%2Ffolders%2F1f
>>>> osahjL&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cf07cd1a6ffb34c0
>>>> 961f608d55d1eb901%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63
>>>> 6517308901643244&sdata=6JAqSN%2BVPJ%2FCF7cbnBjm8geMKWydWkG9JcUhGB
>>>> Pj644%3D&reserved=0
>>>> N1KI5NKS59_aPZdHLpENPFHtK
>>>>
>>>> Thanks!
>>> Any ideas, please?
>> Well, the dumps confirm a crash early in the firmware boot. However,
>> I
>> could not obtain more information from it. To capture the failure I
>> need
>> to rework some firmware functionality which is not trivial and I can
>> not
>> claim time for it right now.
>>
>> Regards,
>> Arend
>>
>
> Thanks for all your investigation here!
>
> I just want to report one more thing that I noticed from my tests.
>
> I have tried to use an html file that I downloaded using wget as the
> nvram file (https://github.com/OpenELEC/wlan-firmware/blob/master/firmw
> are/brcm/nvram_ap6335.txt) and the wifi seems to work. I have not
> noticed the wrong format file until testing it.

Interesting. In brcmfmac the file is parsed before sending it to the 
firmware so I am wondering what is effectively send to the device.

Can you dump the nvram that is sent to the device. Just add hexdump call 
of nvram in brcmf_fw_request_nvram_done() in firmware.c just before 
fwctx->done() is called.

Regards,
Arend
Vanessa Maegima March 21, 2018, 3:38 p.m. UTC | #12
Hi Arend,

On Sex, 2018-01-19 at 10:02 +0100, Arend van Spriel wrote:
> On 1/18/2018 12:47 PM, Vanessa Maegima wrote:

> > 

> > Hi Arend,

> > 

> > On Ter, 2018-01-16 at 21:21 +0100, Arend van Spriel wrote:

> > > 

> > > On 1/15/2018 9:08 PM, Fabio Estevam wrote:

> > > > 

> > > > 

> > > > Hi Arend,

> > > > 

> > > > On Tue, Dec 5, 2017 at 12:58 PM, Vanessa Maegima

> > > > <vanessa.maegima@nxp.com> wrote:

> > > > 

> > > > > 

> > > > > 

> > > > > Hi Arend,

> > > > > 

> > > > > Sorry for this!

> > > > > 

> > > > > I updated the folder on https://emea01.safelinks.protection.o

> > > > > utlook.com/?url=https%3A%2F%2Femea01.safelinks.protection.out

> > > > > lo&data=02%7C01%7Cvanessa.maegima%40nxp.com%7C39040229475441d

> > > > > 7b5aa08d55f1b6cd3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%

> > > > > 7C636519493755298348&sdata=Zws4AElm4La96Q4pjK152nH2lP6v4mPJJN

> > > > > xSGz7TLBA%3D&reserved=0

> > > > > ok.com/?url=https%3A%2F%2Fdrive.google.com%2Fdrive%2Ffolders%

> > > > > 2F1f

> > > > > osahjL&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cf07cd1a6ffb

> > > > > 34c0

> > > > > 961f608d55d1eb901%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%

> > > > > 7C63

> > > > > 6517308901643244&sdata=6JAqSN%2BVPJ%2FCF7cbnBjm8geMKWydWkG9Jc

> > > > > UhGB

> > > > > Pj644%3D&reserved=0

> > > > > N1KI5NKS59_aPZdHLpENPFHtK

> > > > > 

> > > > > Thanks!

> > > > Any ideas, please?

> > > Well, the dumps confirm a crash early in the firmware boot.

> > > However,

> > > I

> > > could not obtain more information from it. To capture the failure

> > > I

> > > need

> > > to rework some firmware functionality which is not trivial and I

> > > can

> > > not

> > > claim time for it right now.

> > > 

> > > Regards,

> > > Arend

> > > 

> > Thanks for all your investigation here!

> > 

> > I just want to report one more thing that I noticed from my tests.

> > 

> > I have tried to use an html file that I downloaded using wget as

> > the

> > nvram file (https://emea01.safelinks.protection.outlook.com/?url=ht

> > tps%3A%2F%2Fgithub.com%2FOpenELEC%2Fwlan-

> > firmware%2Fblob%2Fmaster%2Ffirmw&data=02%7C01%7Cvanessa.maegima%40n

> > xp.com%7C39040229475441d7b5aa08d55f1b6cd3%7C686ea1d3bc2b4c6fa92cd99

> > c5c301635%7C0%7C1%7C636519493755298348&sdata=EZFVV3qbStjH9Eqe6uVVXJ

> > f7LmQlMLIURXHaQIMIpms%3D&reserved=0

> > are/brcm/nvram_ap6335.txt) and the wifi seems to work. I have not

> > noticed the wrong format file until testing it.

> Interesting. In brcmfmac the file is parsed before sending it to the 

> firmware so I am wondering what is effectively send to the device.

> 

> Can you dump the nvram that is sent to the device. Just add hexdump

> call 

> of nvram in brcmf_fw_request_nvram_done() in firmware.c just before 

> fwctx->done() is called.

> 

> Regards,

> Arend


Sorry for my delayed response, but I could not get the hexdump from the
nvram. I have tried several hexdump functions I found on kernel and on
the brcmfmac driver but none of them printed any output.

Is there any CONFIG I need to enable to get those working?

Thanks!

Best,
Vanessa
Arend van Spriel March 23, 2018, 9:28 a.m. UTC | #13
On 3/21/2018 4:38 PM, Vanessa Maegima wrote:
> Hi Arend,
>
> On Sex, 2018-01-19 at 10:02 +0100, Arend van Spriel wrote:
>> On 1/18/2018 12:47 PM, Vanessa Maegima wrote:
>>>
>>> Hi Arend,
>>>
>>> On Ter, 2018-01-16 at 21:21 +0100, Arend van Spriel wrote:
>>>>
>>>> On 1/15/2018 9:08 PM, Fabio Estevam wrote:
>>>>>
>>>>>
>>>>> Hi Arend,
>>>>>
>>>>> On Tue, Dec 5, 2017 at 12:58 PM, Vanessa Maegima
>>>>> <vanessa.maegima@nxp.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Arend,
>>>>>>
>>>>>> Sorry for this!
>>>>>>
>>>>>> I updated the folder on https://emea01.safelinks.protection.o
>>>>>> utlook.com/?url=https%3A%2F%2Femea01.safelinks.protection.out
>>>>>> lo&data=02%7C01%7Cvanessa.maegima%40nxp.com%7C39040229475441d
>>>>>> 7b5aa08d55f1b6cd3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%
>>>>>> 7C636519493755298348&sdata=Zws4AElm4La96Q4pjK152nH2lP6v4mPJJN
>>>>>> xSGz7TLBA%3D&reserved=0
>>>>>> ok.com/?url=https%3A%2F%2Fdrive.google.com%2Fdrive%2Ffolders%
>>>>>> 2F1f
>>>>>> osahjL&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cf07cd1a6ffb
>>>>>> 34c0
>>>>>> 961f608d55d1eb901%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%
>>>>>> 7C63
>>>>>> 6517308901643244&sdata=6JAqSN%2BVPJ%2FCF7cbnBjm8geMKWydWkG9Jc
>>>>>> UhGB
>>>>>> Pj644%3D&reserved=0
>>>>>> N1KI5NKS59_aPZdHLpENPFHtK
>>>>>>
>>>>>> Thanks!
>>>>> Any ideas, please?
>>>> Well, the dumps confirm a crash early in the firmware boot.
>>>> However,
>>>> I
>>>> could not obtain more information from it. To capture the failure
>>>> I
>>>> need
>>>> to rework some firmware functionality which is not trivial and I
>>>> can
>>>> not
>>>> claim time for it right now.
>>>>
>>>> Regards,
>>>> Arend
>>>>
>>> Thanks for all your investigation here!
>>>
>>> I just want to report one more thing that I noticed from my tests.
>>>
>>> I have tried to use an html file that I downloaded using wget as
>>> the
>>> nvram file (https://emea01.safelinks.protection.outlook.com/?url=ht
>>> tps%3A%2F%2Fgithub.com%2FOpenELEC%2Fwlan-
>>> firmware%2Fblob%2Fmaster%2Ffirmw&data=02%7C01%7Cvanessa.maegima%40n
>>> xp.com%7C39040229475441d7b5aa08d55f1b6cd3%7C686ea1d3bc2b4c6fa92cd99
>>> c5c301635%7C0%7C1%7C636519493755298348&sdata=EZFVV3qbStjH9Eqe6uVVXJ
>>> f7LmQlMLIURXHaQIMIpms%3D&reserved=0
>>> are/brcm/nvram_ap6335.txt) and the wifi seems to work. I have not
>>> noticed the wrong format file until testing it.
>> Interesting. In brcmfmac the file is parsed before sending it to the
>> firmware so I am wondering what is effectively send to the device.
>>
>> Can you dump the nvram that is sent to the device. Just add hexdump
>> call
>> of nvram in brcmf_fw_request_nvram_done() in firmware.c just before
>> fwctx->done() is called.
>>
>> Regards,
>> Arend
>
> Sorry for my delayed response, but I could not get the hexdump from the
> nvram. I have tried several hexdump functions I found on kernel and on
> the brcmfmac driver but none of them printed any output.
>
> Is there any CONFIG I need to enable to get those working?

CONFIG_BRCMDBG should be enabled. Or just add '#define DEBUG' in 
firmware.c before the include statements.

Regards,
Arend
Vanessa Maegima March 23, 2018, 1:15 p.m. UTC | #14
Hi Arend,

On Sex, 2018-03-23 at 10:28 +0100, Arend van Spriel wrote:
> On 3/21/2018 4:38 PM, Vanessa Maegima wrote:

> > 

> > Hi Arend,

> > 

> > On Sex, 2018-01-19 at 10:02 +0100, Arend van Spriel wrote:

> > > 

> > > On 1/18/2018 12:47 PM, Vanessa Maegima wrote:

> > > > 

> > > > 

> > > > Hi Arend,

> > > > 

> > > > On Ter, 2018-01-16 at 21:21 +0100, Arend van Spriel wrote:

> > > > > 

> > > > > 

> > > > > On 1/15/2018 9:08 PM, Fabio Estevam wrote:

> > > > > > 

> > > > > > 

> > > > > > 

> > > > > > Hi Arend,

> > > > > > 

> > > > > > On Tue, Dec 5, 2017 at 12:58 PM, Vanessa Maegima

> > > > > > <vanessa.maegima@nxp.com> wrote:

> > > > > > 

> > > > > > > 

> > > > > > > 

> > > > > > > 

> > > > > > > Hi Arend,

> > > > > > > 

> > > > > > > Sorry for this!

> > > > > > > 

> > > > > > > I updated the folder on https://emea01.safelinks.protecti

> > > > > > > on.outlook.com/?url=https%3A%2F%2Femea01.safelinks.protec

> > > > > > > tion.o&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cfa47ba5

> > > > > > > 219a940c482bc08d590a0808a%7C686ea1d3bc2b4c6fa92cd99c5c301

> > > > > > > 635%7C0%7C0%7C636573941383014734&sdata=Xszjp7jHoXyhFWUEl6

> > > > > > > LN4mcBhOgMRCjurMsWmE%2B5gZU%3D&reserved=0

> > > > > > > utlook.com/?url=https%3A%2F%2Femea01.safelinks.protection

> > > > > > > .out

> > > > > > > lo&data=02%7C01%7Cvanessa.maegima%40nxp.com%7C39040229475

> > > > > > > 441d

> > > > > > > 7b5aa08d55f1b6cd3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%

> > > > > > > 7C1%

> > > > > > > 7C636519493755298348&sdata=Zws4AElm4La96Q4pjK152nH2lP6v4m

> > > > > > > PJJN

> > > > > > > xSGz7TLBA%3D&reserved=0

> > > > > > > ok.com/?url=https%3A%2F%2Fdrive.google.com%2Fdrive%2Ffold

> > > > > > > ers%

> > > > > > > 2F1f

> > > > > > > osahjL&data=02%7C01%7Cvanessa.maegima%40nxp.com%7Cf07cd1a

> > > > > > > 6ffb

> > > > > > > 34c0

> > > > > > > 961f608d55d1eb901%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%

> > > > > > > 7C0%

> > > > > > > 7C63

> > > > > > > 6517308901643244&sdata=6JAqSN%2BVPJ%2FCF7cbnBjm8geMKWydWk

> > > > > > > G9Jc

> > > > > > > UhGB

> > > > > > > Pj644%3D&reserved=0

> > > > > > > N1KI5NKS59_aPZdHLpENPFHtK

> > > > > > > 

> > > > > > > Thanks!

> > > > > > Any ideas, please?

> > > > > Well, the dumps confirm a crash early in the firmware boot.

> > > > > However,

> > > > > I

> > > > > could not obtain more information from it. To capture the

> > > > > failure

> > > > > I

> > > > > need

> > > > > to rework some firmware functionality which is not trivial

> > > > > and I

> > > > > can

> > > > > not

> > > > > claim time for it right now.

> > > > > 

> > > > > Regards,

> > > > > Arend

> > > > > 

> > > > Thanks for all your investigation here!

> > > > 

> > > > I just want to report one more thing that I noticed from my

> > > > tests.

> > > > 

> > > > I have tried to use an html file that I downloaded using wget

> > > > as

> > > > the

> > > > nvram file (https://emea01.safelinks.protection.outlook.com/?ur

> > > > l=ht

> > > > tps%3A%2F%2Fgithub.com%2FOpenELEC%2Fwlan-

> > > > firmware%2Fblob%2Fmaster%2Ffirmw&data=02%7C01%7Cvanessa.maegima

> > > > %40n

> > > > xp.com%7C39040229475441d7b5aa08d55f1b6cd3%7C686ea1d3bc2b4c6fa92

> > > > cd99

> > > > c5c301635%7C0%7C1%7C636519493755298348&sdata=EZFVV3qbStjH9Eqe6u

> > > > VVXJ

> > > > f7LmQlMLIURXHaQIMIpms%3D&reserved=0

> > > > are/brcm/nvram_ap6335.txt) and the wifi seems to work. I have

> > > > not

> > > > noticed the wrong format file until testing it.

> > > Interesting. In brcmfmac the file is parsed before sending it to

> > > the

> > > firmware so I am wondering what is effectively send to the

> > > device.

> > > 

> > > Can you dump the nvram that is sent to the device. Just add

> > > hexdump

> > > call

> > > of nvram in brcmf_fw_request_nvram_done() in firmware.c just

> > > before

> > > fwctx->done() is called.

> > > 

> > > Regards,

> > > Arend

> > Sorry for my delayed response, but I could not get the hexdump from

> > the

> > nvram. I have tried several hexdump functions I found on kernel and

> > on

> > the brcmfmac driver but none of them printed any output.

> > 

> > Is there any CONFIG I need to enable to get those working?

> CONFIG_BRCMDBG should be enabled. Or just add '#define DEBUG' in 

> firmware.c before the include statements.

> 

> Regards,

> Arend


Thanks, this worked!

Here's the hexdump: http://code.bulix.org/trv3o7-306254

Best Regards,
Vanessa
Vanessa Maegima March 26, 2018, 12:25 p.m. UTC | #15
Hi Arend,

> Here's the hexdump: http://code.bulix.org/trv3o7-306254

> 


The link above provides the hexdump from the html nvram, which makes
wifi work on pico-imx7d.

I also got the hexdump of the nvram file provided by TechNexion for
comparison, which returns the error "brcmfmac: brcmf_sdio_htclk: HT
Avail timeout (1000000): clkctl 0x50": http://code.bulix.org/mw4x62-309
095

Thanks!

Best Regards,
Vanessa
Vanessa Maegima March 26, 2018, 1:34 p.m. UTC | #16
On Seg, 2018-03-26 at 09:24 -0300, Vanessa Maegima wrote:
> Hi Arend,

> 

> > 

> > Here's the hexdump: http://code.bulix.org/trv3o7-306254

> > 

> The link above provides the hexdump from the html nvram, which makes

> wifi work on pico-imx7d.

> 

> I also got the hexdump of the nvram file provided by TechNexion for

> comparison, which returns the error "brcmfmac: brcmf_sdio_htclk: HT

> Avail timeout (1000000): clkctl 0x50": http://code.bulix.org/mw4x62-3

> 09

> 095


Fixing second URL: http://code.bulix.org/mw4x62-309095
Arend van Spriel Nov. 14, 2018, 11:40 a.m. UTC | #17
+ Cameron

On 3/26/2018 3:34 PM, Vanessa Maegima wrote:
> On Seg, 2018-03-26 at 09:24 -0300, Vanessa Maegima wrote:
>> Hi Arend,
>>
>>>
>>> Here's the hexdump: http://code.bulix.org/trv3o7-306254
>>>
>> The link above provides the hexdump from the html nvram, which makes
>> wifi work on pico-imx7d.
>>
>> I also got the hexdump of the nvram file provided by TechNexion for
>> comparison, which returns the error "brcmfmac: brcmf_sdio_htclk: HT
>> Avail timeout (1000000): clkctl 0x50": http://code.bulix.org/mw4x62-3
>> 09
>> 095
>
> Fixing second URL: http://code.bulix.org/mw4x62-309095

Hi Vanessa,

It has been a while, but recently I was contacted by Cameron who was 
facing same/similar issue. After some email exchanges with him he 
uncovered that the problem with the TechNexion nvram file is with the 
boardflags3 entry. On my suggestion he change the value from 0x08101188 
to 0x101188. The dropped bit forces the clock hierarchy in the chip to 
select external LPO. I found some schematics showing a 32kHz signal 
hooked up to the LPO input coming from GPIO1_IO03. Could it be that it 
is not properly setup? Devicetree maybe?

Regards,
Arend
Vanessa Ayumi Maegima Nov. 15, 2018, 5:04 p.m. UTC | #18
Hi Arend,
On Wed, Nov 14, 2018 at 9:41 AM Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:
>
> + Cameron
>
> On 3/26/2018 3:34 PM, Vanessa Maegima wrote:
> > On Seg, 2018-03-26 at 09:24 -0300, Vanessa Maegima wrote:
> >> Hi Arend,
> >>
> >>>
> >>> Here's the hexdump: http://code.bulix.org/trv3o7-306254
> >>>
> >> The link above provides the hexdump from the html nvram, which makes
> >> wifi work on pico-imx7d.
> >>
> >> I also got the hexdump of the nvram file provided by TechNexion for
> >> comparison, which returns the error "brcmfmac: brcmf_sdio_htclk: HT
> >> Avail timeout (1000000): clkctl 0x50": http://code.bulix.org/mw4x62-3
> >> 09
> >> 095
> >
> > Fixing second URL: http://code.bulix.org/mw4x62-309095
>
> Hi Vanessa,
>
> It has been a while, but recently I was contacted by Cameron who was
> facing same/similar issue. After some email exchanges with him he
> uncovered that the problem with the TechNexion nvram file is with the
> boardflags3 entry. On my suggestion he change the value from 0x08101188
> to 0x101188. The dropped bit forces the clock hierarchy in the chip to
> select external LPO. I found some schematics showing a 32kHz signal
> hooked up to the LPO input coming from GPIO1_IO03. Could it be that it
> is not properly setup? Devicetree maybe?
>
> Regards,
> Arend
>

Thanks for the suggestion. I will investigate this on my side next
week when I have my Pico board and I will let you know any feedback.

Best Regards,
Vanessa
Fabio Estevam Nov. 17, 2018, 7:10 p.m. UTC | #19
Hi Cameron,

On Fri, Nov 16, 2018 at 5:59 PM Cameron Kellough
<cameron@paloaltoinnovation.com> wrote:
>
> I did a quick review of the Technexion dts file and it looks like they setup the iomux so that the clock Arend mentioned is needed actually gets muxed out to GPIO1_IO03.
>
> From the technexion imx7d-pico.dtsi under the iomuxc_lpsr group:
>
>     pinctrl_hog_2: hoggrp-2 {
>             fsl,pins = <
>                 MX7D_PAD_GPIO1_IO03__CCM_CLKO2     0x7d /* wifi LPO 32K Hz clock */
>                 MX7D_PAD_GPIO1_IO07__GPIO1_IO7     0x59 /* pmic sd_vel pin*/
>             >;
>         };

Could you please test the following patch against mainline that
implements this suggestion?
http://dark-code.bulix.org/4m18pb-507579

Thanks,

Fabio Estevam
Fabio Estevam Nov. 28, 2018, 3:59 p.m. UTC | #20
Hi Cameron,

On Sat, Nov 17, 2018 at 5:10 PM Fabio Estevam <festevam@gmail.com> wrote:

> Could you please test the following patch against mainline that
> implements this suggestion?
> http://dark-code.bulix.org/4m18pb-507579

I finally managed to get Wifi working on the imx7d-pico-pi board using
mainline 4.19.2 without any dts change.

Only change I needed was the one suggested by Arend in the nvram file:
changed boardflags3 entry.from 0x08101188 to 0x101188.

With this change I get:

# iwconfig wlan0 essid ACCESSPOINT
# wpa_passphrase ACCESSPOINT > /etc/wpa.conf
*****
# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf &
# Successfully initialized wpa_supplicant
[   59.091981] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   59.310095] brcmfmac: brcmf_run_escan: error (-52)
[   59.314949] brcmfmac: brcmf_cfg80211_scan: scan error (-52)
ioctl[SIOCSIWSCAN]: Invalid exchange
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
[   60.327177] brcmfmac: brcmf_run_escan: error (-52)
[   60.332152] brcmfmac: brcmf_cfg80211_scan: scan error (-52)
ioctl[SIOCSIWSCAN]: Invalid exchange
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
[   61.344358] brcmfmac: brcmf_run_escan: error (-52)
[   61.349198] brcmfmac: brcmf_cfg80211_scan: scan error (-52)
ioctl[SIOCSIWSCAN]: Invalid exchange
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
wlan0: Trying to associate with 94:2c:b3:31:dc:xx (SSID='ACCESSPOINT'
freq=2462 MHz)
wlan0: Associated with 94:2c:b3:31:dc:xx
wlan0: [   65.266683] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
WPA: Key negotiation completed with 94:2c:b3:31:dc:xx [PTK=CCMP GTK=TKIP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 94:2c:b3:31:dc:xx
completed [id=0 id_str=]

# udhcpc -i wlan0
udhcpc: started, v1.29.3
[   73.015896] random: mktemp: uninitialized urandom read (6 bytes read)
udhcpc: sending discover
udhcpc: sending select for 192.168.0.14
udhcpc: lease of 192.168.0.14 obtained, lease time 3600
[   74.354463] brcmfmac: brcmf_inetaddr_changed: fail to get arp ip
table err:-52
deleting routers
[   74.390701] random: mktemp: uninitialized urandom read (6 bytes read)
adding dns 201.82.0.66
adding dns 201.82.0.61
adding dns 201.6.4.116
#
# ping google.com
PING google.com (216.58.202.174): 56 data bytes
64 bytes from 216.58.202.174: seq=0 ttl=50 time=26.328 ms
64 bytes from 216.58.202.174: seq=1 ttl=50 time=22.751 ms
64 bytes from 216.58.202.174: seq=2 ttl=50 time=48.735 ms
64 bytes from 216.58.202.174: seq=3 ttl=50 time=58.955 ms

If I change the dts as per my last patch the Wifi does not work.

Regards,

Fabio Estevam
Fabio Estevam Nov. 28, 2018, 4:23 p.m. UTC | #21
Hi Arend,

On Wed, Nov 28, 2018 at 2:11 PM Arend Van Spriel
<arend.vanspriel@broadcom.com> wrote:

> Does it mean there is a regression in 4.20 for this board?

I haven't tested it with 4.20 yet.

>> Only change I needed was the one suggested by Arend in the nvram file:
>> changed boardflags3 entry.from 0x08101188 to 0x101188.
>
>
> Yes. That is understood. However, an external LPO clock may be more reliable than using the internal, which is consequence of changing boardflags3.

Just to make sure I understand the change:

boardflags3 0x08101188 --> Wifi uses an external clock
boardflags3 0x101188 ---> Wifi uses an internal clock

Current dts does not output the 32kHz from MX7D to the Wifi chip, so I
guess the below is correct.

> So can the signal be measured with a scope to confirm it provides 32kHz?

I am not sure if I can access this signal via scope.

Thanks
Fabio Estevam Nov. 28, 2018, 6:08 p.m. UTC | #22
Hi Arend,

On Wed, Nov 28, 2018 at 2:23 PM Fabio Estevam <festevam@gmail.com> wrote:

> I am not sure if I can access this signal via scope.

Good news!

I managed to make mx7d to generate the 32kHz clock and now Wifi works
with the default nvram file value: boardflags3 0x08101188

Thanks a lot for your help!
Arend van Spriel Nov. 28, 2018, 8:13 p.m. UTC | #23
On 11/28/2018 7:08 PM, Fabio Estevam wrote:
> Hi Arend,
>
> On Wed, Nov 28, 2018 at 2:23 PM Fabio Estevam <festevam@gmail.com> wrote:
>
>> I am not sure if I can access this signal via scope.
>
> Good news!
>
> I managed to make mx7d to generate the 32kHz clock and now Wifi works
> with the default nvram file value: boardflags3 0x08101188

Nice. Regarding your question in the earlier email, bit 27 in 
boardflags3 forces the device to always select external LPO signal. When 
the bit is not set it will select either internal or external. I don't 
know what the criteria for that selection are.

Regards,
Arend
Fabio Estevam Nov. 29, 2018, 12:12 a.m. UTC | #24
Hi Arend,

On Wed, Nov 28, 2018 at 6:13 PM Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:

> Nice. Regarding your question in the earlier email, bit 27 in
> boardflags3 forces the device to always select external LPO signal. When
> the bit is not set it will select either internal or external. I don't
> know what the criteria for that selection are.

Thanks for your explanation and for the excellent hint on the lack of
32kHz support in the device tree.

Really appreciate it!

To close this thread, here is the dts patch that allows Wifi to work
om the imx7d-pico-pi board:
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-November/616048.html

Thanks,

Fabio Estevam
diff mbox

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 
b/drivers/ne
index f355612..f7ded91 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -830,6 +830,11 @@  static int brcmf_sdio_htclk(struct brcmf_sdio *bus, 
bool on,
                 if (!SBSDIO_CLKAV(clkctl, bus->alp_only)) {
                         brcmf_err("HT Avail timeout (%d): clkctl 0x%02x\n",
                                   PMU_MAX_TRANSITION_DLY, clkctl);
+
+                       /* DEBUG INFO */
+                       brcmf_debug_create_memdump(bus->sdiodev->bus_if,
+                                                  NULL, 0);
+
                         return -EBADE;
                 }