summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Dixon <joth@google.com>2015-04-01 14:02:34 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-22 09:03:10 +0200
commit2580508a1104c65dd30e097285b68ddb84133eb9 (patch)
treeb7db00352917cfec2f863379c4f3b1493f893310
parent1e2abe05a89cb8ff073837f733185fba2f112610 (diff)
google/veyron_rialto: support the developer key GPIO
Currently (EVT) this is a pullup resistor on the board (i.e. always in dev mode). Future builds it will be pull down and require servo or HW modification to control. Either way, this change means the FW should acknowledge it. BUG=chrome-os-partner:38663 TEST=Manually verified that servo devmode switch toggles this GPIO. requires FW signing to verify GPIO is observed and dev mode active. BRANCH=none Change-Id: Ib05216992abc5f6175fe7395471bd379f185b61f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 702c8d222a3d19d6b8db89d122dcdf594c85da99 Original-Change-Id: I1d0f31819b9f7a1ab63deac52bcaf0b996499b0c Original-Reviewed-on: https://chromium-review.googlesource.com/263529 Original-Reviewed-by: Hung-Te Lin <hungte@chromium.org> Original-Tested-by: Jonathan Dixon <joth@chromium.org> Original-Commit-Queue: Jonathan Dixon <joth@chromium.org> Reviewed-on: http://review.coreboot.org/9928 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/mainboard/google/veyron_rialto/Kconfig1
-rw-r--r--src/mainboard/google/veyron_rialto/chromeos.c8
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mainboard/google/veyron_rialto/Kconfig b/src/mainboard/google/veyron_rialto/Kconfig
index f4a90df91b..597dd19634 100644
--- a/src/mainboard/google/veyron_rialto/Kconfig
+++ b/src/mainboard/google/veyron_rialto/Kconfig
@@ -35,7 +35,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
- select VIRTUAL_DEV_SWITCH
config MAINBOARD_DIR
string
diff --git a/src/mainboard/google/veyron_rialto/chromeos.c b/src/mainboard/google/veyron_rialto/chromeos.c
index 9efa855f24..4b78ba88f1 100644
--- a/src/mainboard/google/veyron_rialto/chromeos.c
+++ b/src/mainboard/google/veyron_rialto/chromeos.c
@@ -29,6 +29,8 @@
#define GPIO_POWER GPIO(0, A, 5)
#define GPIO_RECOVERY_SERVO GPIO(0, B, 1)
#define GPIO_RECOVERY_PUSHKEY GPIO(7, B, 1)
+#define GPIO_DEVELOPER_SWITCH GPIO(7, B, 2)
+
void setup_chromeos_gpios(void)
{
@@ -36,6 +38,7 @@ void setup_chromeos_gpios(void)
gpio_input(GPIO_POWER);
gpio_input_pullup(GPIO_RECOVERY_SERVO);
gpio_input_pullup(GPIO_RECOVERY_PUSHKEY);
+ gpio_input(GPIO_DEVELOPER_SWITCH); // board has pull up/down resistor.
}
void fill_lb_gpios(struct lb_gpios *gpios)
@@ -70,7 +73,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
count++;
/* Developer: GPIO active high */
- gpios->gpios[count].port = -1;
+ gpios->gpios[count].port = GPIO_DEVELOPER_SWITCH.raw;
gpios->gpios[count].polarity = ACTIVE_HIGH;
gpios->gpios[count].value = get_developer_mode_switch();
strncpy((char *)gpios->gpios[count].name, "developer",
@@ -93,7 +96,8 @@ void fill_lb_gpios(struct lb_gpios *gpios)
int get_developer_mode_switch(void)
{
- return 0;
+ // GPIO_DEVELOPER_SWITCH is active high.
+ return gpio_get(GPIO_DEVELOPER_SWITCH);
}
int get_recovery_mode_switch(void)