mbox series

[v2,0/9] usb: dwc3: add Layerscape SoC support

Message ID 20211015131525.721323-1-michael@walle.cc
Headers show
Series usb: dwc3: add Layerscape SoC support | expand

Message

Michael Walle Oct. 15, 2021, 1:15 p.m. UTC
Primarily, this will add support for peripheral mode on Layerscape SoCs.
For this to work, we have to backport two fixes from linux and fix the
fixup code for the DWC3 controller (which enables snooping because the SoC
has wrong startup defaults).

As a first user of the driver, enable it on the Kontron SL28 board, where
both host and peripheral mode was tested.

OTG mode is not supported. For this to work, one would need to read the
hardware status of the OTG pin in the bind() op. But it isn't allowed to
access the hardware in the bind() op (if I understand Simon correctly).

changes since v1:
 - added test case for the new ofnode_for_each_compatible_node()

Michael Walle (9):
  dm: core: add ofnode_for_each_compatible_node()
  test: dm: add test for ofnode_for_each_compatible_node()
  armv8: fsl-layerscape: rework the dwc3 snooping enable code
  usb: common: silence dubious errors
  usb: dwc3: Add frame length adjustment quirk
  usb: dwc3: Enable undefined length INCR burst type
  usb: dwc3: add layerscape support
  board: sl28: switch to dwc3 driver
  board: sl28: enable USB periheral support and gadgets

 arch/arm/cpu/armv8/fsl-layerscape/soc.c |  28 ++-
 configs/kontron_sl28_defconfig          |   9 +-
 drivers/usb/common/common.c             |   4 +-
 drivers/usb/dwc3/Kconfig                |  10 ++
 drivers/usb/dwc3/Makefile               |   1 +
 drivers/usb/dwc3/core.c                 |  95 ++++++++++
 drivers/usb/dwc3/core.h                 |  22 +++
 drivers/usb/dwc3/dwc3-layerscape.c      | 222 ++++++++++++++++++++++++
 include/dm/ofnode.h                     |  24 +++
 test/dm/ofnode.c                        |  18 ++
 10 files changed, 415 insertions(+), 18 deletions(-)
 create mode 100644 drivers/usb/dwc3/dwc3-layerscape.c

Comments

Michael Walle Oct. 21, 2021, 7:21 a.m. UTC | #1
Hi Bin,

Marek suggested to add you. Unfortunately, get_maintainer.pl doesn't 
mention
you.

You can find the whole thread here:
https://lore.kernel.org/u-boot/20211015131525.721323-1-michael@walle.cc/

Am 2021-10-15 15:15, schrieb Michael Walle:
> Primarily, this will add support for peripheral mode on Layerscape 
> SoCs.
> For this to work, we have to backport two fixes from linux and fix the
> fixup code for the DWC3 controller (which enables snooping because the 
> SoC
> has wrong startup defaults).
> 
> As a first user of the driver, enable it on the Kontron SL28 board, 
> where
> both host and peripheral mode was tested.
> 
> OTG mode is not supported. For this to work, one would need to read the
> hardware status of the OTG pin in the bind() op. But it isn't allowed 
> to
> access the hardware in the bind() op (if I understand Simon correctly).
> 
> changes since v1:
>  - added test case for the new ofnode_for_each_compatible_node()
> 
> Michael Walle (9):
>   dm: core: add ofnode_for_each_compatible_node()
>   test: dm: add test for ofnode_for_each_compatible_node()
>   armv8: fsl-layerscape: rework the dwc3 snooping enable code
>   usb: common: silence dubious errors
>   usb: dwc3: Add frame length adjustment quirk
>   usb: dwc3: Enable undefined length INCR burst type
>   usb: dwc3: add layerscape support
>   board: sl28: switch to dwc3 driver
>   board: sl28: enable USB periheral support and gadgets
> 
>  arch/arm/cpu/armv8/fsl-layerscape/soc.c |  28 ++-
>  configs/kontron_sl28_defconfig          |   9 +-
>  drivers/usb/common/common.c             |   4 +-
>  drivers/usb/dwc3/Kconfig                |  10 ++
>  drivers/usb/dwc3/Makefile               |   1 +
>  drivers/usb/dwc3/core.c                 |  95 ++++++++++
>  drivers/usb/dwc3/core.h                 |  22 +++
>  drivers/usb/dwc3/dwc3-layerscape.c      | 222 ++++++++++++++++++++++++
>  include/dm/ofnode.h                     |  24 +++
>  test/dm/ofnode.c                        |  18 ++
>  10 files changed, 415 insertions(+), 18 deletions(-)
>  create mode 100644 drivers/usb/dwc3/dwc3-layerscape.c

-michael