summaryrefslogtreecommitdiff
path: root/test/run_device_tests.py
diff options
context:
space:
mode:
authorPatryk Duda <pdk@semihalf.com>2021-05-31 20:22:32 +0200
committerCommit Bot <commit-bot@chromium.org>2021-06-17 22:44:52 +0000
commit16df4319658b60a7dfc6231c23b7f7e6a2826b6b (patch)
tree353e17ca0ecfe135f0cb1f0bdd0e5b14b82a0326 /test/run_device_tests.py
parent4bc2cd067712a8732b8b0f75fd7d2e05a05bd749 (diff)
downloadchrome-ec-16df4319658b60a7dfc6231c23b7f7e6a2826b6b.tar.gz
run_device_tests: Use 'fw_wp_state' to control write protect state
In hdctools/servo/data/servo_micro.xml 'fw_wp_en' control is described as "Enables forwarding of write-protect gpio. Must assert this and set fw_wp_vref prior to changing fw_wp.". It means that it needs to be enabled, but write protect state is controlled by 'fw_wp'. There is also 'fw_wp_state' control which is convenient wrapper for this. It sets 'fw_wp_en', 'fw_wp_vref' and 'fw_wp'. BUG=b:170432597 BRANCH=none TEST=Connect icetower using microservo. sudo servod --board icetower ./test/run_device_tests.py --board dartmonkey --test flash_write_protect Make sure that test is passed and HOST MCU WP diode glows during test. Don't use 'dut-control' to set write protect state. Signed-off-by: Patryk Duda <pdk@semihalf.com> Cq-Depend: chromium:2928423 Change-Id: Ia6164e877549956e8efb7fb5cd47d8c0d5ce2872 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2929119 Reviewed-by: Craig Hesling <hesling@chromium.org>
Diffstat (limited to 'test/run_device_tests.py')
-rwxr-xr-xtest/run_device_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/run_device_tests.py b/test/run_device_tests.py
index 7a9730286e..9e7f384cb2 100755
--- a/test/run_device_tests.py
+++ b/test/run_device_tests.py
@@ -242,13 +242,13 @@ def power(board_config: BoardConfig, on: bool) -> None:
def hw_write_protect(enable: bool) -> None:
"""Enable/disable hardware write protect."""
if enable:
- state = 'on'
+ state = 'force_on'
else:
- state = 'off'
+ state = 'force_off'
cmd = [
'dut-control',
- 'fw_wp_en' + ':' + state,
+ 'fw_wp_state:' + state,
]
logging.debug('Running command: "%s"', ' '.join(cmd))
subprocess.run(cmd).check_returncode()