From 9513e608f3063fdb3e9d8bd04e6e5fe35a5bfcee Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 27 Oct 2013 15:20:54 -0700 Subject: [PATCH] nyan: Ignore the dev mode GPIO. This GPIO is still wired up and can be manipulated from servo, but using it in the coreboot tables causes a couple problems. First, people may not realize that the little switch on their servo matters and may be confused when their machine isn't doing what they told it to. Second, dev mode is considered selected when the GPIO is high. To simplify matching voltages and to ensure the GPIO doesn't float around when no servo is attached, it has a pull up configured for it in the SOC. That means that when no servo is attached, the pin will be pulled high, effectively forcing the machine into developer mode. With might be able to reverse the polarity of the GPIO through config files for servo which could deal with the second problem, but we would still have the first problem. To simplify things and to avoid unforseen problems related to this GPIO, I think it's best to just ignore its value like other chromebooks do and to rely on the soft dev mode setting stored elsewhere. BUG=None TEST=Built and booted on nyan. Entered and exited dev mode using the keyboard and hacking get_recovery_mode_switch to return yes or no at the appropriate times. BRANCH=None Change-Id: I80c5e2d290ce9f1c3d60ef45c9132ddfd8ce7680 Signed-off-by: Gabe Black Reviewed-on: https://chromium-review.googlesource.com/174837 Reviewed-by: Ronald Minnich Tested-by: Gabe Black Commit-Queue: Gabe Black --- src/mainboard/google/nyan/chromeos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/google/nyan/chromeos.c b/src/mainboard/google/nyan/chromeos.c index 8cf16bbb72..5fe4429553 100644 --- a/src/mainboard/google/nyan/chromeos.c +++ b/src/mainboard/google/nyan/chromeos.c @@ -81,7 +81,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_developer_mode_switch(void) { - return gpio_get_in_value(GPIO(Q6)); + return 0; } int get_recovery_mode_switch(void)