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>
This commit is contained in:
parent
1e2abe05a8
commit
2580508a11
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue