summaryrefslogtreecommitdiff
path: root/board/npcx_evb
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2015-02-25 10:53:07 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-02-26 20:31:58 +0000
commit3ff0be248c0d3b36dccd47599fd311f2204389af (patch)
tree4809db25771cfd7c07497d753c073fc534528821 /board/npcx_evb
parent6aebf13a6b9a88f5c15ef2e7a8d14126add9f66a (diff)
downloadchrome-ec-3ff0be248c0d3b36dccd47599fd311f2204389af.tar.gz
npcx: Use SPI status register instead of pstate
The npcx chip and evb use a SPI flash chip to hold the EC image. They don't need pstate, and should use the SPI flash status register directly. 1. Remove CONFIG_FLASH_PSTATE from npcx_evb. 2. Remap WP_L GPIO to GPIO 93 (this should be the same as the write protect line to the SPI flash chip). 3. Change the npcx flash driver so that it directly reads/writes the SPI status register instead of mucking with pstate. BUG=chrome-os-partner:34346 BRANCH=none TEST=manual Add a switch or jumper to the EVB so R1 can be closed. Toggle the switch and see that WP_L state changes. Leave enabled. flashinfo -> nothing is protected, WP_L is enabled (=0) (also do this after each flashwp command to check the protection status) flashwp enable -> RO is protected now and at boot. reboot flashwp enable -> RO is still protected. flashwp disable -> RO is still protected. (because WP switch is enabled). Toggle the switch so WP_L is disabled (=1) flashwp disable -> Succeeds, flash is not protected Change-Id: Ifa959bce69f8eb4724057ecaa6a6c5075783c19d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/253633 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/npcx_evb')
-rw-r--r--board/npcx_evb/gpio.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/npcx_evb/gpio.inc b/board/npcx_evb/gpio.inc
index be8f5838ad..8457aff4ae 100644
--- a/board/npcx_evb/gpio.inc
+++ b/board/npcx_evb/gpio.inc
@@ -7,7 +7,7 @@
/* TODO: Redefine debug 2 inputs */
GPIO(RECOVERY_L, 0, 0, GPIO_PULL_UP | GPIO_INT_BOTH, switch_interrupt) /* Recovery signal from servo */
-GPIO(WP_L, 0, 1, GPIO_PULL_DOWN | GPIO_INT_BOTH, switch_interrupt) /* Write protect input */
+GPIO(WP_L, 9, 3, GPIO_PULL_DOWN | GPIO_INT_BOTH, switch_interrupt) /* Write protect input */
/* For testing 8042 commands, we need the following GPIOs */
/* TODO: Redefine 4 inputs */