summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch39
1 files changed, 26 insertions, 13 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch
index 7e75acb02..2d63314af 100644
--- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0025-Manufacturing-mode-physical-presence-detection.patch
@@ -1,17 +1,23 @@
-From 0e83d58efe5bd34430c953713285293cd0756b69 Mon Sep 17 00:00:00 2001
+From 4c87d6074fb36d423f135392983d225785abf43a Mon Sep 17 00:00:00 2001
From: AppaRao Puli <apparao.puli@linux.intel.com>
Date: Thu, 20 Jun 2019 18:11:43 +0530
Subject: [PATCH] Manufacturing mode physical presence detection
Support for physical presence of manufacturing mode added.
-Front panel power button press for 8 seconds will be detected
-and marked as special mode for manufacturing request
+Front panel power button press for 15 seconds will be detected
+and marked as special mode for manufacturing request.
+There will be 10 second Status LED blink for 10 seconds to
+do the physical indication to the user. This indicates the
+user that he has pressed power button long enough for
+manufacturing mode detection.
Tested:
1. Verified by holding the power button when u-boot boots for
-8 seconds, and confirmed that bootargs passed to linux has
-special=mfg string
-2. Verified in normal condition special=mfg string is not passed.
+15 seconds, and confirmed that bootargs passed to linux has
+special=mfg string and status led blink physical indication
+has been provided
+2. Verified in normal condition special=mfg string is not passed
+and no physical indication has been provided
Change-Id: Id7e7c7e7860c7ef3ae8e3a7a7cfda7ff506c0f2b
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
@@ -19,8 +25,8 @@ Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
---
board/aspeed/ast-g5/ast-g5-gpio.h | 2 +-
- board/aspeed/ast-g5/ast-g5-intel.c | 31 +++++++++++++++++++++++++++++++
- 2 files changed, 32 insertions(+), 1 deletion(-)
+ board/aspeed/ast-g5/ast-g5-intel.c | 35 +++++++++++++++++++++++++++++++++++
+ 2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/board/aspeed/ast-g5/ast-g5-gpio.h b/board/aspeed/ast-g5/ast-g5-gpio.h
index a820c0f..ed2499f 100644
@@ -36,7 +42,7 @@ index a820c0f..ed2499f 100644
// GPIO Configuration Register bits
#define GPCFG_EVENT_TO_SMI (1 << 7) // 1 == enabled
diff --git a/board/aspeed/ast-g5/ast-g5-intel.c b/board/aspeed/ast-g5/ast-g5-intel.c
-index 55afa09..812e3ef 100644
+index 55afa09..452cb5c 100644
--- a/board/aspeed/ast-g5/ast-g5-intel.c
+++ b/board/aspeed/ast-g5/ast-g5-intel.c
@@ -24,6 +24,7 @@ enum gpio_names {
@@ -58,7 +64,7 @@ index 55afa09..812e3ef 100644
};
#define LPC_SNOOP_ADDR 0x80
-@@ -373,6 +378,26 @@ static void update_bootargs_cmd(const char *key, const char *value)
+@@ -373,6 +378,30 @@ static void update_bootargs_cmd(const char *key, const char *value)
free(buf);
}
@@ -66,11 +72,12 @@ index 55afa09..812e3ef 100644
+{
+ /*
+ * Assume mfg mode physical request is made, if power button
-+ * is pressed continously for 8 seconds, indicate the
++ * is pressed continously for 15 seconds, indicate the
+ * same in bootargs
+ */
+ const uint32_t delay_in_ms = 100;
-+ const uint32_t read_count = ((8 * 1000) / delay_in_ms);
++ const uint32_t read_count = ((15 * 1000) / delay_in_ms);
++ const uint32_t delay_for_indication = 10 * 1000;
+ for (uint32_t count = 0; count < read_count; ++count) {
+ if (!gpio_get_value(GPIO_FP_PWR_BTN))
+ return false;
@@ -78,6 +85,9 @@ index 55afa09..812e3ef 100644
+ mdelay(delay_in_ms);
+ }
+ debug("is_mfg_mode_phy_req : detected mfg mode request\n");
++ id_led_control(GPIO_GREEN_LED, EIDLED_Blink_3HZ);
++ /* Delay the boot to do physical indication for mfg mode */
++ mdelay(delay_for_indication);
+
+ return true;
+}
@@ -85,7 +95,7 @@ index 55afa09..812e3ef 100644
void ast_g5_intel_late_init(void)
{
char value[32];
-@@ -420,6 +445,12 @@ void ast_g5_intel_late_init(void)
+@@ -420,6 +449,12 @@ void ast_g5_intel_late_init(void)
ast_scu_write(0, AST_SCU_SYS_CTRL);
update_bootargs_cmd("resetreason", value);
@@ -98,3 +108,6 @@ index 55afa09..812e3ef 100644
}
static void pwm_init(void)
+--
+2.7.4
+