public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] soc: soc_ti_k3: identify j7200 SR2.0 SoCs
@ 2022-06-21 21:36 Bryan Brattlof
  2022-07-07  1:56 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan Brattlof @ 2022-06-21 21:36 UTC (permalink / raw)
  To: Tom Rini; +Cc: UBoot Mailing List, 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.

Signed-off-by: Bryan Brattlof <bb@ti.com>
---
 drivers/soc/soc_ti_k3.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c
index 965728e8185a0..88bf153d9f6a6 100644
--- a/drivers/soc/soc_ti_k3.c
+++ b/drivers/soc/soc_ti_k3.c
@@ -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:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] soc: soc_ti_k3: identify j7200 SR2.0 SoCs
  2022-06-21 21:36 [PATCH] soc: soc_ti_k3: identify j7200 SR2.0 SoCs Bryan Brattlof
@ 2022-07-07  1:56 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2022-07-07  1:56 UTC (permalink / raw)
  To: Bryan Brattlof; +Cc: UBoot Mailing List

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

On Tue, Jun 21, 2022 at 04:36:03PM -0500, Bryan Brattlof wrote:

> 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.
> 
> Signed-off-by: Bryan Brattlof <bb@ti.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-07  1:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-21 21:36 [PATCH] soc: soc_ti_k3: identify j7200 SR2.0 SoCs Bryan Brattlof
2022-07-07  1:56 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox