From: Horatiu Vultur <horatiu.vultur@microchip.com>
Date: Tue, 29 Jan 2019 09:58:34 +0000 (+0100)
Subject: MSCC: Fix Jaguar2 board detection.
X-Git-Tag: v2025.01-rc5-pxa1908~3142^2~9
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/git-favicon.png?a=commitdiff_plain;h=78b543141090b7c35a64418157b5194588a9f955;p=u-boot.git

MSCC: Fix Jaguar2 board detection.

When power cycle the Jaguar2 boards, it couldn't read the
phys, therefore it always deduce that the board type is
pcb111.

Add a small delay after setting the gpio pins, fix the
issue.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---

diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c
index 226181f6e7..58a4a04162 100644
--- a/board/mscc/jr2/jr2.c
+++ b/board/mscc/jr2/jr2.c
@@ -80,6 +80,9 @@ static void do_board_detect(void)
 	for (i = 56; i < 60; i++)
 		vcoreiii_gpio_set_alternate(i, 1);
 
+	/* small delay for settling the pins */
+	mdelay(30);
+
 	if (mscc_phy_rd(0, 0x10, 0x3, &pval) == 0 &&
 	    ((pval >> 4) & 0x3F) == 0x3c) {
 		gd->board_type = BOARD_TYPE_PCB112; /* Serval2-NID */