summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2022-03-17 17:38:39 -0700
committerCommit Bot <commit-bot@chromium.org>2022-03-18 20:23:53 +0000
commitb73886aff89eebedf27e599385fefb5feaea918f (patch)
treecf36b647bc84fde646eb68df3338161122536198
parent2f3d1a3f4c13fc474adb4a2f6a1448f99cf8fd60 (diff)
downloadchrome-ec-b73886aff89eebedf27e599385fefb5feaea918f.tar.gz
flash_fp_mcu: Add power en gpio on strongbad
There's a gpio for the power enable signal in the latest revision of the hardware (i.e. not rev0/rev1). Search for the gpio by name and use -1 if it fails. BRANCH=none BUG=b:179839337 TEST=flash_fp_mcu on coachz (rev1/rev3) Change-Id: I047236bd9a7bd3b34f2771576ff2b31952e0b094 Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3534745 Reviewed-by: Alexandru Stan <amstan@chromium.org>
-rw-r--r--util/flash_fp_mcu11
1 files changed, 8 insertions, 3 deletions
diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu
index 950642a109..9d3eb65cc4 100644
--- a/util/flash_fp_mcu
+++ b/util/flash_fp_mcu
@@ -590,9 +590,14 @@ config_strongbad() {
readonly GPIO_NRST=$((${gpiobase} + $(gpiofind FP_RST_L|cut -f2 -d" ")))
# FPMCU BOOT0 is $(gpiofind FPMCU_BOOT0) is gpiochip0 10
readonly GPIO_BOOT0=$((${gpiobase} + $(gpiofind FPMCU_BOOT0|cut -f2 -d" ")))
- # TODO(b/179839337): Hardware currently doesn't support PWREN, but the
- # next revision will. Add a comment here about the power enable gpio.
- readonly GPIO_PWREN=-1
+
+ # EN FP RAILS is $(gpiofind EN_FP_RAILS) is gpiochip0 74 (if available)
+ local en_fp_rails
+ if en_fp_rails=$(gpiofind EN_FP_RAILS); then
+ readonly GPIO_PWREN=$((${gpiobase} + $(echo $en_fp_rails|cut -f2 -d" ")))
+ else
+ readonly GPIO_PWREN=-1
+ fi
}
config_volteer() {