From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F16B33ACA5E for ; Wed, 8 Jul 2026 10:36:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783506987; cv=none; b=gRlZSJsRc1ZeF7PM2EzRGWoTqAXZnlLbHXZVFSPTW1OYui5MmbDVL3vN4UfGzaYVHB+ni/jwgC2elUZD8v/QuGU9pIDs7mSYYS+0yXiGhcAJ/BMdf6/qmgH4awsnmjU6DrNjITmFz0RwevGpyCPDYj/LDXImZQzuo1/5Btq2DEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783506987; c=relaxed/simple; bh=Ob0dYBFqY/5HTxCXhKqts/RHtKz3wp+Q7Jld3x+7WFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NCeWYajH6finWsdDEjDGUtRrHeE6l5/4oJ9FRnmeZyQ7s6xMTpwxNJtjqKgAw7px+yEW51BbTOgh4N1on9FAjYahI0u31kZ+JGjhVSvouNUG2Cogn+z5AyuqUbI7gCt2b97qf7orgrbZX36o0Yy7S+KUPrgto5T5ssKaUqeuLBQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hF3+0phM; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hF3+0phM" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2cc7e86e7aeso5656985ad.2 for ; Wed, 08 Jul 2026 03:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783506977; x=1784111777; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=H89YxPz+LDcG3sLulupfETRoJ4vkpxtSzZRwMnjcQcA=; b=hF3+0phMLDvtTJhUkpYRAC/YTKS4ngfwK0SAP1TpGjhADu+oTy72gpZlfZw1+wPJYg Uivn2sRAmyrkmaoLeMopDrqay5G7e0rwQlr22fGu+HyYBYQBYV08UQi7IdeuLqlizMgp FAWdI3JBKsxPyD7xOBuNCTbLJlyaRs/jDrd+hxFtHL9UfRkMB4P/TtX8OL4YtpIE1ecF pI747iIo7MGZXPW/+8hOKpsFZRQe80ubIfxJD8Iz9q71jYejwaDsSGKwTJbRxQNVVOV3 9P1neaGJs991SQvd/bhMod0fegLCXtHAQ8R6yu172PTsXqa84AWGS3udfX2PJHmIXhja 4H5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783506977; x=1784111777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=H89YxPz+LDcG3sLulupfETRoJ4vkpxtSzZRwMnjcQcA=; b=on9pGfdApJRYDlKrLwQBs6gWqBD6rQfwg/V3ke9Pw6aol4yVtf20hNdUKTObZbxmY3 cmWXa5rkCZlEHShgxM2p5GQiy60oIIL8Z7g08gCLRvrbPhqjgLgTYEWirjAeTLNWQfOc ga2cZrz2rkamXkaiNhVA7snrvbVYvs34Rl93gBmk0hzEb73srgpe6SetO5emELRpCjhu xRctVbLy9WGw0nJ1kqbAZu0Rr2JrdYDEvmWNR5CA/Hc/HVJtnNbCsFPDE1Yz58LIF1jn 4Cnr6ps9ezn3SMVfLBOM6qZIg5XOJI0+CVHltwGIEV1szEXmPRvCrFewhV61FMZff6T3 Px/A== X-Forwarded-Encrypted: i=1; AHgh+RpoMA8oTKo5Ga6GDoojjVjMa5+U1Ogkvj2ufZWdPDUopdELeXRXXN33xJdVTiy/klWjZ3BJ49HP206n+lY=@vger.kernel.org X-Gm-Message-State: AOJu0Yxp4gatKZv1uNS3OG+I5cJHavn6JnIloIOzAl6UFGHeaTQfsHi/ KMMHn+5P5+GcdHPh5oYSY/4ZBXFQap+aisFoomv00e6/DqPrJ7IcYV0h X-Gm-Gg: AfdE7ckqukFnjHRlGmqZr+wkQ4vq5TXgqtGKytmzBRwsY/zN9RR4J8/LBMbeUNo8eOk rsPhww4kLU707/yOfBjQ5yeaNLud7zKQZ2ZtEH7CFimENuVmBgzgViFe5+pWKvTgqoXlkYkpZUd 4XS6ShxomN0C1dYM4DjP0xHhxjpsyaU8M7KZF/dvsPYPzOeRE4nc2TD5kv7x8I87VlMookRngTY uL8Yk/rnRiK64RI0xp7oj1uB10w9gZf1aS/XtcUBIvwdHhoO4tVhhF+fCUMAOy5Ti22gFLklSX8 A1X5K5jm6lhQysvC72ZXWI7HUX3ZoNPgtQ3ioT09QxAPsUNiIsx3LyskOorp8khH0J5eLdPtsWb yLvtGsWHuOaWGhXbE+NrW1mlGwN1JBhkf/Ve1WIYji3eDMOfbzHeqeeB6GWmBnW0xx8z04q8dt3 yORrhFoK67H0llQCZjVskLN1CX1PMv9TZsNEECwJwMh2/1e5yhLEVu6BSYiaDdcSLDu9NHNn/Cu g== X-Received: by 2002:a17:902:dacf:b0:2c9:e9c7:2b59 with SMTP id d9443c01a7336-2ccea42e1famr18928175ad.35.1783506976495; Wed, 08 Jul 2026 03:36:16 -0700 (PDT) Received: from localhost.localdomain (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ccc9bdb9a3sm25987525ad.13.2026.07.08.03.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 03:36:16 -0700 (PDT) From: Joey Lu 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@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Lu Subject: [PATCH v3 1/3] dt-bindings: phy: nuvoton,ma35d1-usb2-phy: extend for dual-port and OTG Date: Wed, 8 Jul 2026 18:36:04 +0800 Message-ID: <20260708103606.1462960-2-a0987203069@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260708103606.1462960-1-a0987203069@gmail.com> References: <20260708103606.1462960-1-a0987203069@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The MA35D1 exposes two USB PHY ports (PHY0 and PHY1) managed by the same hardware block (USBPMISCR register in the system-management syscon). PHY0 is shared between the DWC2 gadget controller and EHCI0/OHCI0 through an automatic hardware mux that follows the USB ID pin; PHY1 is dedicated to EHCI1/OHCI1. Because both ports share the same register topology a single binding and driver should cover both. Changing '#phy-cells' from const: 0 to enum: [0, 1] lets consumers name the port they need while preserving backward compatibility: boards already using '#phy-cells = <0>' continue to validate and function unchanged. The two new optional properties: - nuvoton,rcalcode: the resistor calibration trim code is determined at board design time to match the PCB trace impedance. - nuvoton,oc-active-high: the over-current detect polarity depends on the choice of VBUS power switch. Signed-off-by: Joey Lu --- .../bindings/phy/nuvoton,ma35d1-usb2-phy.yaml | 45 +++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/nuvoton,ma35d1-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/nuvoton,ma35d1-usb2-phy.yaml index fff858c909a0..191d1b2272ec 100644 --- a/Documentation/devicetree/bindings/phy/nuvoton,ma35d1-usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/nuvoton,ma35d1-usb2-phy.yaml @@ -8,6 +8,18 @@ title: Nuvoton MA35D1 USB2 phy maintainers: - Hui-Ping Chen + - Joey Lu + +description: + USB 2.0 PHY for the Nuvoton MA35D1 SoC. The PHY node is a standalone + platform device that accesses the USB PHY control registers inside the + system-management syscon block via the nuvoton,sys phandle. + + PHY0 is the OTG port whose signals are routed to either the DWC2 gadget + controller or the EHCI0/OHCI0 host controller by a hardware mux that + follows the USB ID pin automatically. + + PHY1 is a dedicated host-only port used by EHCI1/OHCI1. properties: compatible: @@ -15,7 +27,12 @@ properties: - nuvoton,ma35d1-usb2-phy "#phy-cells": - const: 0 + enum: [0, 1] + description: + When 0, the node exposes PHY0 only and consumers reference it + with no cell argument. When 1, the single cell selects the port, + with 0 for the OTG port (USB0, shared with DWC2 gadget controller) + and 1 for the host-only port (USB1). clocks: maxItems: 1 @@ -23,7 +40,29 @@ properties: nuvoton,sys: $ref: /schemas/types.yaml#/definitions/phandle description: - phandle to syscon for checking the PHY clock status. + Phandle to the system-management syscon node providing access to the + USB PHY control registers. + + nuvoton,rcalcode: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 2 + items: + minimum: 0 + maximum: 15 + description: + Resistor calibration trim codes for PHY0 and PHY1 respectively. + Each 4-bit value is written to the RCALCODE field in USBPMISCR and + adjusts the PHY's internal termination resistance. Both entries must + be supplied when this property is present; when absent the hardware + reset default is used for each port. + + nuvoton,oc-active-high: + type: boolean + description: + When present, the over-current detect input from the VBUS power switch + is treated as active-high. The default (property absent) is active-low. + This setting is shared by both USB host ports. required: - compatible @@ -39,7 +78,7 @@ examples: usb_phy: usb-phy { compatible = "nuvoton,ma35d1-usb2-phy"; - clocks = <&clk USBD_GATE>; + clocks = <&clk HUSBH0_GATE>; nuvoton,sys = <&sys>; #phy-cells = <0>; }; -- 2.43.0