diff options
author | Mathew King <mathewk@chromium.org> | 2021-02-24 14:36:54 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2021-03-02 06:31:03 +0000 |
commit | 1037e341233a7ac87dbaf9e2544571b892a3262c (patch) | |
tree | 3be25a09dab6fde5bb46530681ad60d07b4fb4a7 /src/mainboard | |
parent | 4778590d159a13409e413556d32cbfea39ba207a (diff) |
mb/google/guybrush: Add option to toggle GPIO for sign of life
Enabling the GPIO_SIGN_OF_LIFE option will allow for early boot testing.
BUG=b:180721202
TEST=builds
Change-Id: I069623ae76a4e4d1e43a47dd95fdfcece398ebfb
Signed-off-by: Mathew King <mathewk@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51069
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/guybrush/Kconfig | 7 | ||||
-rw-r--r-- | src/mainboard/google/guybrush/bootblock.c | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/mainboard/google/guybrush/Kconfig b/src/mainboard/google/guybrush/Kconfig index bd4848ca88..46e8a5ab32 100644 --- a/src/mainboard/google/guybrush/Kconfig +++ b/src/mainboard/google/guybrush/Kconfig @@ -55,4 +55,11 @@ config MAINBOARD_FAMILY string default "Google_Guybrush" +config GPIO_SIGN_OF_LIFE + def_bool n + help + Enable toggling GPIO 31 as a sign of life on Guybrush + + TODO: Remove this option when board is booting + endif # BOARD_GOOGLE_BASEBOARD_GUYBRUSH diff --git a/src/mainboard/google/guybrush/bootblock.c b/src/mainboard/google/guybrush/bootblock.c index d7a30b0d11..5eacd0b9d0 100644 --- a/src/mainboard/google/guybrush/bootblock.c +++ b/src/mainboard/google/guybrush/bootblock.c @@ -2,6 +2,9 @@ #include <bootblock_common.h> #include <baseboard/variants.h> +#include <delay.h> +#include <gpio.h> +#include <soc/gpio.h> void bootblock_mainboard_early_init(void) { @@ -10,4 +13,13 @@ void bootblock_mainboard_early_init(void) gpios = variant_bootblock_gpio_table(&num_gpios); program_gpios(gpios, num_gpios); + + if (CONFIG(GPIO_SIGN_OF_LIFE)) { + for (int x = 0; x < 20; x++) { + gpio_set(GPIO_31, 1); + mdelay(10); + gpio_set(GPIO_31, 0); + mdelay(10); + } + } } |