|
|
Log in / Subscribe / Register

phy: nuvoton: extend MA35D1 USB2 PHY driver for dual-port OTG support

From:  Joey Lu <a0987203069-AT-gmail.com>
To:  Vinod Koul <vkoul-AT-kernel.org>, Neil Armstrong <neil.armstrong-AT-linaro.org>
Subject:  [PATCH v3 0/3] phy: nuvoton: extend MA35D1 USB2 PHY driver for dual-port OTG support
Date:  Wed, 08 Jul 2026 18:36:03 +0800
Message-ID:  <20260708103606.1462960-1-a0987203069@gmail.com>
Cc:  Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Arnd Bergmann <arnd-AT-arndb.de>, Catalin Marinas <catalin.marinas-AT-arm.com>, Jacky Huang <ychuang3-AT-nuvoton.com>, Shan-Chun Hung <schung-AT-nuvoton.com>, Hui-Ping Chen <hpchen0nvt-AT-gmail.com>, Joey Lu <yclu4-AT-nuvoton.com>, linux-phy-AT-lists.infradead.org, devicetree-AT-vger.kernel.org, linux-arm-kernel-AT-lists.infradead.org, linux-kernel-AT-vger.kernel.org, Joey Lu <a0987203069-AT-gmail.com>
Archive-link:  Article

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 v2:

  - Dropped patch 1 (nuvoton,ma35d1-reset: add simple-mfd and child node
    support) entirely.  That approach embedded usb-phy@60 as a child of the
    syscon node with a reg property, which broke the established ABI for
    out-of-tree MA35D1 board files.

  - The PHY remains a standalone top-level node as in the mainline binding.
    The existing required properties (clocks, nuvoton,sys, #phy-cells) are
    retained.  No reg property is added.

  - '#phy-cells' is now enum: [0, 1] instead of const: 1.  Boards using
    '#phy-cells = <0>' continue to validate and work unchanged.

  - The DTS usb_phy node is a sibling of sys (not its child), retaining
    clocks and nuvoton,sys, matching the original binding structure.

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 |  45 ++-
 .../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         | 279 +++++++++++++-----
 5 files changed, 384 insertions(+), 77 deletions(-)


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
-- 
2.43.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds