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

Simon Glass sjg at chromium.org
Wed Jul 7 19:37:03 CEST 2021


Hi,

On Tue, 6 Jul 2021 at 15:17, Marek Vasut <marex at denx.de> wrote:
>
> On 7/6/21 6:11 PM, Tim Harvey wrote:
> > On Sun, Jul 4, 2021 at 12:25 PM Marek Vasut <marex at denx.de> wrote:
> >>
> >> On 7/4/21 5:35 PM, Fabio Estevam wrote:
> >>> Hi Marek,
> >>
> >> Hi,
> >>
> >>> On Sat, Jul 3, 2021 at 10:04 PM Marek Vasut <marex at denx.de> wrote:
> >>>
> >>>>> Retrieving the USB base addresses from DT would be preferred, yes, but
> >>>>> the current code does not do that.
> >>>>
> >>>> I implemented exactly that in mx6_parse_dt_addrs() , see:
> >>>> 4dcfa3bcbcb ("usb: ehci-mx6: Parse USB PHY and MISC offsets from DT")
> >>>
> >>> We are talking about USB_BASE_ADDR, right?
> >>
> >> All of the addresses used by the driver, I am trying hard to get rid of
> >> all that hard-coding in the driver. They should be parsed out of DT.
> >>
> >
> > Marek,
> >
> > I agree with trying to get rid of all the hard-coding but not all of
> > us are using SPL_DM_USB. I'm not sure how to best tell who is not
> > using DM in the SPL.
>
> You should be able to use PLATDATA in SPL.
>
> The current situation in the driver is total chaos, that must be fixed.
> So, I would say in SPL -> PLATDATA , U-Boot -> DM/DT .
>
> > I know I ran into issues as I'm supporting a
> > family of boards with the same U-Boot and could not find a way to
> > switch dt's early in the SPL after I've detected via EEPROM what board
> > I have.
>
> Right, the platdata should help here. Then you don't need DT.

I suggest using of-platdata, so you can still use DT but it gets
compiled into the C code.

Regards,
Simon


More information about the U-Boot mailing list