arm-trusted-firmware: Default to 16-bit DDR4 on CN9130 boards

This commit is contained in:
Tobias Waldekranz
2023-10-30 11:24:18 +01:00
committed by Joachim Wiberg
parent 941fc31581
commit 47fe0529f4
2 changed files with 69 additions and 0 deletions
@@ -0,0 +1,40 @@
From 4f0e44e9b494485dc63de3264aa99dad5def5f55 Mon Sep 17 00:00:00 2001
From: Henrik Nordstrom <henrik.nordstrom@addiva.se>
Date: Wed, 13 Sep 2023 22:45:00 +0200
Subject: [PATCH 1/2] cn9130: Default DDR4 4GByte 16-bit/die ECC
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
---
plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c b/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c
index 82ce07b09..07753ea97 100644
--- a/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c
+++ b/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c
@@ -45,18 +45,18 @@ struct mv_ddr_iface dram_iface_ap0 = {
{0x1, 0x0, 0, 0},
{0x1, 0x0, 0, 0},
{0x1, 0x0, 0, 0} },
- SPEED_BIN_DDR_2400T, /* speed_bin */
- MV_DDR_DEV_WIDTH_8BIT, /* sdram device width */
+ SPEED_BIN_DDR_2400R, /* speed_bin */
+ MV_DDR_DEV_WIDTH_16BIT, /* sdram device width */
MV_DDR_DIE_CAP_8GBIT, /* die capacity */
MV_DDR_FREQ_SAR, /* frequency */
0, 0, /* cas_l, cas_wl */
- MV_DDR_TEMP_LOW} }, /* temperature */
+ MV_DDR_TEMP_HIGH} }, /* temperature */
#if DDR32
MV_DDR_32BIT_ECC_PUP8_BUS_MASK, /* subphys mask */
#else
MV_DDR_64BIT_ECC_PUP8_BUS_MASK, /* subphys mask */
#endif
- MV_DDR_CFG_SPD, /* ddr configuration data src */
+ MV_DDR_CFG_DEFAULT, /* ddr configuration data src */
NOT_COMBINED, /* ddr twin-die combined*/
{ {0} }, /* raw spd data */
{0}, /* timing parameters */
--
2.34.1
@@ -0,0 +1,29 @@
From da31240645cdf7ae424727ac330fdb6f6b118691 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Mon, 16 Oct 2023 10:52:19 +0200
Subject: [PATCH 2/2] marvell: Allow mv-ddr-marvell to be built from tarball
Build system relies on the mv-ddr-marvell being a valid GIT working
directory, which is not the case when building from a tarball.
Therefore, reduce this requirement from a hard error to a warning.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
---
plat/marvell/armada/a8k/common/ble/ble.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
index 752ab419d..db817e996 100644
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
@@ -31,5 +31,5 @@ $(MV_DDR_LIB): FORCE
# Do not remove! Following checks are required to ensure correct TF-A builds, removing these checks leads to broken TF-A builds
$(if $(value MV_DDR_PATH),,$(error "Platform '$(PLAT)' for BLE requires MV_DDR_PATH. Please set MV_DDR_PATH to point to the right directory"))
$(if $(wildcard $(value MV_DDR_PATH)/*),,$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' directory does not exist"))
- $(if $(shell git -C $(value MV_DDR_PATH) rev-parse --show-cdup 2>&1),$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' does not contain valid mv-ddr-marvell git repository"))
+ $(if $(shell git -C $(value MV_DDR_PATH) rev-parse --show-cdup 2>&1),$(warning "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' does not contain valid mv-ddr-marvell git repository"))
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
--
2.34.1