W25X10CL serial flash purpose

I found the flashrom could be a solution [flashrom] VL805 Flash SPI Bus Programmer Support

3 Likes

That’d make the ARM binary from VIA unnecessary. Indeed a good thing.

1 Like

Is it possible for a official firmware update tool? Since we don’t have recovery tool if it fails.

1 Like

Seems vl805 support is ready to be merged in flashrom.
https://review.coreboot.org/c/flashrom/+/72057

1 Like

After testing, seems rpi’s firmware cannot be used on vf2, can you get a proper firmware for vl805? I tried rpi’s closed source tool and flashrom, both works, but new firmware doesn’t work properly. lsusb hangs, and dmesg shows no device detection info.

2 Likes

I blame VIA here for not openly publishing documentation, firmwares and tools in their website.

Changing the firmware without backporting the matching and probably needed driver changes for the kernel to match that exact firmware might do that ?
e.g.
RPi from firmware 000138a1 to 000138c0 required these changes: https://github.com/raspberrypi/linux/pull/5262/files

I thought that the VIA quirks would be in the mainline kernel (6.2) driver, but it only has 2 quirks, whereas the RPi kernel driver handles 6 quirks. Even the next linux kernel still only handles 2 quirks. And the VF2 kernel driver handles the same 2 quirks as the mainline and next kernel.

They had to add a quirk? You’d expect firmware updates to actually fix bugs, not the other way around.

Well, I only tested newest version of rpi firmware… You could try more version. Easiest way to update/backup existing firmware is to use qemu-user-static+rpi’s close source tool.
Also, I think those quirks are temporary solution for this problem when firmware solution not implemented. But you can also apply those quirks to vf2 kernel to see if it works.

1 Like

Extracted firmware: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.

1 Like

From left to right the ten firmware versions in the png image are 00013400, 00013600, 00013701, 00013703, 00013704, 00013726, 000137ab, 000137ad, 000138a1, and 000138c0. I did not zero padded 00013726 to help make it easier to identify the VF2 VL805 firmware.

The output from a bsdiff between versions did not increase beyond what would probably be expected when looking at 00013704 to 00013726 (336 bytes) and 00013726 to 000137ab (2963 bytes) when compared with 00013704 to 000137ab (2964 bytes). They are not the same, but they are close enough to strongly suggest that the same baseline source code is common to all firmware versions.

patch
size
bytes output filename
----- ---------------------------
...
  170 00013703-to-00013704.bsdiff
  336 00013704-to-00013726.bsdiff
 2963 00013726-to-000137ab.bsdiff
 3451 000137ab-to-000137ad.bsdiff
...

To me, visually and from the bsdiffs it looks like a normal incremental change to one firmware source code, and that there is no encryption (the firmware could in theory be obscured by something like a basic substitution cipher). If there was encryption bsdiff, how it works to generate binary patch files for executables, would not be working as efficiently as it is.

EDIT: updated bsdiff information using FW013726.bin below. The first 96984 bytes, the size of FW013726.bin (96984 bytes) and vl805-00013726.bin (131072 bytes) were exactly the same in each file as you would expect from an unmodified error free firmware dump.

2 Likes

FW013726.bin (94.7 KB)
attached firmware we get it from chip vendor. no any update from them

4 Likes

Poking the vendor as a customer might yield results.

Notably, rpi4 firmware release notes mention not just bugfixes, but also power savings from pcie aspm improvements deployed in VL805 firmware versions newer than 13726. We are missing out of these.

2 Likes

Did you power cycle after the firmware change ?

Of course yes. I power off the board, wait about 10 seconds, then plug connector back.

1 Like

Digging through the firmwares on github, this is all I could piece together. And that each later firmware version includes all previous fixes.

vl805-000138C0.bin (2023-01-11 commit to github)

vl805-000138a1.bin (2020-01-10 commit to github)

  • User settings of the ASPM (Active-state power management) bits in the PCI configuration space link control register are now maintained
  • Better full-speed Isochronous endpoint support.

vl805-000137ad.bin (2020-01-10 commit to github)

  • Fixes for USB webcams.

vl805-000137ab.bin (2019-10-22 commit to github)

  • Better power saving.

FW013726.bin (?2019?)

  • Default VisionFive 2 firmware.

vl805-00013701.bin (2019-10-22 commit to github)

  • ? unknown ?
4 Likes