aboutsummaryrefslogtreecommitdiff
path: root/drivers/renesas/rzg
diff options
context:
space:
mode:
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2021-03-19 12:14:01 +0000
committerLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2021-04-20 16:17:50 +0100
commitbcf43f04863c458d01991b4df5d7cdb299e20cd8 (patch)
tree5b436917b3d6dc677f59fbefbeaacd5dc790a195 /drivers/renesas/rzg
parent2c10d4e29a9b1032b372f73b069be429b79fd82a (diff)
downloadtrusted-firmware-a-bcf43f04863c458d01991b4df5d7cdb299e20cd8.tar.gz
renesas: rzg: Add support to identify EK874 RZ/G2E board
Add support to identify Silicon Linux RZ/G2E evaluation kit (EK874). Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Change-Id: Id7bdbc9b0d25aa9af496d58d4bd5055579edc104
Diffstat (limited to 'drivers/renesas/rzg')
-rw-r--r--drivers/renesas/rzg/board/board.c18
-rw-r--r--drivers/renesas/rzg/board/board.h1
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/renesas/rzg/board/board.c b/drivers/renesas/rzg/board/board.c
index 60e6380dea..7636372289 100644
--- a/drivers/renesas/rzg/board/board.c
+++ b/drivers/renesas/rzg/board/board.c
@@ -17,6 +17,8 @@
#define BOARD_DEFAULT (BOARD_HIHOPE_RZ_G2H << BOARD_CODE_SHIFT)
#elif (RCAR_LSI == RZ_G2N)
#define BOARD_DEFAULT (BOARD_HIHOPE_RZ_G2N << BOARD_CODE_SHIFT)
+#elif (RCAR_LSI == RZ_G2E)
+#define BOARD_DEFAULT (BOARD_EK874_RZ_G2E << BOARD_CODE_SHIFT)
#else
#define BOARD_DEFAULT (BOARD_HIHOPE_RZ_G2M << BOARD_CODE_SHIFT)
#endif /* RCAR_LSI == RZ_G2H */
@@ -35,11 +37,13 @@
#define HM_ID { 0x10U, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU }
#define HH_ID HM_ID
#define HN_ID { 0x20U, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU }
+#define EK_ID HM_ID
const char *g_board_tbl[] = {
[BOARD_HIHOPE_RZ_G2M] = "HiHope RZ/G2M",
[BOARD_HIHOPE_RZ_G2H] = "HiHope RZ/G2H",
[BOARD_HIHOPE_RZ_G2N] = "HiHope RZ/G2N",
+ [BOARD_EK874_RZ_G2E] = "EK874 RZ/G2E",
[BOARD_UNKNOWN] = "unknown"
};
@@ -50,8 +54,12 @@ void rzg_get_board_type(uint32_t *type, uint32_t *rev)
[BOARD_HIHOPE_RZ_G2M] = HM_ID,
[BOARD_HIHOPE_RZ_G2H] = HH_ID,
[BOARD_HIHOPE_RZ_G2N] = HN_ID,
+ [BOARD_EK874_RZ_G2E] = EK_ID,
};
- uint32_t reg, boardInfo;
+ uint32_t reg;
+#if (RCAR_LSI != RZ_G2E)
+ uint32_t boardInfo;
+#endif /* RCAR_LSI == RZ_G2E */
if (board_id == BOARD_ID_UNKNOWN) {
board_id = BOARD_DEFAULT;
@@ -66,6 +74,13 @@ void rzg_get_board_type(uint32_t *type, uint32_t *rev)
}
reg = mmio_read_32(RCAR_PRR);
+#if (RCAR_LSI == RZ_G2E)
+ if (reg & RCAR_MINOR_MASK) {
+ *rev = 0x30U;
+ } else {
+ *rev = board_tbl[*type][(uint8_t)(board_id & BOARD_REV_MASK)];
+ }
+#else
if ((reg & PRR_CUT_MASK) == RCAR_M3_CUT_VER11) {
*rev = board_tbl[*type][(uint8_t)(board_id & BOARD_REV_MASK)];
} else {
@@ -78,4 +93,5 @@ void rzg_get_board_type(uint32_t *type, uint32_t *rev)
((boardInfo & GP5_21_BIT) >> 17)) + 0x30U;
}
}
+#endif /* RCAR_LSI == RZ_G2E */
}
diff --git a/drivers/renesas/rzg/board/board.h b/drivers/renesas/rzg/board/board.h
index 7165d45520..1a768490c8 100644
--- a/drivers/renesas/rzg/board/board.h
+++ b/drivers/renesas/rzg/board/board.h
@@ -11,6 +11,7 @@ enum rzg2_board_id {
BOARD_HIHOPE_RZ_G2M = 0,
BOARD_HIHOPE_RZ_G2H,
BOARD_HIHOPE_RZ_G2N,
+ BOARD_EK874_RZ_G2E,
BOARD_UNKNOWN
};