aboutsummaryrefslogtreecommitdiff
path: root/drivers/renesas
diff options
context:
space:
mode:
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2021-04-19 17:03:56 +0100
committerLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2021-04-20 16:17:50 +0100
commitb939cbbb8d64844cf2a8ba35014594212bcd81fd (patch)
treeea00e1618e5bad9e78e62b8ebb7b71b87dce32de /drivers/renesas
parentec3e2f67191558ae80005154455c592b93844045 (diff)
downloadtrusted-firmware-a-b939cbbb8d64844cf2a8ba35014594212bcd81fd.tar.gz
drivers: renesas: common: Add support for DRAM initialization on RZ/G2N SoC
Add support for initializing DRAM on RZ/G2N SoC. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Change-Id: Id09a367b92b11a5da88f2dce6887677cc935d0c0
Diffstat (limited to 'drivers/renesas')
-rw-r--r--drivers/renesas/common/ddr/ddr_b/boot_init_dram.c3
-rw-r--r--drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c37
2 files changed, 37 insertions, 3 deletions
diff --git a/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c b/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c
index 859c05b369..aa3bc245b7 100644
--- a/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c
+++ b/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c
@@ -38,6 +38,7 @@
#define RZ_G2M 100U
#define RZ_G2H 101U
+#define RZ_G2N 102U
#define RCAR_CUT_10 0
#define RCAR_CUT_11 1
@@ -56,7 +57,7 @@ static uint32_t prr_cut;
static const uint32_t prr_product = PRR_PRODUCT_H3;
#elif(RCAR_LSI == RCAR_M3 || RCAR_LSI == RZ_G2M)
static const uint32_t prr_product = PRR_PRODUCT_M3;
-#elif(RCAR_LSI == RCAR_M3N)
+#elif(RCAR_LSI == RCAR_M3N || RCAR_LSI == RZ_G2N)
static const uint32_t prr_product = PRR_PRODUCT_M3N;
#elif(RCAR_LSI == RCAR_H3N || RCAR_LSI == RZ_G2H)
static const uint32_t prr_product = PRR_PRODUCT_H3;
diff --git a/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c b/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c
index 9ce51cfa3a..45b6b088c1 100644
--- a/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c
+++ b/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c
@@ -10,7 +10,7 @@
#endif
#if (RZG_SOC == 1)
-#define BOARDNUM 3
+#define BOARDNUM 4
#else
#define BOARDNUM 22
#endif /* RZG_SOC == 1 */
@@ -260,7 +260,37 @@ static const struct _boardcnf boardcnfs[BOARDNUM] = {
0, 0, 0, 0, 0, 0, 0, 0 }
}
}
- }
+ },
+/* boardcnf[3] HopeRun HiHope RZ/G2N board 16Gbit/2rank/1ch */
+ {
+ 0x01U,
+ 0x01U,
+ 0x0300U,
+ 0,
+ 0x0300U,
+ 0x00a0U,
+ {
+ {
+ { 0x04U, 0x04U },
+ 0x00345201UL,
+ 0x3201U,
+ { 0x01672543U, 0x45361207U, 0x45632107U, 0x60715234U },
+ { 0x08U, 0x08U, 0x08U, 0x08U },
+ WDQLVL_PAT,
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0 }
+ }
+ }
+ },
};
#else
static const struct _boardcnf boardcnfs[BOARDNUM] = {
@@ -1926,6 +1956,9 @@ static uint32_t rzg2_board_judge(void)
case PRR_PRODUCT_H3:
brd = 2U;
break;
+ case PRR_PRODUCT_M3N:
+ brd = 3U;
+ break;
default:
brd = 99U;
}