[PATCH v2 00/12] usb: dwc3: Refactor dwc3-generic and apply to dwc3-uniphier
Kunihiko Hayashi
hayashi.kunihiko at socionext.com
Wed Feb 1 02:13:13 CET 2023
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
More information about the U-Boot
mailing list