summaryrefslogtreecommitdiff
path: root/util/flash_pd.py
Commit message (Collapse)AuthorAgeFilesLines
* flash_pd.py: Add retries for commands for collision resilience.Todd Broch2014-08-201-15/+44
| | | | | | | | | | | | | | | | | | | | | | | | The original version of the script worked but as the USB PD protocol SM has been enhanced to handle more complicated scenarios the occurrence of collisions on the baseband comm has grown and script needs to account for that. Script now checks status of ACK from zinger 'DONE 0' and retries two additional times for commands that failed. If those three attempts are unsuccessful script raises exception and quits. Also added some more logging around retries and progress of chunk writes. BRANCH=none BUG=chrome-os-partner:30135 TEST=manual, util/flash_pd.py build/zinger/ec.RW.flat succeeds in programming zinger even in light of some retries. Change-Id: Iaa8a22c2510ea5f4ebd92e1715be5fe062e13c61 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/213131 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* pd: modify PD to allow sending VDMs anytimeAlec Berg2014-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | Change the VDM implementation in the PD task to allow for VDMs at any time when connected without disrupting any regular PD communications. BUG=none BRANCH=none TEST=load on a samus and on a zinger and test sending VDMs: pd 0 flash version pd 0 flash reboot Also, test using the flash_pd.py script to write zinger RW using VDMs. Change-Id: I48352978d8c45f78e8a5a7735d65b013a853f3e2 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/210746 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* pd: add commands to test flashing using PD communicationVincent Palatin2014-07-311-0/+313
Add console commands to send the Vendor-Defined Messages used to flash a USB-PD target. Also add a simple test script to flash Zinger through its CC line. To run the script, the board must have CONFIG_USB_PD_CUSTOM_VDM defined. By default fruitpie has this config option enabled. BRANCH=none BUG=chrome-os-partner:28330 TEST=With a fruitpie connected to a zinger run ./util/flash_pd.py ./build/zinger/ec.RW.flat and see Zinger booting on RW. Change-Id: I06f8f545e28b93b2e646e668d81b594eb7976a2d Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/203375 Reviewed-by: Todd Broch <tbroch@chromium.org>