public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 00/12] usb: dwc3: Refactor dwc3-generic and apply to dwc3-uniphier
@ 2023-02-01  1:13 Kunihiko Hayashi
  2023-02-01  1:13 ` [PATCH v2 01/12] usb: dwc3: Look up reference clock DT phandle in both controller DT nodes Kunihiko Hayashi
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Kunihiko Hayashi @ 2023-02-01  1:13 UTC (permalink / raw)
  To: Marek Vasut, Michal Simek, Sean Anderson, Angus Ainslie,
	Lukasz Majewski, T Karthik Reddy, Jan Kiszka
  Cc: u-boot, Kunihiko Hayashi

This series achieves refactoring of dwc3-generic.

First, dwc3-generic allows DT controller nodes to be children of glue nodes,
but outside of glue nodes.

To achieve this goal, define a glue-specific function to get controller node,
look up more reference clocks in the controller node, and initialize clocks
in children of glue node before access to the controller,

Next, this series exports the structures and functions from the driver source
to the header, and replaces dwc3-uniphier driver as one implementation using
them. This expects dwc3-generic to prevent more SoC-dependent codes.

The dwc3-uniphier has original USB node, however, tentatively added its own
node dedicated to U-Boot. After this refactoring, the driver needs to add
clock entries and PHY driver to enable them corresponding to the properties
in the original node.

PATCH 1 has been provided below.
  https://patchwork.ozlabs.org/project/uboot/patch/20221215223822.137739-1-marex@denx.de/

PATCH 2 is based on the suggested patch from Marek.

PATCH 4-6 and 12 have been already reviewed in the previous v1.
  https://lists.denx.de/pipermail/u-boot/2023-January/505689.html

Changes since v1:
- Add PATCH 1 to refer to the clock in top level generic node
- Add PATCH 2 to allow controller DT node outside of glue node
- Add PATCH 3 to initialize clocks in children of glue node
- Update dwc3_glue_ops to add the function to get controller device
- Add PATCH 7 to support USB glue reset
- Add PATCH 8 to add missing PHY clocks
- Add PATCH 9 to enable the driver to enable PHY clocks and resets
- Add PATCH 10 to fix node names and missing properties
- Add PATCH 11 to switch to the original USB node in DT

Kunihiko Hayashi (11):
  usb: dwc3-generic: Allow different controller DT node pattern
  usb: dwc3-generic: Add clock initialization in child DT node
  usb: dwc3-generic: Export glue structures and functions
  usb: dwc3-generic: Add the size of regs property to glue structure
  usb: dwc3-uniphier: Use dwc3-generic instead of xhci-dwc3
  reset: uniphier: Add USB glue reset support
  clk: uniphier: Add missing USB SS-PHY clocks
  phy: socionext: Add UniPhier USB3 PHY driver
  ARM: dts: uniphier: Fix node names and missing reg property in USB
    glue node
  ARM: dts: uniphier: Switch USB node to the original
  uniphier_defconfig: Disable USB_XHCI_DWC3

Marek Vasut (1):
  usb: dwc3: Look up reference clock DT phandle in both controller DT
    nodes

 arch/arm/dts/uniphier-ld20.dtsi           |  36 ++----
 arch/arm/dts/uniphier-pro4.dtsi           |  49 +-------
 arch/arm/dts/uniphier-pro5.dtsi           |  15 +--
 arch/arm/dts/uniphier-pxs2.dtsi           |  62 +++-------
 arch/arm/dts/uniphier-pxs3.dtsi           |  62 +++-------
 configs/uniphier_v7_defconfig             |   1 -
 configs/uniphier_v8_defconfig             |   2 +-
 drivers/clk/uniphier/clk-uniphier-sys.c   |   5 +
 drivers/phy/socionext/Kconfig             |   7 ++
 drivers/phy/socionext/Makefile            |   1 +
 drivers/phy/socionext/phy-uniphier-usb3.c |  89 +++++++++++++++
 drivers/reset/reset-uniphier.c            |  78 ++++++++++++-
 drivers/usb/dwc3/Kconfig                  |   3 +-
 drivers/usb/dwc3/dwc3-generic.c           | 132 ++++++++++++++--------
 drivers/usb/dwc3/dwc3-generic.h           |  33 ++++++
 drivers/usb/dwc3/dwc3-uniphier.c          | 116 ++++++++++++-------
 16 files changed, 422 insertions(+), 269 deletions(-)
 create mode 100644 drivers/phy/socionext/phy-uniphier-usb3.c
 create mode 100644 drivers/usb/dwc3/dwc3-generic.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-02-02 12:54 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01  1:13 [PATCH v2 00/12] usb: dwc3: Refactor dwc3-generic and apply to dwc3-uniphier Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 01/12] usb: dwc3: Look up reference clock DT phandle in both controller DT nodes Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 02/12] usb: dwc3-generic: Allow different controller DT node pattern Kunihiko Hayashi
2023-02-01 21:49   ` Marek Vasut
2023-02-01  1:13 ` [PATCH v2 03/12] usb: dwc3-generic: Add clock initialization in child DT node Kunihiko Hayashi
2023-02-01 21:50   ` Marek Vasut
2023-02-01  1:13 ` [PATCH v2 04/12] usb: dwc3-generic: Export glue structures and functions Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 05/12] usb: dwc3-generic: Add the size of regs property to glue structure Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 06/12] usb: dwc3-uniphier: Use dwc3-generic instead of xhci-dwc3 Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 07/12] reset: uniphier: Add USB glue reset support Kunihiko Hayashi
2023-02-01 21:51   ` Marek Vasut
2023-02-02  5:38     ` Kunihiko Hayashi
2023-02-02 12:54       ` Marek Vasut
2023-02-01  1:13 ` [PATCH v2 08/12] clk: uniphier: Add missing USB SS-PHY clocks Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 09/12] phy: socionext: Add UniPhier USB3 PHY driver Kunihiko Hayashi
2023-02-01 21:54   ` Marek Vasut
2023-02-02  5:13     ` Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 10/12] ARM: dts: uniphier: Fix node names and missing reg property in USB glue node Kunihiko Hayashi
2023-02-01 21:55   ` Marek Vasut
2023-02-02  5:13     ` Kunihiko Hayashi
2023-02-02 12:53       ` Marek Vasut
2023-02-01  1:13 ` [PATCH v2 11/12] ARM: dts: uniphier: Switch USB node to the original Kunihiko Hayashi
2023-02-01  1:13 ` [PATCH v2 12/12] uniphier_defconfig: Disable USB_XHCI_DWC3 Kunihiko Hayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox