summaryrefslogtreecommitdiff
path: root/board/ti
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2020-02-10 11:59:24 +0200
committerLokesh Vutla <lokeshvutla@ti.com>2020-02-13 21:39:18 +0530
commit4d26dc64d28fee87359d1324f4db8986c5c97f82 (patch)
tree849b02f8d898532ac8322a723ac6b754217ef780 /board/ti
parentb9c268c90e32ac5a31fec71527ec365f14ac9c52 (diff)
board: ti: am57xx-idk: Prevent boot for invalid configuation
On am571x-idk there can be following configurations based on Jumper J51 and LCD panel detected. 1) J51 removed (6port): 6 port Ethernet. Disable LCD panel. 2) J51 placed (LCD) + Panel detected: 4 port Ethernet with appropriate LCD. 3) J51 placed (LCD) + Panel not detected/not supported. Configuration 3 is considered invalid as we can't use display nor ICSS1 ethernet ports due to hardware muxing. Alert the user to fix the configuration and prevent boot. Alternative was to allow boot and limit to 4 port Ethernet with no display but this involved introduction of another DTB for the kernel and was considered not worth the hassle. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Suman Anna <s-anna@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'board/ti')
-rw-r--r--board/ti/am57xx/board.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 7528de3e5c..34ca3ec9b0 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -36,6 +36,7 @@
#include <ti-usb-phy-uboot.h>
#include <mmc.h>
#include <dm/uclass.h>
+#include <hang.h>
#include "../common/board_detect.h"
#include "mux_data.h"
@@ -707,6 +708,18 @@ void am57x_idk_lcd_detect(void)
}
out:
env_set("idk_lcd", idk_lcd);
+
+ /*
+ * On AM571x_IDK, no Display with J51 set to LCD is considered as an
+ * invalid configuration and we prevent boot to get user attention.
+ */
+ if (board_is_am571x_idk() && am571x_idk_needs_lcd() &&
+ !strncmp(idk_lcd, "no", 2)) {
+ printf("%s: Invalid HW configuration: display not detected/supported but J51 is set. Remove J51 to boot without display.\n",
+ __func__);
+ hang();
+ }
+
return;
}