summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2016-05-16 17:15:38 +0800
committerPeng Fan <peng.fan@nxp.com>2016-05-16 17:15:38 +0800
commit4797d83b0b259101cc417e6d302c8717201a4d2c (patch)
tree9c70f39695638d21c84cbda94f415e359ca0cd62
parent7d7f4886d58f8adc52ff61efa05f5e1c3e608c59 (diff)
downloadu-boot-imx-4797d83b0b259101cc417e6d302c8717201a4d2c.zip
u-boot-imx-4797d83b0b259101cc417e6d302c8717201a4d2c.tar.gz
u-boot-imx-4797d83b0b259101cc417e6d302c8717201a4d2c.tar.bz2
MLK-12800 imx: mx7dsabresd: support revC
Add revC board support. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 1f0bb3940876c9b0be6f3c5fc320dde81ced4d97) (cherry picked from commit e28beed75d8c501777f6eeadd127b1cb601115f8)
-rw-r--r--board/freescale/mx7dsabresd/mx7dsabresd.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 42ca8c5..6397ae2 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -277,6 +277,7 @@ void iox74lv_set(int index)
gpio_direction_output(IOX_STCP, 1);
};
+#define BOARD_REV_C 0x300
#define BOARD_REV_B 0x200
#define BOARD_REV_A 0x100
@@ -294,6 +295,9 @@ static int mx7sabre_rev(void)
if (reg != 0) {
switch (reg >> 8 & 0x0F) {
+ case 0x3:
+ ret = BOARD_REV_C;
+ break;
case 0x02:
ret = BOARD_REV_B;
break;
@@ -306,8 +310,10 @@ static int mx7sabre_rev(void)
/* If the gp1 fuse is not burn, we have to use TO rev for the board rev */
if (0 == is_soc_rev(CHIP_REV_1_0))
ret = BOARD_REV_A;
- else
+ else if (0 == is_soc_rev(CHIP_REV_1_1))
ret = BOARD_REV_B;
+ else
+ ret = BOARD_REV_C;
}
return ret;
@@ -683,7 +689,7 @@ static void setup_iomux_fec(void)
if (0 == CONFIG_FEC_ENET_DEV) {
imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads));
} else {
- if (mx7sabre_rev() == BOARD_REV_B) {
+ if (mx7sabre_rev() >= BOARD_REV_B) {
/* On RevB, GPIO1_IO04 is used for ENET2 EN,
* so set its output to low to enable ENET2 signals
*/
@@ -990,7 +996,7 @@ int board_init(void)
#endif
#ifdef CONFIG_MXC_EPDC
- if (mx7sabre_rev() == BOARD_REV_B) {
+ if (mx7sabre_rev() >= BOARD_REV_B) {
/* On RevB, GPIO1_IO04 is used for ENET2 EN,
* so set its output to high to isolate the ENET2 signals for EPDC
*/
@@ -1087,6 +1093,9 @@ int checkboard(void)
char *revname;
switch (rev) {
+ case BOARD_REV_C:
+ revname = "C";
+ break;
case BOARD_REV_B:
revname = "B";
break;
@@ -1123,7 +1132,7 @@ int board_ehci_hcd_init(int port)
ARRAY_SIZE(usb_otg1_pads));
break;
case 1:
- if (mx7sabre_rev() == BOARD_REV_B)
+ if (mx7sabre_rev() >= BOARD_REV_B)
imx_iomux_v3_setup_multiple_pads(usb_otg2_revB_pads,
ARRAY_SIZE(usb_otg2_revB_pads));
else