summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorIan Ray <ian.ray@ge.com>2020-11-04 17:18:43 +0100
committerStefano Babic <sbabic@denx.de>2020-12-06 15:31:37 +0100
commit4f1970f4373566190fc447bf7e27e9e95ec84cf8 (patch)
tree8bdade753ae191d4f94274256d90c2241c3df9b9 /board
parent559aaa2526dc0c1e1cca2ff3b1614f2991d1a7e6 (diff)
downloadu-boot-4f1970f4373566190fc447bf7e27e9e95ec84cf8.tar.gz
u-boot-4f1970f4373566190fc447bf7e27e9e95ec84cf8.tar.xz
u-boot-4f1970f4373566190fc447bf7e27e9e95ec84cf8.zip
board: ge: bx50v3: check b850v3 power management watchdog
Set `bootcause' from b850v3 power management watchdog status. Boot cause "REVERT" is no longer used, remove it. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'board')
-rw-r--r--board/ge/bx50v3/bx50v3.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 8e7b90a10c..4754647fb4 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -384,6 +384,7 @@ static iomux_v3_cfg_t const misc_pads[] = {
MX6_PAD_GPIO_9__WDOG1_B | MUX_PAD_CTRL(NC_PAD_CTRL),
};
#define SUS_S3_OUT IMX_GPIO_NR(4, 11)
+#define PWGIN_IN IMX_GPIO_NR(4, 14)
#define WIFI_EN IMX_GPIO_NR(6, 14)
int board_early_init_f(void)
@@ -416,6 +417,9 @@ int board_init(void)
gpio_request(SUS_S3_OUT, "sus_s3_out");
gpio_direction_output(SUS_S3_OUT, 1);
+ gpio_request(PWGIN_IN, "pwgin_in");
+ gpio_direction_input(PWGIN_IN);
+
gpio_request(WIFI_EN, "wifi_en");
gpio_direction_output(WIFI_EN, 1);
@@ -465,6 +469,17 @@ void pmic_init(void)
}
}
+static void detect_boot_cause(void)
+{
+ const char *cause = "POR";
+
+ if (is_b850v3())
+ if (!gpio_get_value(PWGIN_IN))
+ cause = "PM_WDOG";
+
+ env_set("bootcause", cause);
+}
+
int board_late_init(void)
{
process_vpd(&vpd);
@@ -478,6 +493,8 @@ int board_late_init(void)
else
env_set("videoargs", "video=LVDS-1:1024x768@65");
+ detect_boot_cause();
+
/* board specific pmic init */
pmic_init();