[2/8] imx8mm: Fix USB reg addresses for i.MX8MM

Message ID 20220520082623.1788887-3-tommaso.merciai@amarulasolutions.com
State New
Headers show
Series
  • imx8mm: Add serial download support
Related show

Commit Message

Tommaso Merciai May 20, 2022, 8:26 a.m. UTC
The i.MX8MM register addresses differ from i.MX8M in many ways. One
thing to fix is the USB addresses.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
---
 arch/arm/include/asm/arch-imx8m/imx-regs.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Patch

diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h
index b2a8ad77ae..9652466bb9 100644
--- a/arch/arm/include/asm/arch-imx8m/imx-regs.h
+++ b/arch/arm/include/asm/arch-imx8m/imx-regs.h
@@ -51,6 +51,28 @@ 
 
 #define TZASC_BASE_ADDR		0x32F80000
 
+#ifdef CONFIG_IMX8MM
+#define USB1_BASE_ADDR		0x32E40000
+#define USB2_BASE_ADDR		0x32E50000
+#else
+#define USB1_BASE_ADDR		0x38100000
+#define USB2_BASE_ADDR		0x38200000
+#endif
+#define USB_BASE_ADDR		USB1_BASE_ADDR
+#define USB1_PHY_BASE_ADDR	0x381F0000
+#define USB2_PHY_BASE_ADDR	0x382F0000
+
+#ifdef CONFIG_IMX8MM
+#define USB1_BASE_ADDR         0x32E40000
+#define USB2_BASE_ADDR         0x32E50000
+#else
+#define USB1_BASE_ADDR         0x38100000
+#define USB2_BASE_ADDR         0x38200000
+#endif
+#define USB_BASE_ADDR          USB1_BASE_ADDR
+#define USB1_PHY_BASE_ADDR     0x381F0000
+#define USB2_PHY_BASE_ADDR     0x382F0000
+
 #define MXS_LCDIF_BASE		IS_ENABLED(CONFIG_IMX8MQ) ? \
 					0x30320000 : 0x32e00000