From patchwork Wed Mar 25 06:45:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moses Christopher X-Patchwork-Id: 244230 List-Id: U-Boot discussion From: BollavarapuMoses.Christopher at in.bosch.com (Moses Christopher) Date: Wed, 25 Mar 2020 06:45:45 +0000 Subject: [PATCH 2/5] am335x, guardian: boot stage feedback in headless mode In-Reply-To: <20200325064548.31924-1-BollavarapuMoses.Christopher@in.bosch.com> References: <20200325064548.31924-1-BollavarapuMoses.Christopher@in.bosch.com> Message-ID: <20200325064548.31924-3-BollavarapuMoses.Christopher@in.bosch.com> This patch enables the guardian board to provide feedback about the boot stage in headless mode. The on-board led would behave in the following pattern * U-boot -> GLOW LED * Linux -> BLINK LED [HEART-BEAT PATTERN] Signed-off-by: Moses Christopher --- arch/arm/dts/am335x-guardian.dts | 2 +- board/bosch/guardian/board.c | 4 ++++ configs/am335x_guardian_defconfig | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/am335x-guardian.dts b/arch/arm/dts/am335x-guardian.dts index 5ed2133e78..b554be97a3 100644 --- a/arch/arm/dts/am335x-guardian.dts +++ b/arch/arm/dts/am335x-guardian.dts @@ -58,7 +58,7 @@ label = "guardian:life-led"; gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; - default-state = "off"; + default-state = "on"; }; }; diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index 32ebaf4231..03ba9e8c5e 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -232,6 +233,9 @@ err: int board_late_init(void) { +#ifdef CONFIG_LED_GPIO + led_default_state(); +#endif set_bootmode_env(); return 0; } diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig index eb2d221f4c..942530d76e 100644 --- a/configs/am335x_guardian_defconfig +++ b/configs/am335x_guardian_defconfig @@ -37,6 +37,7 @@ CONFIG_CMD_SPL=y CONFIG_CMD_SPL_NAND_OFS=0x0 CONFIG_CMD_ASKENV=y # CONFIG_CMD_FLASH is not set +# CONFIG_CMD_LED is not set CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y @@ -58,6 +59,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SPL_DM=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y +CONFIG_LED=y +CONFIG_LED_GPIO=y CONFIG_MISC=y # CONFIG_MMC is not set CONFIG_MTD=y