Skip to contentSkip to conversation

soc: soc_ti_k3: identify j7200 SR2.0 SoCs

PATCH In review Bryan Brattlof 2 participants 2 messages Jun 21, 2022 – Jul 7, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: soc_ti_k3: identify j7200 SR2.0 SoCs

Anytime a new revision of a chip is produced, Texas Instruments will increment the 4 bit VARIANT section of the CTRLMMR_WKUP_JTAGID register by one. Typically this will be decoded as SR1.0 -> SR2.0 ... however a few TI SoCs do not follow this convention.

Rather than defining a revision string array for each SoC, use a default revision string array for all TI SoCs that continue to follow the typical 1.0 -> 2.0 revision scheme.

---
 drivers/soc/soc_ti_k3.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
drivers/soc/soc_ti_k3.c +5 -11
index 965728e8185a0..88bf153d9f6a6 100644
@@ -60,8 +60,8 @@ static char *j721e_rev_string_map[] = {
 	"1.0", "1.1",
 };
 
-static char *am65x_rev_string_map[] = {
-	"1.0", "2.0",
+static char *typical_rev_string_map[] = {
+	"1.0", "2.0", "3.0",
 };
 
 static const char *get_rev_string(u32 idreg)
@@ -78,16 +78,10 @@ static const char *get_rev_string(u32 idreg)
 			goto bail;
 		return j721e_rev_string_map[rev];
 
-	case AM65X:
-		if (rev > ARRAY_SIZE(am65x_rev_string_map))
-			goto bail;
-		return am65x_rev_string_map[rev];
-
-	case AM64X:
-	case J7200:
 	default:
-		if (!rev)
-			return "1.0";
+		if (rev > ARRAY_SIZE(typical_rev_string_map))
+			goto bail;
+		return typical_rev_string_map[rev];
 	};
 
 bail:
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · Bryan Brattlof

Anytime a new revision of a chip is produced, Texas Instruments will increment the 4 bit VARIANT section of the CTRLMMR_WKUP_JTAGID register by one. Typically this will be decoded as SR1.0 -> SR2.0 ... however a few TI SoCs do not follow this convention.

Rather than defining a revision string array for each SoC, use a default revision string array for all TI SoCs that continue to follow the typical 1.0 -> 2.0 revision scheme.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom