From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 20 May 2021 17:06:31 +0200 Subject: [PATCH 3/6] usb: ehci-mx6: add support for i.MXRT In-Reply-To: <20210520141018.2972320-4-giulio.benetti@benettiengineering.com> References: <20210520141018.2972320-1-giulio.benetti@benettiengineering.com> <20210520141018.2972320-4-giulio.benetti@benettiengineering.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 5/20/21 4:10 PM, Giulio Benetti wrote: [...] > diff --git a/arch/arm/include/asm/arch-imxrt/imx-regs.h b/arch/arm/include/asm/arch-imxrt/imx-regs.h > index 44c95dcd11..d01e6ca2e0 100644 > --- a/arch/arm/include/asm/arch-imxrt/imx-regs.h > +++ b/arch/arm/include/asm/arch-imxrt/imx-regs.h > @@ -23,4 +23,8 @@ > #include > #endif > > +#define USB_BASE_ADDR 0x402E0000 > +#define USB_PHY0_BASE_ADDR 0x400D9000 > +#define USB_PHY1_BASE_ADDR 0x400DA000 This should come from the DT, see how iMX8M was implemented and drop this. > #endif /* __ASM_ARCH_IMX_REGS_H__ */ > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > index bf5d82f035..f34cba2395 100644 > --- a/drivers/usb/host/Kconfig > +++ b/drivers/usb/host/Kconfig > @@ -149,7 +149,7 @@ config USB_EHCI_MX5 > > config USB_EHCI_MX6 > bool "Support for i.MX6/i.MX7ULP on-chip EHCI USB controller" > - depends on ARCH_MX6 || ARCH_MX7ULP > + depends on ARCH_MX6 || ARCH_MX7ULP || ARCH_IMXRT > default y > ---help--- > Enables support for the on-chip EHCI controller on i.MX6 SoCs. > diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c > index 06be9deaaa..238c93183b 100644 > --- a/drivers/usb/host/ehci-mx6.c > +++ b/drivers/usb/host/ehci-mx6.c > @@ -177,7 +177,7 @@ static void __maybe_unused > usb_power_config_mx7ulp(void *usbphy) { } > #endif > > -#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) > +#if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) || defined(CONFIG_IMXRT) > static const unsigned phy_bases[] = { > USB_PHY0_BASE_ADDR, > #if defined(USB_PHY1_BASE_ADDR) All this non-DT code will go away soon, use the DT-based probing, like MX8M does. [...]