diff options
author | Patryk Duda <pdk@semihalf.com> | 2022-08-29 13:35:29 +0200 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-08-29 16:43:21 +0000 |
commit | 7c1402f9490b89156264a42eb888538ed9d4e33c (patch) | |
tree | ee729c24f8c7b2b9aeeae66cbfe703b8c0e8e328 | |
parent | 60d223c16c03d35901c9db3f7bf56803bec7c8c2 (diff) | |
download | chrome-ec-7c1402f9490b89156264a42eb888538ed9d4e33c.tar.gz |
flash_fp_mcu: Fix script on nocturne
Recently nocturne board switched to 5.10 kernel. It means that SPI
device for nocturne with 5.10 kernel needs to be changed to
/dev/spidev1.0. This change is a good opportunity to get rid of
separate config for nocturne-kernelnext board.
The script still supports nocturne with kernel 4.4 because ChromeOS
images can have this version in other kernel slots.
BUG=b:244171527
BRANCH=None
TEST=Run `flash_fp_mcu --hello` on nocturne and nocturne-kernelnext.
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: I7c2ecdd5d8ca3d9ce438376bdea33abbaf189e5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3861329
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Patryk Duda <patrykd@google.com>
-rw-r--r-- | util/flash_fp_mcu | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu index bfaa391fc0..cb83660d03 100644 --- a/util/flash_fp_mcu +++ b/util/flash_fp_mcu @@ -572,21 +572,12 @@ config_nami() { } config_nocturne() { - readonly TRANSPORT="SPI" - readonly DEVICE="/dev/spidev32765.0" - - readonly GPIO_CHIP="gpiochip360" - # FPMCU RST_ODL is on GPP_C10 = 360 + 58 = 418 - readonly GPIO_NRST=418 - # FPMCU BOOT0 is on GPP_C8 = 360 + 56 = 416 - readonly GPIO_BOOT0=416 - # FP_PWR_EN is on GPP_A11 = 360 + 11 = 371 - readonly GPIO_PWREN=371 -} + local device="/dev/spidev1.0" + # Support kernel version 4.4 during transition to 5.10 + match_kernel_regex "^4\.4\." && device="/dev/spidev32765.0" -config_nocturne-kernelnext() { readonly TRANSPORT="SPI" - readonly DEVICE="/dev/spidev1.0" + readonly DEVICE="${device}" readonly GPIO_CHIP="gpiochip360" # FPMCU RST_ODL is on GPP_C10 = 360 + 58 = 418 |