diff options
author | Ivy Jian <ivy.jian@quanta.corp-partner.google.com> | 2022-11-04 09:20:59 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-08 07:04:55 +0000 |
commit | 21cc4a3c8faed2ecf6784ef505775483367f71e9 (patch) | |
tree | 67aea6279f4e31d998c04116328caa503150c4a7 /util | |
parent | b33d0923d0965cc478ef43ec1c2e4eac6f20e4b4 (diff) | |
download | chrome-ec-21cc4a3c8faed2ecf6784ef505775483367f71e9.tar.gz |
flash_fp_mcu: Add config_rex
BUG=b:256112341
BRANCH=NONE
TEST=On rex device, ran /usr/local/bin/flash_fp_mcu successfully
Change-Id: I3392782ae936d4d9b706755dca9dc4a5eb4b904f
Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4005483
Reviewed-by: Subrata Banik <subratabanik@chromium.org>
Reviewed-by: Ofer Fried <oferfried@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Subrata Banik <subratabanik@chromium.org>
Reviewed-by: Andrea Grandi <agrandi@google.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/flash_fp_mcu | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu index 578382c213..4f8fa26749 100644 --- a/util/flash_fp_mcu +++ b/util/flash_fp_mcu @@ -702,6 +702,26 @@ config_ghost() { config_brya } +config_rex() { + readonly TRANSPORT="SPI" + readonly DEVICE="/dev/spidev0.0" + + # See kernel/v5.15/drivers/pinctrl/intel/pinctrl-meteorlake.c + # for pin name and pin number. + # Examine `cat /sys/kernel/debug/pinctrl/INTC1083:00/gpio-ranges` on a + # rex device to determine gpio number from pin number. + # For example: GPP_B11, the pin number is 215 from the pinctrl-meteorlake.c. + # From the gpio-ranges, the gpio value is 925 + (215-204) = 936 + + readonly GPIO_CHIP="gpiochip573" + # FPMCU RST_ODL is on GPP_C23 = 637 + (52 - 29) = 660 + readonly GPIO_NRST=660 + # FPMCU BOOT0 is on GPP_C22 = 637 + (51 - 29) = 659 + readonly GPIO_BOOT0=659 + # FP_PWR_EN is on GPP_B11 = 925 + (215-204) = 936 + readonly GPIO_PWREN=936 +} + config_zork() { readonly TRANSPORT="UART" readonly DEVICE="/dev/ttyS1" |