summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)