Fail safe way to update ANX7688 firmware
#1
Hi,

as there'd been a lot of reports of failed updates for ANX7688 firmware, i thought i'd share my experience here.
The wiki already points out that there's some trouble with Linux kernel 5.10 (timeout)
and i had some trouble with the image it refers to... here's a fail safe way!

Before (version 0x2312):

Code:
[  11.356306] anx7688 1-0028: fw loaded after 40 ms
[  11.365598] anx7688 1-0028: OCM firmware loaded (version 0x2312)
[  11.380796] anx7688 1-0028: send pd packet cmd=0 05 00 32 90 01 26 12
[  11.405217] anx7688 1-0028: send pd packet cmd=1 05 01 2c 91 01 26 16
[  11.405764] anx7688 1-0028: send pd packet cmd=2 11 02 00 00 00 ec 00 00 00 00 00 00 00 00 39 00 00 51 77
[  11.406629] anx7688 1-0028: send pd packet cmd=3 05 03 00 00 01 ff f8
[  11.407149] anx7688 1-0028: OCM configuration completed
[  11.409664] anx7688 1-0028: status changed to 0x00

To upgrade safely, download PMOS factory test image:
https://images.postmarketos.org/pinephon...t64.img.xz

Write image to SD-card...
Put the SD-card into linux host and mount PM_root.

Replace /lib/firmware/anx7688-fw.bin with the latest one from:
wget https://xff.cz/git/linux-firmware/plain/anx7688-fw.bin

!!!Attention!!!
Before using the serial debug cable, please disable headphone with the kill switch.
Insert card to your Pinephone and use serial debug cable (most convenient way):
login: demo
pwd: demo

...then:
sudo -s
echo 1 > /sys/class/typec/port0/device/flash_eeprom

Kernel messages will inform you about the eeprom flash process afterwards (call dmesg).
Send the device to halt and remove the SD-card.

Then after booting up to your OS will give:

Code:
[  184.219123] anx7688 1-0028: eeprom0 = 0x03
[  184.219145] anx7688 1-0028: fw loaded after 40 ms
[  184.219319] anx7688 1-0028: OCM firmware loaded (version 0x2410)
[  184.220257] anx7688 1-0028: send pd packet cmd=0x00 05 00 32 90 01 26 12
[  184.264040] anx7688 1-0028: send pd packet cmd=0x01 05 01 2c 91 01 26 16
[  184.264557] anx7688 1-0028: send pd packet cmd=0x02 11 02 00 00 00 ec 00 00 00 00 00 00 00 00 39 00 00 51 77
[  184.265367] anx7688 1-0028: send pd packet cmd=0x03 05 03 00 00 01 ff f8
[  184.265871] anx7688 1-0028: OCM configuration completed
[  184.269329] anx7688 1-0028: status changed to 0x00

That's it! Successfully upgraded to OCM firmware version 0x2410.

Hope this helps to avoid further confusion.

Cheers,
scholbert
  Reply


Messages In This Thread
Fail safe way to update ANX7688 firmware - by scholbert - 02-05-2021, 10:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  camera firmware problems kqlnut 25 10,008 09-02-2021, 07:49 PM
Last Post: Zebulon Walton
  3/32 upgrade board, Arrived Without Firmware, Troubleshooting Steps to SOLVED biketool 0 913 06-22-2021, 10:03 AM
Last Post: biketool
  WIFI not available after anx7688 update failure frimmel 21 9,833 05-11-2021, 02:45 AM
Last Post: frimmel
  Pinephone mainboard v1.2 documentation update? scholbert 1 1,511 01-18-2021, 09:01 PM
Last Post: bokomaru
  New motherboard - ANX firmware won't flash. --- 17 5,620 12-26-2020, 01:53 PM
Last Post: p1x3l3d
  Update to 3GB/32GB mainboard not working tlo 2 2,219 11-09-2020, 04:40 PM
Last Post: tlo
  BraveHeart UbPorts Battery drain/Solder update Vlodka 2 2,103 10-04-2020, 11:18 PM
Last Post: Vlodka

Forum Jump:


Users browsing this thread: 1 Guest(s)