From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796175622; b=IhPZeY6WPxfzViWTNA0Fig8TckKqtH4tCrArOjCkUvUzFXNc8yfRXtfJzOeZtXBXK7H8 AcEkxtwQCFIoEE8Dtz5rQxnJOv02EAixOnMY4Mw1D9TrTbOUIBnbGdbKHCJGEizd8w6NL ook0jnCIb2oNcnQ9DEcunRcFFqU1BBSjdbUMz9WOeyFhdBNhxLtv58qgLdVr0uWqFRFtz Fg2zu0FUOzWbLZBT1B+e5DR06DfEvPOZ5OcJu8gYEkoVsgVbmuF8Qr5kTNkTwOkgtsq4Y JK5KsSRXmhzMh/MdVQI5njWA0/SCCTD3BVrNCVRW+GW04M3hZGoxoVXo6TVtkc/3/ZA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796175622; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=hYS2l/f+TYiuEKSOsWdzeEWDtLM+NeFWTBBo4xpnf08=; b=vbZlDg+ZDuHp/sxkLgsAZKyjMniQ+9mY9as1jI0ETUkY8l1dnlZKul5ssB4DBEFHMir/ pK2jGZmLVYPq05PBdjo0vNHIKZJ3WGps5ZZmkTjuSjYwNCFeyiHd/aHzv95kggla2uTyh ejxPhiNllWIwZ8KicJ8K8L/XFvlwkOoUbMZMePxqWqaG7V1evdEOH/u4zH1C2thyC2Ut3 oYuEyCrPQwlRTcQT1jHabBiYDg2iY96Vv4D1vImdPpwQ0VcHFQzXXJzTpnqycIOJo/w/n uTTbjsI0U76+25QtJXHYeqIRNn2CnOaRtVONY1XgrpZy1LIM7zlzaEQVZClwSFovJ/g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dKzLrjCB; arc=none smtp.remote-ip=209.85.215.182 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4316606A32F for ; Wed, 2 Dec 2026 01:40:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D4316606A32F 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.a=rsa-sha256 header.s=20260707 header.b=dKzLrjCB Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-cdece95eca4so2265254a12.1 for ; Tue, 01 Dec 2026 17:40:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796175621; x=1796780421; 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=hYS2l/f+TYiuEKSOsWdzeEWDtLM+NeFWTBBo4xpnf08=; b=dKzLrjCBY/sE1+4txfYkc/cx9+utYbC7mDtaMGSGKgZ67NwKFb8B3iUCeFyBD8cZnR tjP98VrCiU6/S2qw2bO7prHRHHBwNFseITZKqhjkslY9aw20XpHP2lRzy2l+24g/Ieix vw4gkphEkAjVMmCowC8YgXJWEtxAt7BOVB4BeEBXcanaU0i4y90ULzcCCqiDXB+24/xJ 1RkwmKLQFSnloiejvNq7ggn8hR7lqnPYxHyDyLvar8EXki5KNCUZk9vX7+EpOr1n7dN1 4xy++OoJ5KgrkElKd057zvlc6WhzeewbRw3Y6UlTAl+BmuE+7mA2RXRSzYxbRUjIVIMi oUyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796175621; x=1796780421; 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=hYS2l/f+TYiuEKSOsWdzeEWDtLM+NeFWTBBo4xpnf08=; b=kspoiKJ/cSPvHadmoINooOHd6lTvnftBrPglKk7jRGAj4Ln4gzQe60MCzLd2rP/TuY ye0UgDhotkxxqkOvNXONNoQDXbi25cXmalZgI2cPq2hMcxVhrLGCVzZWk21FVsjt9Vuk duECEGtMc/nuHOXqWGRajLqsL7QPAYa7KtkSvlOx3uwNebl12/cm4/15ZNyFI1PGdYx5 SNGdz7jpy5IND+US+SxqCrbZhM1HZjG3wlC9hl30WkWiYZivqzNaz9OjOb5VTBFWlZ/C ++6jjoVs9hnc18UgqI2RQec5S4+SwJsLxYZnputL8u4aWhIPwbmhFaCzqbcUSeJSPdST qy6g== X-Forwarded-Encrypted: i=1; AL+hErH+VN9BLZLpAOmDpEsDbCq6EL/0rBSiwnn0b+ImRPyaC/yTwl4As2AyESq4sjo0PE15TyY5bPZYQpFzduM=@vger.kernel.org X-Gm-Message-State: APuU4Z8JPM3b0FVHC+GDFp9eGg7UyX9RN65XBWj+wcLdKprX2Z6cXYIF 38n9kA5luQ4WChQe3uu/m4+y6uFgq/LCeOBQeJFwTTeBX68hB+p3xBSh X-Gm-Gg: AZFdTZfQlIuEY+9Jm+Ixf7gqS93tsBQwqqg7eBcocC4zr+G9yH68QopJ8qOpe6yo5d9 yfxrZIHzwt3C3KODP+St8Nm9MqwuBm/Jwe6pUfiDF17W2D+4bSFQwWokA3kH8eKEmBAu6zt+ETh Ps0Uyy+sivst2wHS7w+BQrPf5PzkGus8zdKH+bJI2UN2q0NkpgIJWeJbkW21DFRujDZtVzcOQdQ 3LLPOWpHy4g6MVwIpMJ5QJlXAJcJbY5kFxqDptdnn59bI/uay8ZtEVIvAjSPJM78SAqqTyXYwSj hdw0dZqcRmoM5BDGLya/OvO9OhZMwJIOboOzEXfnPe1yp2dl11xOcKGq5lh/h/g6my3BOJoH3dv RQyGt/BFwefEia61ZobZcuTdJYsR2EjDaCvyfqP6QANhCY2SJ9b/8AD3SRpo46NMFogbZxKs2XY wZQBlVU7gRSYEmSy4nEFN2ojn70ZdSrh3UfNXwv7pGIiE3/ZzQtDF/EkAJ8h/19Y8f0zlxkyX5F 6xsEp57O37IYe1bHyJplO6s/M3LUOq0HmTkW3011r6aHAdRUellMveqH4tXR4p68nt1OVDKxUyC G206uuG105F3uNSAGD8UcDB1aIn8G75w93DPBFXroiIj3MRdW0l38iItowRPzFRTBh7iAMd7ArU PoUxIB6D8tZk1TJr2vw== X-Received: by 2002:a17:90b:240f:b0:3b4:a923:a4e1 with SMTP id 98e67ed59e1d1-3b4a923a59bmr18677084a91.54.1796175620987; Tue, 01 Dec 2026 17:40:20 -0800 (PST) Received: from localhost.localdomain (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b4b0f482bdsm44652325a91.14.2026.12.01.17.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 17:40:20 -0800 (PST) From: Joey Lu To: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam 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 , Krzysztof Kozlowski Subject: [PATCH v10 1/4] dt-bindings: phy: nuvoton,ma35d1-usb2-phy: extend for dual-port and OTG Date: Wed, 2 Dec 2026 09:39:58 +0800 Message-ID: <20261202014001.424366-2-a0987203069@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261202014001.424366-1-a0987203069@gmail.com> References: <20261202014001.424366-1-a0987203069@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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. Both PHY0 and PHY1 values must be supplied together when the property is present. - nuvoton,oc-active-high: the over-current detect polarity depends on the choice of VBUS power switch. Signed-off-by: Joey Lu Reviewed-by: Krzysztof Kozlowski --- .../bindings/phy/nuvoton,ma35d1-usb2-phy.yaml | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/nuvoton,ma35d1-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/nuvoton,ma35d1-usb2-phy.yaml index fff858c909a06..1bd22dd0e5fc5 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 @@ -42,4 +81,5 @@ examples: clocks = <&clk USBD_GATE>; nuvoton,sys = <&sys>; #phy-cells = <0>; + nuvoton,rcalcode = <7 7>; }; -- 2.43.0