]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
am335x, guardian: boot stage feedback in headless mode
authorMoses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
Wed, 25 Mar 2020 06:45:45 +0000 (06:45 +0000)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 14 Apr 2020 10:14:48 +0000 (15:44 +0530)
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 <BollavarapuMoses.Christopher@in.bosch.com>
arch/arm/dts/am335x-guardian.dts
board/bosch/guardian/board.c
configs/am335x_guardian_defconfig

index 5ed2133e78eeac2e7a0130cd77748e9bf581e5a3..b554be97a3a3dac7047777b2d4c684f085236f3e 100644 (file)
@@ -58,7 +58,7 @@
                        label = "guardian:life-led";
                        gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "heartbeat";
-                       default-state = "off";
+                       default-state = "on";
                };
        };
 
index 32ebaf42317dc6115d073e95eba162d5c791180d..03ba9e8c5ece6465536f432d37c8bc832b8b27f0 100644 (file)
@@ -14,6 +14,7 @@
 #include <env_internal.h>
 #include <errno.h>
 #include <i2c.h>
+#include <led.h>
 #include <miiphy.h>
 #include <panel.h>
 #include <power/tps65217.h>
@@ -232,6 +233,9 @@ err:
 
 int board_late_init(void)
 {
+#ifdef CONFIG_LED_GPIO
+       led_default_state();
+#endif
        set_bootmode_env();
        return 0;
 }
index eb2d221f4c940e526049f04925a331d26240eca1..942530d76e51b8f0b65ec269a9c983eac85623b2 100644 (file)
@@ -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