Commit d43e519d authored by Guido Gunther's avatar Guido Gunther

README: document the flashing command

Closes: #4
parent e4295b4a
Firmware for the tps65982 USB PD controller in the Librem5
----------------------------------------------------------
For flashing see `./scripts/write_flash.sh` in [librem5-devkit-tools][].
# Firmware modification
To modify the firmware see TIs [TPS6598x Configuration Tool][].
Whenever you change the firmware
......@@ -11,5 +12,37 @@ Whenever you change the firmware
- add the files to this repository
- Add each changed registers to the commit message
# Flashing the firmware
*IMPORTANT*: The firmware is for the Evergreen batches. Don't flash it to other devices.
For flashing `./scripts/write_flash.sh` from [librem5-devkit-tools][]
is used. The flashing process is very similar to reflashing the phone
however no data is overwritten on the emmc. For the script to work you
need `uuu` from the [mfgtools][] package (>= 1.2.91) installed.
First put the phone into serial download mode:
- Ensure that the phone is switched off.
- Turn all Hardware-Kill-Switches off
- Remove battery
- Hold volume-up
- Insert the USB-c cable: (red light blinks, no green light)
- Reinsert the battery: (red light is constantly on, the script will continue)
- Release volume-up
then flash the firmware:
```sh
./scripts/write_flash.sh tps65982-librem5-dp-alt-mode.bin
```
After flashing boot the device and check the firmware version:
```sh
cat /sys/kernel/debug/tps6598x/0-003f/customer_use
```
[librem5-devkit-tools]: https://source.puri.sm/guido.gunther/librem5-devkit-tools
[TPS6598x Configuration Tool]: http://www.ti.com/tool/TPS6598X-CONFIG
[mfgtools]: https://software.pureos.net/search_pkg?term=mfgtools
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment