[LEDE-DEV] [PATCH 1/4] firmware: ath10k-firmware: update QCA4019 firmware to 10.4-3.2.1-00058
Matthew McClintock
msm-oss at mcclintock.net
Mon Nov 20 15:13:46 PST 2017
On Mon, Nov 20, 2017 at 2:59 PM, Christian Lamparter <chunkeey at gmail.com> wrote:
> On Monday, November 20, 2017 11:23:18 AM CET Matthew McClintock wrote:
>> On Mon, Nov 20, 2017 at 10:53 AM, Christian Lamparter
>> <chunkeey at gmail.com> wrote:
>> > On Monday, November 20, 2017 9:45:28 AM CET Matthew McClintock wrote:
>> >> Did you get ath10k working on ipq4019?
>> >
>> > Yes, I managed to upstream the wifi dts changes some time ago and they
>> > all have been accepted. In fact the new 4.14 does ships with those.
>> >
>> > https://patchwork.kernel.org/patch/9858197/
>> >
>> > How is your upstreaming progess going?
>> >
>> >> I'm having issues with the board data files? I've never messed with this.
>> >
>> > What do you want to know?
>> >
>> > I'm assuming that you are looking for a way to package the two board.bin
>> > (2GHz and 5GHz) into a board-2.bin. You can just use the ath10k-bdencoder
>> > tool from the <https://github.com/qca/qca-swiss-army-knife>
>> >
>> > Note: ath10k-bdencoder can also unpack existing board-2.bin that are
>> > currently shipped with any of the the ipq-wifi packages. So the fastest way
>> > would be to unpack a existing board-2.bin (this will create a .json file and
>> > the individual .bins). Then you just have to replace the two board.bin files
>> > and repack it (the repack process will need the created .json file again.)
>> >
>> > If this isn't what you are looking for, you might find it in the
>> > "firmware: add custom IPQ wifi board definitions" commit message.
>> >
>>
>> Caveat: I'm using an older version of ath10k at the moment, but....
> This is can be a big caveat. Depending on how "old" the ath10k /
> compat-wireless / backports really is. On OpenWRT/older LEDE versions
> QCA4019 was broken by a patch: 936-ath10k_skip_otp_check.patch.
>
> You should definitely go for a recent version.
I'm stuck on some other backport for the time being, will sort out
LEDE after I get a complete grasp. Actually this is all good info for
getting upstream working.
>
>> I think it's complaining that it can't find the right board info from
>> the board-2.bin file which is just multiple board files wrapped up
>> together?
>>
>> [ 233.761660] ath10k_ahb a000000.wifi: failed to fetch board data for
>> bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000
>> from ath10k/QCA4019/hw1.0/board-2.bin
> The device identifcation doesn't work.
>
> The driver is thinking it has a non-sensical "ahb pci(e)" device.
> Just look at the fact that the driver is looking for "bus=ahb" but also
> "vendor=0,device=0...,subsystem...=...,..."(which is used to identify
> pcie devices). If it was looking for a bmi device, the board search string
> would look something like "bus=ahb,bmi-chip-id=0,bmi-board-id=16"
I think this is the root of the problem.
> I can only guess what's really going on, since this is such a short extract.
>
> But there at least two likely scenarios:
> 1. 936-ath10k_skip_otp_check.patch is present / ath10k is too old
This is not present.
>
> 2. the pre-cal-ahb-a800000.wifi.bin and pre-cal-ahb-a000000.wifi.bin
> don't get loaded or the pre-cal* data is shifted/trimmed/mangled/bad.
>
> For 2. you should check if the firmware hotplug 11-ath10k-caldata script
> is correctly extracting the pre-cal from the "ART" Partition of your device
> to /lib/firmware/ath10k. I posted one of the RT-AC58U's pre-cal files on the
> linux-wireless / ath10k-devel mailing-list.
> If you need something to compare to, look for the cal-file attachment:
> <https://www.mail-archive.com/ath10k@lists.infradead.org/msg05911.html>
>
> (Note: Netgear used to ship the source from which these .bin files are
> created by the calibration utility in thier GPL source of the R7800 / D7800)
>
>> This is the first pass, it moves onto board.bin but still fails (the
>> file is not present).
>>
>> Where is a description of the which board.bin files to use for which
>> radios? Where does this info come from? Somewhere in the radio or OTP?
> I don't think this was actually documented anywhere officially by
> Qualcomm Atheros. The best resource I currently know of, is this write-up
> from Sven Eckelmann:
> <http://lists.infradead.org/pipermail/ath10k/2017-January/009025.html>
>
> followed by the response from Adrian Chadd (he used to work for QCA, but
> no longer does):
> <http://lists.infradead.org/pipermail/ath10k/2017-January/009104.html>
>
> If you have further questions, your best bet is to write to the
> linux-wireless and ath10k-devel ML.
>
>> Interestingly, PCI is complaining too:
>>
>> [ 236.712965] ath10k_pci 0000:01:00.0: failed to fetch board data for
>> bus=pci,bmi-chip-id=0,bmi-board-id=19 from
>> ath10k/QCA9888/hw2.0/board-2.bin
>>
>> Is my board just not setup right? Missing OTP id? I guess I can force
>> a working radio with a board.bin file?
> This "board-id=19" is currently not available in the ath10k-firmware.git:
>
> According to the latest QCA9888 patch, it just supports
> <https://github.com/kvalo/ath10k-firmware/commit/3cfabec862d4969a64ac6ddf2bfe69deb72107ac#diff-d57e9359d3fc1215cfc7c23ddb9189cb>
>
> "New:
> bus=pci,bmi-chip-id=0,bmi-board-id=24
> bus=pci,bmi-chip-id=0,bmi-board-id=25
> bus=pci,bmi-chip-id=0,bmi-board-id=17
> bus=pci,bmi-chip-id=0,bmi-board-id=18
> bus=pci,bmi-chip-id=0,bmi-board-id=23
>
> Changed:
> bus=pci,bmi-chip-id=0,bmi-board-id=16
> "
>
> I know that Henryk had similar issues with his Archer C58/C59/C60 and his
> "board-id=20". I advised him to take this matter upstream, which he did:
> <https://github.com/kvalo/ath10k-firmware/pull/5>
>
> however, it has been sitting in the ath10k-firmware queue for a while now.
>
> Note: The QSDK installs the boardData.* into the /lib/firmware/IPQ4019/hw.1/
> directory (replace the IPQ4019 with QCA9888 etc...). If you have a vendor
> image, you might be able to use binwalk -e to extract the rootfs and get
> the boardData.bin from there.
>
> However these boardData.bins are in the old "board.bin" format. You'll need
> the ath10k-bdencoder tool to generate a board-2.bin that you can put into
> the ipq-wifi package.
Thanks for all the detailed info.
-M
More information about the Lede-dev
mailing list