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

Fabio Estevam festevam at gmail.com
Sat Jul 3 23:38:40 CEST 2021


Hi Marek,

On Sat, Jul 3, 2021 at 5:57 PM Marek Vasut <marex at denx.de> wrote:
>
> On 7/3/21 9:58 PM, Fabio Estevam wrote:
> > From: Frieder Schrempf <frieder.schrempf at kontron.de>
> >
> > 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 at kontron.de>
> > Signed-off-by: Fabio Estevam <festevam at denx.de>
> > ---
> >   arch/arm/include/asm/arch-imx8m/imx-regs.h | 11 +++++++++++
> >   1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h
> > index b800da13a1e4..de01e9969626 100644
> > --- a/arch/arm/include/asm/arch-imx8m/imx-regs.h
> > +++ b/arch/arm/include/asm/arch-imx8m/imx-regs.h
> > @@ -51,6 +51,17 @@
> >
> >   #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
>
> All of this should come from DT, no ?

Retrieving the USB base addresses from DT would be preferred, yes, but
the current code does not do that.

Without providing these defines:

drivers/usb/host/ehci-mx6.c:254:62: error: ‘USB_BASE_ADDR’ undeclared
(first use in this function); did you mean ‘SRC_BASE_ADDR’?
  254 |  struct usbnc_regs *usbnc = (struct usbnc_regs
*)(uintptr_t)(USB_BASE_ADDR +


More information about the U-Boot mailing list