[coreboot-gerrit] Patch set updated for coreboot: c9c37ef6 veyron_rialto: Change recovery GPIO to PUSH_KEY.
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Tue Apr 14 15:02:37 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9657
-gerrit
commit c9c37ef6f44211ebd2a8f5966f7b531cec8a27ab
Author: Hung-Te Lin <hungte at chromium.org>
Date: Fri Jan 30 11:55:39 2015 +0800
veyron_rialto: Change recovery GPIO to PUSH_KEY.
The recovery button on Rialto should be GPIO 255, the LED Push Key.
Note we want to keep the recovery button on servo functional because
many protos are not assembled and developers can't "push" the push key.
The GPIO passed to payloads (and kernel) is only mapped to Push Key.
BUG=none
TEST=emerge-veyron_rialto coreboot chromeos-bootimage
BRANCH=veyron_rialto
Change-Id: I66f94cf232caa53a3b28db517620e4b6e9b9af0e
Signed-off-by: Stefan Reinauer <reinauer at chromium.org>
Original-Commit-Id: 66ee55f6312efaeb337eb2881cd5eff5365b4105
Original-Change-Id: I0a7ebeed6506fbd938084c9a078a7cf1c7b914b9
Original-Signed-off-by: Hung-Te Lin <hungte at chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/244515
Original-Reviewed-by: David Hendricks <dhendrix at chromium.org>
---
src/mainboard/google/veyron_rialto/chromeos.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/mainboard/google/veyron_rialto/chromeos.c b/src/mainboard/google/veyron_rialto/chromeos.c
index 9e7317d..9efa855 100644
--- a/src/mainboard/google/veyron_rialto/chromeos.c
+++ b/src/mainboard/google/veyron_rialto/chromeos.c
@@ -27,13 +27,15 @@
#define GPIO_WP GPIO(7, A, 6)
#define GPIO_POWER GPIO(0, A, 5)
-#define GPIO_RECOVERY GPIO(0, B, 1)
+#define GPIO_RECOVERY_SERVO GPIO(0, B, 1)
+#define GPIO_RECOVERY_PUSHKEY GPIO(7, B, 1)
void setup_chromeos_gpios(void)
{
gpio_input(GPIO_WP);
gpio_input(GPIO_POWER);
- gpio_input_pullup(GPIO_RECOVERY);
+ gpio_input_pullup(GPIO_RECOVERY_SERVO);
+ gpio_input_pullup(GPIO_RECOVERY_PUSHKEY);
}
void fill_lb_gpios(struct lb_gpios *gpios)
@@ -49,9 +51,12 @@ void fill_lb_gpios(struct lb_gpios *gpios)
count++;
/* Recovery: active low */
- gpios->gpios[count].port = GPIO_RECOVERY.raw;
+ /* Note for early development, we want to support both servo and
+ * pushkey recovery buttons in firmware boot stages.
+ */
+ gpios->gpios[count].port = GPIO_RECOVERY_PUSHKEY.raw;
gpios->gpios[count].polarity = ACTIVE_LOW;
- gpios->gpios[count].value = gpio_get(GPIO_RECOVERY);
+ gpios->gpios[count].value = !get_recovery_mode_switch();
strncpy((char *)gpios->gpios[count].name, "recovery",
GPIO_MAX_NAME_LENGTH);
count++;
@@ -93,7 +98,9 @@ int get_developer_mode_switch(void)
int get_recovery_mode_switch(void)
{
- return !gpio_get(GPIO_RECOVERY);
+ // Both RECOVERY_SERVO and RECOVERY_PUSHKEY are low active.
+ return !(gpio_get(GPIO_RECOVERY_SERVO) &&
+ gpio_get(GPIO_RECOVERY_PUSHKEY));
}
int get_write_protect_state(void)
More information about the coreboot-gerrit
mailing list