mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/3] phy: nuvoton: extend MA35D1 USB2 PHY driver for dual-port OTG support
@ 2026-09-29  2:08 Joey Lu
  2026-09-29  2:08 ` [PATCH v6 1/3] dt-bindings: phy: nuvoton,ma35d1-usb2-phy: extend for dual-port and OTG Joey Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joey Lu @ 2026-09-29  2:08 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Catalin Marinas, Jacky Huang, Shan-Chun Hung, Hui-Ping Chen,
	Joey Lu, linux-phy, devicetree, linux-arm-kernel, linux-kernel,
	Joey Lu

The MA35D1 SoC has two USB PHY ports managed by a shared hardware block:

  - PHY0 (USB0): OTG port shared between the DWC2 gadget controller and
    the EHCI0/OHCI0 host controllers.  A hardware mux automatically routes
    USB0 signals to the correct controller based on the USB ID pin state.

  - PHY1 (USB1): dedicated host-only port for EHCI1/OHCI1.

This series extends the existing phy-ma35d1-usb2.c driver and its binding
to cover both ports and add OTG role-switch support, while keeping full
backward compatibility with existing device trees.

Changes since v5:

  - dts: rename the hsusb pinctrl group node to hsusb-grp.

  - phy: keep the clock-stability polling when SUSPEND is already set,
    per review comment:

      > +       if (val & USBPMISCR_PHY_SUSPEND(n))
      > +               return 0;

      Please keep the clock-stability polling when SUSPEND is already set.

      If the initial polling times out, SUSPEND remains set. A subsequent
      phy_init() call will then return success here without checking
      whether the PHY clocks have become stable.

      Skipping the reset sequence for an already-enabled PHY makes sense,
      but both paths should still check the ready bits.

  - phy: clear MISCFCR0_UHOVRCURH when nuvoton,oc-active-high is absent,
    per review comment:

      > +       if (of_property_read_bool(pdev->dev.of_node,
      > +                                 "nuvoton,oc-active-high"))

      The binding defines active-low as the default when this property is
      absent. Please also clear MISCFCR0_UHOVRCURH in that case, so the
      configured polarity does not depend on the state left by the
      bootloader.

  These are pre-merge fixups to patches 2 and 3, which are net-new code
  in this series, so the commit messages are otherwise unchanged.

Joey Lu (3):
  dt-bindings: phy: nuvoton,ma35d1-usb2-phy: extend for dual-port and
    OTG
  arm64: dts: nuvoton: ma35d1: add USB controllers and dual-port PHY
    node
  phy: nuvoton: phy-ma35d1-usb2: extend to dual-port with OTG support

 .../bindings/phy/nuvoton,ma35d1-usb2-phy.yaml |  44 ++-
 .../boot/dts/nuvoton/ma35d1-iot-512m.dts      |  36 +++
 .../boot/dts/nuvoton/ma35d1-som-256m.dts      |  36 +++
 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi       |  65 ++++
 drivers/phy/nuvoton/phy-ma35d1-usb2.c         | 286 +++++++++++++-----
 5 files changed, 390 insertions(+), 77 deletions(-)


base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
-- 
2.43.0


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

end of thread, other threads:[~2026-09-29  2:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29  2:08 [PATCH v6 0/3] phy: nuvoton: extend MA35D1 USB2 PHY driver for dual-port OTG support Joey Lu
2026-09-29  2:08 ` [PATCH v6 1/3] dt-bindings: phy: nuvoton,ma35d1-usb2-phy: extend for dual-port and OTG Joey Lu
2026-09-29  2:08 ` [PATCH v6 2/3] arm64: dts: nuvoton: ma35d1: add USB controllers and dual-port PHY node Joey Lu
2026-09-29  2:08 ` [PATCH v6 3/3] phy: nuvoton: phy-ma35d1-usb2: extend to dual-port with OTG support Joey Lu

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

all inboxes | Powered by JetHome®