public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] usb: dwc2: Add in version 4xx compatibility
@ 2024-03-26  2:32 Greg Malysa
  2024-03-26 11:50 ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Malysa @ 2024-03-26  2:32 UTC (permalink / raw)
  To: u-boot, Marek Vasut
  Cc: Nathan Barrett-Morrison, Ian Roberts, Greg Malysa, Jonas Karlman,
	Simon Glass, Teik Heng Chong, Tom Rini

From: Nathan Barrett-Morrison <nathan.morrison@timesys.com>

This adds the Synopsys device id for version 4xx of the designware
IP block and extends the version check to include it to permit
new hardware to run. It does not add any 4xx-specific features.

Signed-off-by: Ian Roberts <ian.roberts@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>

---


---
 drivers/usb/host/dwc2.c | 3 ++-
 drivers/usb/host/dwc2.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 637eb2dd06..6fdde6a9a7 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -1180,7 +1180,8 @@ static int dwc2_init_common(struct udevice *dev, struct dwc2_priv *priv)
 		 snpsid >> 12 & 0xf, snpsid & 0xfff);
 
 	if ((snpsid & DWC2_SNPSID_DEVID_MASK) != DWC2_SNPSID_DEVID_VER_2xx &&
-	    (snpsid & DWC2_SNPSID_DEVID_MASK) != DWC2_SNPSID_DEVID_VER_3xx) {
+	    (snpsid & DWC2_SNPSID_DEVID_MASK) != DWC2_SNPSID_DEVID_VER_3xx &&
+	    (snpsid & DWC2_SNPSID_DEVID_MASK) != DWC2_SNPSID_DEVID_VER_4xx) {
 		dev_info(dev, "SNPSID invalid (not DWC2 OTG device): %08x\n",
 			 snpsid);
 		return -ENODEV;
diff --git a/drivers/usb/host/dwc2.h b/drivers/usb/host/dwc2.h
index 6f022e33a1..f202d55eb2 100644
--- a/drivers/usb/host/dwc2.h
+++ b/drivers/usb/host/dwc2.h
@@ -739,6 +739,7 @@ struct dwc2_core_regs {
 #define DWC2_PCGCCTL_DEEP_SLEEP_OFFSET			7
 #define DWC2_SNPSID_DEVID_VER_2xx			(0x4f542 << 12)
 #define DWC2_SNPSID_DEVID_VER_3xx			(0x4f543 << 12)
+#define DWC2_SNPSID_DEVID_VER_4xx			(0x4f544 << 12)
 #define DWC2_SNPSID_DEVID_MASK				(0xfffff << 12)
 #define DWC2_SNPSID_DEVID_OFFSET			12
 
-- 
2.43.2


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

end of thread, other threads:[~2024-05-07  7:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-26  2:32 [PATCH] usb: dwc2: Add in version 4xx compatibility Greg Malysa
2024-03-26 11:50 ` Marek Vasut
2024-03-26 15:36   ` Greg Malysa
2024-04-16  9:06     ` Mattijs Korpershoek
2024-04-19 19:21       ` Greg Malysa
2024-04-23  7:09         ` Mattijs Korpershoek
2024-04-23 22:31           ` Marek Vasut
2024-05-07  7:32             ` Greg Malysa

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