[U-Boot] [RFT 1/8] exynos: Redo detection of revision when all resources are ready
krzk at kernel.org
Sat Feb 9 22:54:04 UTC 2019
Detection of board type is done early - before power setup. In case of
Odroid XU3/XU4/HC1 family, the detection is done using ADC which
is supplied by LDO4/VDD_ADC regulator. This regulator could be turned
off (e.g. by kernel before reboot); If ADC is used early, the
regulators are not yet available and the detection won't work.
Try to detect the revision again, once power is brought up.
This is necessary to fix the detection of Odroid HC1 after reboot, if
kernel turned off the LDO4 regulator. Otherwise the board is not
Signed-off-by: Krzysztof Kozlowski <krzk at kernel.org>
board/samsung/common/board.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 6fd26a3a9198..1e2dabe68d11 100644
@@ -147,6 +147,11 @@ int board_early_init_f(void)
+ * It is done early so power might not be set up yet. In such case
+ * specific revision detection with ADC might not work and need to me
+ * redone later.
err = board_uart_init();
@@ -166,9 +171,21 @@ int board_early_init_f(void)
#if defined(CONFIG_POWER) || defined(CONFIG_DM_PMIC)
+ int ret;
- return exynos_power_init();
+ ret = exynos_power_init();
+ * Since power is on, redo the board detection (external peripherals
+ * are on).
+ return ret;
More information about the U-Boot