From: Udit Kumar <u-kumar1@ti.com>
To: <vigneshr@ti.com>, <trini@konsulko.com>, <m-chawdhry@ti.com>
Cc: <bb@ti.com>, <n-francis@ti.com>, <nm@ti.com>,
<gehariprasath@ti.com>, <u-boot@lists.denx.de>,
Udit Kumar <u-kumar1@ti.com>
Subject: [PATCH v2 2/3] arch: mach-k3: j721s2_init: Add workaround for errata i2437
Date: Wed, 15 Apr 2026 20:51:51 +0530 [thread overview]
Message-ID: <20260415152152.3048491-3-u-kumar1@ti.com> (raw)
In-Reply-To: <20260415152152.3048491-1-u-kumar1@ti.com>
From: Neha Malcom Francis <n-francis@ti.com>
Add the workaround proposed for J721S2 errata i2437 (link) for SE
clock-gating turning off too early. Without this, a hardware bug present
in C7120 leads to C7120 CPU hanging.
Link: https://www.ti.com/lit/pdf/sprz530
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
---
arch/arm/mach-k3/j721s2/j721s2_init.c | 39 +++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
index b5453d8895d..780d853423f 100644
--- a/arch/arm/mach-k3/j721s2/j721s2_init.c
+++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
@@ -40,6 +40,15 @@
#define NB_THREADMAP_BIT1 BIT(1)
#define NB_THREADMAP_BIT2 BIT(2)
+/*
+ * RAT mapping for errata ID: i2437
+ */
+#define RAT_ERRATA_2437_BASE_REGION0 0x40f90000
+#define RAT_ERRATA_2437_IN_ADDR 0xc0000000
+#define RAT_ERRATA_2437_OUT_ADDR_U 0x0000004d
+#define RAT_ERRATA_2437_OUT_ADDR_L 0x21000000
+#define RAT_ERRATA_2437_CTRL 0x80000010
+
struct fwl_data cbass_hc_cfg0_fwls[] = {
{ "PCIE0_CFG", 2577, 7 },
{ "EMMC8SS0_CFG", 2579, 4 },
@@ -346,6 +355,36 @@ void board_init_f(ulong dummy)
if (ret)
printf("AVS init failed: %d\n", ret);
}
+
+ if (IS_ENABLED(CONFIG_CPU_V7R)) {
+ /*
+ * Errata ID i2437: SE Clock-Gating Turning Off Too Early
+ *
+ * A hardware bug is present in the C7120 Streaming Engine top level
+ * clock gating logic that can lead to the C7120 CPU hanging.
+
+ * Workaround: The DSP_<COREID>_DEBUG_CLKEN_OVERRIDE fields of the
+ * COMPUTE_CLUSTER_CFG_WRAP_0_CC_CNTRL register (where COREID is the
+ * name of the specific C7120 core) must be enabled before power-up
+ * of the C7120 core to override all clock-gating.
+ */
+
+ /* Setup RAT mapping */
+ debug("Errata i2437: Use RAT for COMPUTE_CLUSTER_CFG_WRAP_0_CC_CNTRL register\n");
+ writel_verify(RAT_ERRATA_2437_IN_ADDR, RAT_ERRATA_2437_BASE_REGION0 + 0x24);
+ writel_verify(RAT_ERRATA_2437_OUT_ADDR_L, RAT_ERRATA_2437_BASE_REGION0 + 0x28);
+ writel_verify(RAT_ERRATA_2437_OUT_ADDR_U, RAT_ERRATA_2437_BASE_REGION0 + 0x2c);
+ writel_verify(RAT_ERRATA_2437_CTRL, RAT_ERRATA_2437_BASE_REGION0 + 0x20);
+
+ /* Enable DSP_X_DEBUG_CLKEN_OVERRIDE for C71x cores */
+ writel_verify(0x300, RAT_ERRATA_2437_IN_ADDR + 0x200);
+
+ /* Clear RAT mapping */
+ writel_verify(0, RAT_ERRATA_2437_BASE_REGION0 + 0x20);
+ writel_verify(0, RAT_ERRATA_2437_BASE_REGION0 + 0x24);
+ writel_verify(0, RAT_ERRATA_2437_BASE_REGION0 + 0x28);
+ writel_verify(0, RAT_ERRATA_2437_BASE_REGION0 + 0x2c);
+ }
}
#endif
--
2.34.1
next prev parent reply other threads:[~2026-04-15 15:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 15:21 [PATCH v2 0/3] j721s2: j784s4: Add workaround for errata i2437 Udit Kumar
2026-04-15 15:21 ` [PATCH v2 1/3] arm: mach-k3: arm: mach-k3: Add writel_verify macro for register write verification Udit Kumar
2026-04-15 15:21 ` Udit Kumar [this message]
2026-04-15 15:21 ` [PATCH v2 3/3] arch: mach-k3: j784s4_init: Add workaround for errata i2437 Udit Kumar
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=20260415152152.3048491-3-u-kumar1@ti.com \
--to=u-kumar1@ti.com \
--cc=bb@ti.com \
--cc=gehariprasath@ti.com \
--cc=m-chawdhry@ti.com \
--cc=n-francis@ti.com \
--cc=nm@ti.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
/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