From b403c70751bfd0e927b0f0aec9db4ef5bf45ebd7 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 14 Jun 2023 11:40:42 +0200 Subject: u-boot-toradex_2022.07: fix colibri-imx6 ddr ram settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a patch to fix a DDR RAM issue that can cause bit flips at temperatures above 60°C. Related-to: ELB-5211 Signed-off-by: Stefan Eichenberger (cherry picked from commit 63e4e72c5c71d510106c6504074697c30d396e47) --- ...1-colibri_imx6-fix-RALAT-and-WALAT-values.patch | 51 ++++++++++++++++++++++ recipes-bsp/u-boot/u-boot-toradex_2022.07.bb | 1 + 2 files changed, 52 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-toradex/0001-colibri_imx6-fix-RALAT-and-WALAT-values.patch (limited to 'recipes-bsp') diff --git a/recipes-bsp/u-boot/u-boot-toradex/0001-colibri_imx6-fix-RALAT-and-WALAT-values.patch b/recipes-bsp/u-boot/u-boot-toradex/0001-colibri_imx6-fix-RALAT-and-WALAT-values.patch new file mode 100644 index 0000000..3db4695 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-toradex/0001-colibri_imx6-fix-RALAT-and-WALAT-values.patch @@ -0,0 +1,51 @@ +From ea6fc42a58b92c5771a881a268d2dd5ce602d79e Mon Sep 17 00:00:00 2001 +From: Stefan Eichenberger +Date: Wed, 14 Jun 2023 09:12:47 +0200 +Subject: [PATCH] colibri_imx6: fix RALAT and WALAT values +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Running a memtest in U-Boot and Linux shows that some Colibri iMX6 +produce bitflips at temperatures above 60°C. This happens because the +RALAT and WALAT values on the Colibri iMX6 are too low. The problems +were introduced by commit 09dbac8174c4 ("mx6: ddr: Restore ralat/walat +in write level calibration") before the calibration process overwrote +the values and set them to the maximum value. With this commit, we make +sure that the RALAT and WALAT values are set to the maximum values +again. This has been proven to work for years. + +Upstream-Status: Submitted [https://lore.kernel.org/all/20230614090137.17626-1-francesco@dolcini.it/] +Fixes: 09dbac8174c4 ("mx6: ddr: Restore ralat/walat in write level calibration") +Signed-off-by: Stefan Eichenberger +--- + board/toradex/colibri_imx6/colibri_imx6.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c +index ab2ab587ff..a1e7ec3838 100644 +--- a/board/toradex/colibri_imx6/colibri_imx6.c ++++ b/board/toradex/colibri_imx6/colibri_imx6.c +@@ -767,8 +767,7 @@ MX6_MMDC_P1_MPRDDQBY3DL, 0x33333333, + /* + * MDMISC mirroring interleaved (row/bank/col) + */ +-/* TODO: check what the RALAT field does */ +-MX6_MMDC_P0_MDMISC, 0x00081740, ++MX6_MMDC_P0_MDMISC, 0x000b17c0, + + /* + * MDSCR con_req +@@ -900,8 +899,7 @@ MX6_MMDC_P1_MPRDDQBY3DL, 0x33333333, + /* + * MDMISC mirroring interleaved (row/bank/col) + */ +-/* TODO: check what the RALAT field does */ +-MX6_MMDC_P0_MDMISC, 0x00081740, ++MX6_MMDC_P0_MDMISC, 0x000b17c0, + + /* + * MDSCR con_req +-- +2.39.2 + diff --git a/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb b/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb index a6327ca..4e49dac 100644 --- a/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb +++ b/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb @@ -26,6 +26,7 @@ TDX_PATCHES = " \ file://0001-ARM-imx8mp-verdin-imx8mp-Add-memory-size-detection.patch \ file://0001-apalis-colibri_imx6-imx6ull-_imx7-update-env-memory-.patch \ file://0001-configs-colibri-imx7-Fix-bad-block-table-in-flash-co.patch \ + file://0001-colibri_imx6-fix-RALAT-and-WALAT-values.patch \ " # patches which are not (yet) in the latest master TDX_PATCHES:use-head-next = " \ -- cgit v1.2.3