From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: barebox@lists.infradead.org, Sascha Hauer <s.hauer@pengutronix.de>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>,
Ahmad Fatoum <a.fatoum@pengutronix.de>,
David Jander <david@protonic.nl>
Subject: [PATCH v4 0/4] ARM: i.MX8: add DDRC-ECC support
Date: Mon, 16 Mar 2026 09:14:30 +0100 [thread overview]
Message-ID: <20260316-v2026-02-0-topic-imx8-ecc-v4-0-e5ecc09cfafd@pengutronix.de> (raw)
The i.MX8 DDRC controller supports using inline ECC with the DDR RAM.
Inline ECC reduces the usable RAM size by 1/8: 7/8 RAM is for data and
1/8 RAM is for the ECC bits. Also, measuring random memory writes in
linux with
stress-ng --memthrash 4 --memthrash-method chunk1 -t 1m --metrics
shows a performance decrease by ~10%.
If a board wants to support ECC, the lpddr4 RAM settings in the
according lpddr4-timing-* must be adapted to enable and configure the
ECC registers.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
Changes in v4:
- rebase to 2026.03.0
- rework functioncalls in esdctl accordingly
- Link to v3: https://lore.barebox.org/20260311-v2026-02-0-topic-imx8-ecc-v3-0-ffdf97760441@pengutronix.de
Changes in v3:
- move timing struct to own noinline function
- rename dram_timing_info->size -> dram_timing_info->ecc_full_size
- replace #ifdef with IS_ENABLED
- add defines for ECC_STRIDE/INLINE/SCRUB_SIZE
- remove imx8mq-ddrc, only quad x plus has ecc
- Fix kconfig text
- Link to v2: https://lore.barebox.org/20260309-v2026-02-0-topic-imx8-ecc-v2-0-6aab6d795061@pengutronix.de
Changes in v2:
- prt8ml: move ram timings to header
- prt8ml: build two images: with and without ecc
- add RAM size and scrubbing function to generic code
- Link to v1: https://lore.barebox.org/20260304-v2026-02-0-topic-imx8-ecc-v1-0-700698530c5c@pengutronix.de
---
David Jander (3):
arm: mach-imx: esdctl.c: Add support for imx8mp inline ECC
drivers: ddr: imx8m: ddr_init.c: support ECC scrubbing
arm: boards: protonic-imx8ml: Add ECC + scrubbing
Steffen Trumtrar (1):
ARM: i.MX: esdctl: fix spelling of ad(d)ress
arch/arm/boards/protonic-imx8m/Makefile | 2 +-
arch/arm/boards/protonic-imx8m/lowlevel-prt8ml.c | 29 +-
.../protonic-imx8m/lpddr4-timing-prt8ml-ecc.c | 26 +
.../boards/protonic-imx8m/lpddr4-timing-prt8ml.c | 1100 +------------------
.../boards/protonic-imx8m/lpddr4-timing-prt8ml.h | 1123 ++++++++++++++++++++
arch/arm/dts/imx8mp-prt8ml.dts | 10 +-
arch/arm/mach-imx/Kconfig | 11 +
arch/arm/mach-imx/esdctl.c | 87 +-
drivers/ddr/imx/imx8m_ddr_init.c | 96 ++
images/Makefile.imx | 2 +
include/soc/imx/ddr.h | 1 +
include/soc/imx8m/ddr.h | 2 +
12 files changed, 1377 insertions(+), 1112 deletions(-)
---
base-commit: 844d4cb7a087a87288bbde4652c3fca8186987b8
change-id: 20260304-v2026-02-0-topic-imx8-ecc-9206fee1f037
Best regards,
--
Steffen Trumtrar <s.trumtrar@pengutronix.de>
next reply other threads:[~2026-03-16 8:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 8:14 Steffen Trumtrar [this message]
2026-03-16 8:14 ` [PATCH v4 1/4] ARM: i.MX: esdctl: fix spelling of ad(d)ress Steffen Trumtrar
2026-03-16 8:14 ` [PATCH v4 2/4] arm: mach-imx: esdctl.c: Add support for imx8mp inline ECC Steffen Trumtrar
2026-03-16 8:14 ` [PATCH v4 3/4] drivers: ddr: imx8m: ddr_init.c: support ECC scrubbing Steffen Trumtrar
2026-03-16 8:14 ` [PATCH v4 4/4] arm: boards: protonic-imx8ml: Add ECC + scrubbing Steffen Trumtrar
2026-03-17 10:22 ` [PATCH v4 0/4] ARM: i.MX8: add DDRC-ECC support Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260316-v2026-02-0-topic-imx8-ecc-v4-0-e5ecc09cfafd@pengutronix.de \
--to=s.trumtrar@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=david@protonic.nl \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox