summaryrefslogtreecommitdiff
path: root/board/nocturne_fp
diff options
context:
space:
mode:
Diffstat (limited to 'board/nocturne_fp')
-rwxr-xr-xboard/nocturne_fp/flash_fp_mcu20
1 files changed, 3 insertions, 17 deletions
diff --git a/board/nocturne_fp/flash_fp_mcu b/board/nocturne_fp/flash_fp_mcu
index 0fc40b7d12..09a364bc65 100755
--- a/board/nocturne_fp/flash_fp_mcu
+++ b/board/nocturne_fp/flash_fp_mcu
@@ -1,26 +1,12 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# Cannonlake PCH GPIOs
-CNL_GPIOCHIP="gpiochip268"
# Kabylake PCH GPIOs
KBL_GPIOCHIP="gpiochip360"
-if [ -e "/sys/class/gpio/${CNL_GPIOCHIP}" ]; then
- # Meowth configuration
-
- SPIDEV="/dev/spidev1.0"
- # GSPI1 ACPI device for FP MCU
- SPIID="spi-PRP0001:01"
- # FPMCU RST_ODL is on GPP_A23 = 268 + 23 = 291
- GPIO_NRST=291
- # FPMCU BOOT0 is on GPP_A21 = 268 + 21 = 289
- GPIO_BOOT0=289
- # FP_PWR_EN is on GPP_A11 = 268 + 11 = 279
- GPIO_PWREN=279
-elif [ -e "/sys/class/gpio/${KBL_GPIOCHIP}" ]; then
+if [[ -e "/sys/class/gpio/${KBL_GPIOCHIP}" ]]; then
# Nocturne configuration
SPIDEV="/dev/spidev32765.0"
@@ -37,7 +23,7 @@ else
exit 1
fi
-if [ ! -f "$1" ]; then
+if [[ ! -f "$1" ]]; then
echo "Invalid image file: $1"
echo "Usage: $0 ec.bin"
exit 1