Re: AP6335 with mainline kernel

2018-03-26 Thread Vanessa Maegima
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 (100): clkctl 0x50": http://code.bulix.org/mw4x62-3
> 09
> 095

Fixing second URL: http://code.bulix.org/mw4x62-309095

Re: AP6335 with mainline kernel

2018-03-26 Thread Vanessa Maegima
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 (100): clkctl 0x50": http://code.bulix.org/mw4x62-309
095

Thanks!

Best Regards,
Vanessa

Re: AP6335 with mainline kernel

2018-03-23 Thread Vanessa Maegima
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
> > > > > >  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

Re: AP6335 with mainline kernel

2018-03-21 Thread Vanessa Maegima
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
> > > >  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

Re: AP6335 with mainline kernel

2018-01-18 Thread Vanessa Maegima
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
> >  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,
VanessaU-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 @ 0x8080 [ 0x00 - 0x7c2030 ]
## Flattened Device Tree blob at 8300
   Booting using the fdt blob at 0x8300
   Using Device Tree in place at 8300, end 83009b02

Starting kernel ...

[0.00] Booting Linux on physical CPU 0x0
[0.00] 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.00] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[0.00] CPU: div instructions available: patching division code
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] OF: fdt: Machine model: Technexion Pico i.MX7D Board
[0.00] Memory policy: Data cache writealloc
[0.00] cma: Reserved 64 MiB at 0xbc00
[0.00] psci: probing for conduit method from DT.
[0.00] psci: Using PSCI v0.1 Function IDs from DT
[0.00] percpu: Embedded 17 pages/cpu @ef7be000 s40296 r8192 d21144 
u69632
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[0.00] Kernel command line: console=ttymxc4,115200 
root=PARTUUID=7b01d6c5-01 rootwait rw
[0.00] PID hash table entries: 4096 (order: 2, 16384 bytes)
[0.00] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[0.00] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Memory: 948792K/1048576K available (11264K kernel code, 851K 
rwdata, 3532K rodata, 102
4K init, 7726K bss, 34248K reserved, 65536K cma-reserved, 196608K highmem)
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xffc0 - 0xfff0   (3072 kB)
[0.00] vmalloc : 0xf080 - 0xff80   ( 240 MB)
[0.00] lowmem  : 0xc000 - 0xf000   ( 768 MB)
[0.00] pkmap   : 0xbfe0 - 0xc000   (   2 MB)
[0.00] modules : 0xbf00 - 0xbfe0   (  14 MB)
[0.00]   .text : 0xc0008000 - 0xc0c0   (12256 kB)
[0.00]   .init : 0xc100 - 0xc110   (1024 kB)
[0.00]   .data : 0xc110 - 0xc11d4d58   ( 852 kB)
[0.00].bss : 0xc11d6000 - 0xc1961a6c   (7727 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[0.00] ftrace: allocating 34900 entries in 103 pages
[0.00] Running RCU self tests
[0.00] Hierarchical RCU implementation.
[0.00]  RCU event tracing is enabled.
[0.00]  RCU lockdep checking is enabled.
[0.00]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu

Re: AP6335 with mainline kernel

2017-12-05 Thread Vanessa Maegima
On Ter, 2017-12-05 at 10:06 +0100, Arend Van Spriel wrote:
> On Mon, Dec 4, 2017 at 8:00 PM, Vanessa Maegima  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 0x02
> > > > > > > > > [6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail
> > > > > > > > > timeout
> > > > > > > > > (100):
> > > > > > > > > clkctl 0x50
> > > > > > > > > [6.427722] brcmfmac:
> > > > > > > > > brcmf_sdio_htclk:   pmucontrol   =
> > > > > > > > > 01774381
> > > > > > > > > [6.434865] brcmfmac:
> > > > > > > > > brcmf_sdio_htclk:   pmustatus=
> > > > > > > > > 002a
> > > > > > > > > [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 0x7fff 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

Re: AP6335 with mainline kernel

2017-12-04 Thread Vanessa Maegima
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 0x02
> > > > > > > [6.420070] brcmfmac: brcmf_sdio_htclk: HT Avail
> > > > > > > timeout
> > > > > > > (100):
> > > > > > > clkctl 0x50
> > > > > > > [6.427722] brcmfmac:
> > > > > > > brcmf_sdio_htclk:   pmucontrol   =
> > > > > > > 01774381
> > > > > > > [6.434865] brcmfmac:
> > > > > > > brcmf_sdio_htclk:   pmustatus=
> > > > > > > 002a
> > > > > > > [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 0x7fff 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

Re: AP6335 with mainline kernel

2017-11-23 Thread Vanessa Maegima
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
> > > > > > > > > >  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
> > > > > > > > > > > > (100):
> > > > > > > > > > > > clkctl 0x50
> > > > > > > > > > > > 
> > > > > > > > > > > > I have tried to use the firmware and nvram
> > > > > > > > > > > > provided
> > &

Re: AP6335 with mainline kernel

2017-11-22 Thread Vanessa Maegima
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
> > > > > > > >  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
> > > > > > > > > > (100):
> > > > > > > > > > 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.
> > > > > > > > > > 
> > > > > &g

Re: AP6335 with mainline kernel

2017-11-17 Thread Vanessa Maegima
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
> > > > >  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
> > > > > > > (100):
> > > > > > > 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
> > > > > @0x1800=0x16224335
> > > > > [   19.309026] brcmfmac: brcmf_chip_recognition found AXI
> > > > > chip:
> > > > >

Re: AP6335 with mainline kernel

2017-11-17 Thread Vanessa Maegima
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
> > >  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
> > > > > (100):
> > > > > 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 @0x1800=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 0x1800 wrap 0x1810
> > > [   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 0x wrap 0x18109000
> > > [   19.317279] brcmfmac: brcmf_chip_cores_check  [8 ] core
> > > 0x240:0
> > > base 0x wrap 0x
> > > [   19.317298] brcmfmac: brcmf_chip_set_passive Enter
> > > [   19.322232] brcmfmac: brcmf_chip_get_raminfo RAM:
> > > base=0x18
> > > size=786432 (0xc00

Re: AP6335 with mainline kernel

2017-11-10 Thread Vanessa Maegima
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
>  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
> > > (100):
> > > 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 @0x1800=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 0x1800 wrap 0x1810
> [   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 0x wrap 0x18109000
> [   19.317279] brcmfmac: brcmf_chip_cores_check  [8 ] core 0x240:0
> base 0x wrap 0x
> [   19.317298] brcmfmac: brcmf_chip_set_passive Enter
> [   19.322232] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x18
> size=786432 (0xc) 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 0x02
> [   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 0x0018; 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
> (100):
> 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
> (100):
> clkctl

Re: AP6335 with mainline kernel

2017-10-17 Thread Vanessa Maegima
Hi Arend,

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
>  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
> > > (100):
> > > 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 @0x1800=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 0x1800 wrap 0x1810
> [   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 0x wrap 0x18109000
> [   19.317279] brcmfmac: brcmf_chip_cores_check  [8 ] core 0x240:0
> base 0x wrap 0x
> [   19.317298] brcmfmac: brcmf_chip_set_passive Enter
> [   19.322232] brcmfmac: brcmf_chip_get_raminfo RAM: base=0x18
> size=786432 (0xc) 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 0x02
> [   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 0x0018; 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
> (100):
> 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
> (100):
>