diff options
author | Lukasz Majewski | 2019-07-28 00:17:05 +0200 |
---|---|---|
committer | Stefano Babic | 2019-10-08 16:35:59 +0200 |
commit | 1ff6c1f75b292cd789995689770bfbcd90d2421d (patch) | |
tree | 50b4b244f4f1feec8e6abf31a99670694d8852f4 /board/phytec | |
parent | 77ecf95f22dc5cb0a9709805dd22555007d60b34 (diff) |
imx: bk4: Print proper HW revision of VF610's BK4 board
This code uses HW difference on the USB_RESET pin (added PULL UP resistor
on the L333 rev) to distinguish between two BK4 HW revisions.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'board/phytec')
-rw-r--r-- | board/phytec/pcm052/pcm052.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index e1ebe8e75d0..b52432e6536 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -403,7 +403,20 @@ int board_phy_config(struct phy_device *phydev) int checkboard(void) { #ifdef CONFIG_TARGET_BK4R1 - puts("Board: BK4r1 (L333)\n"); + u32 *gpio3_pdir = (u32 *)(GPIO3_BASE_ADDR + 0x10); + + /* + * USB_RESET_N (PTC30 - GPIO103 - PORT3[7]): + * L333 -> pull up added -> read 1 + * L320 -> no pull up -> read 0 + * + * Default iomuxc_ptc30 value after reset: 0x300061 -> RCON28 + * - input enabled, pull (up/down) disabled + */ + if (*gpio3_pdir & BIT(7)) + puts("Board: BK4r1 (L333)\n"); + else + puts("Board: BK4r1 (L320)\n"); #else puts("Board: PCM-052\n"); #endif |