mbox series

[0/3] Wire up USB controllers on fsl-imx6 and fsl-imx6ul

Message ID 20200301170443.12904-1-linux@roeck-us.net (mailing list archive)
Headers show
Series Wire up USB controllers on fsl-imx6 and fsl-imx6ul | expand

Message

Guenter Roeck March 1, 2020, 5:04 p.m. UTC
This patch series wires up the USB controllers on fsl-imx6 and fsl-imx6ul
emulations.

The first patch is a prerequisite for the following patches. It provides
a dummy implementation of a register widely used on i.MX systems, and
specifically the reset behavior of this register. This is needed to make
the USB ports operational without full implementation of an emulation
of its PHY controller.

----------------------------------------------------------------
Guenter Roeck (3):
      Add dummy i.MXS STMP register support
      arm: fsl-imx6ul: Wire up USB controllers
      hw/arm/fsl-imx6: Wire up USB controllers

 hw/arm/Kconfig              |   3 ++
 hw/arm/fsl-imx6.c           |  36 +++++++++++++
 hw/arm/fsl-imx6ul.c         |  35 +++++++++++++
 hw/misc/Kconfig             |   3 ++
 hw/misc/Makefile.objs       |   1 +
 hw/misc/stmp.c              | 121 ++++++++++++++++++++++++++++++++++++++++++++
 include/hw/arm/fsl-imx6.h   |   3 ++
 include/hw/arm/fsl-imx6ul.h |   7 +++
 include/hw/misc/stmp.h      |  47 +++++++++++++++++
 9 files changed, 256 insertions(+)
 create mode 100644 hw/misc/stmp.c
 create mode 100644 include/hw/misc/stmp.h

Comments

Peter Maydell March 9, 2020, 5:09 p.m. UTC | #1
On Sun, 1 Mar 2020 at 17:04, Guenter Roeck <linux@roeck-us.net> wrote:
>
> This patch series wires up the USB controllers on fsl-imx6 and fsl-imx6ul
> emulations.
>
> The first patch is a prerequisite for the following patches. It provides
> a dummy implementation of a register widely used on i.MX systems, and
> specifically the reset behavior of this register. This is needed to make
> the USB ports operational without full implementation of an emulation
> of its PHY controller.
>
> ----------------------------------------------------------------
> Guenter Roeck (3):
>       Add dummy i.MXS STMP register support
>       arm: fsl-imx6ul: Wire up USB controllers
>       hw/arm/fsl-imx6: Wire up USB controllers

I'm not a huge fan of the "dummy device that's really just
implementing 4 registers from the middle of some other
device" approach. Unless you think we're strongly likely
to want to use it in other places, I think I'd prefer
to just implement a (minimal/no-functionality) model of
the PHY register block.

thanks
-- PMM
Guenter Roeck March 9, 2020, 5:27 p.m. UTC | #2
On Mon, Mar 09, 2020 at 05:09:21PM +0000, Peter Maydell wrote:
> On Sun, 1 Mar 2020 at 17:04, Guenter Roeck <linux@roeck-us.net> wrote:
> >
> > This patch series wires up the USB controllers on fsl-imx6 and fsl-imx6ul
> > emulations.
> >
> > The first patch is a prerequisite for the following patches. It provides
> > a dummy implementation of a register widely used on i.MX systems, and
> > specifically the reset behavior of this register. This is needed to make
> > the USB ports operational without full implementation of an emulation
> > of its PHY controller.
> >
> > ----------------------------------------------------------------
> > Guenter Roeck (3):
> >       Add dummy i.MXS STMP register support
> >       arm: fsl-imx6ul: Wire up USB controllers
> >       hw/arm/fsl-imx6: Wire up USB controllers
> 
> I'm not a huge fan of the "dummy device that's really just
> implementing 4 registers from the middle of some other
> device" approach. Unless you think we're strongly likely
> to want to use it in other places, I think I'd prefer
> to just implement a (minimal/no-functionality) model of
> the PHY register block.
> 

Sure, no problem; I don't really have a preference. What would be
the best place for such a dummy phy ?

Thanks,
Guenter
Peter Maydell March 9, 2020, 5:29 p.m. UTC | #3
On Mon, 9 Mar 2020 at 17:27, Guenter Roeck <linux@roeck-us.net> wrote:
> Sure, no problem; I don't really have a preference. What would be
> the best place for such a dummy phy ?

hw/usb, I guess. hw/usb/imx-usb-phy.c ?

thanks
-- PMM