Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 DB9FD34FF7E for ; Wed, 29 Oct 2025 17:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761759449; cv=none; b=CVJXr+Qv7CJxQPWplhBvdhhVkxgG2O/6Bc2uIxpGMbjMOpn33eXlEkPzzIdLuQX138uR5U3pNnY+6E/yN328/7IQ2OQT2PJAfAet/ptxhcNZYEZZCpzal+I5hfgNtPU+DPqlgX4NGMCOFYkUbVWRptLLj1KWXEh8OnoYvm1/yiE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761759449; c=relaxed/simple; bh=IVDttnhItzDcgO8FDLA0XO64eO7JpqJzIxKxGaXIRTo=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FcNse8k7RitPFYZ22b5JWBVeTaUFPcNlm0uROMIB18kVi24iQhyjsRtMHzd78tvm/NP0x3pZVuLiRsuEs/0DUl6hqfdq/4MF7wsq+b1By79OHO9MoSgMxH8zE+X1Or3VYbSdPDC7qo+FAkTtgHKKLNVHa9zBfe3uBG6NC9Z1/nI= 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=jy5Fxrm5; arc=none smtp.client-ip=209.85.221.47 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="jy5Fxrm5" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-427007b1fe5so90326f8f.1 for ; Wed, 29 Oct 2025 10:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761759446; x=1762364246; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bec5DtjUMCMZ+LaW5PfzvbvdukX10M0RMuKRh3c/XPA=; b=jy5Fxrm5hPMNvThTmotm0Y2iVkdTLcuUFIQBokJ4vrbMWJy7yFEziXNOE2HlUyTzDe l6pii5kDrp6zSEBH7C0/frnH6XXZ9+3m5l5635cAaOkZ/VwB4kBCqLITEr0bwiV28Glw WjiNDX1PvO8KrrTTH5ithTMMVBgPGRnshphkmPhnLH5+thlYQNE+BLiaen/7yhp37kZO XiFvpqwdiTCjTEx9tH4q0MVm3N9bdCn0Ci7U5xIsSqFjPqJdmteu7kY3x7KrBDdUNrOd swb+znO/zuMNDaHo6UEilJfsPJKISFI+q4XHwgWrcWJ8r2OwIg4rweAehRfXB3kwi7AW JW3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761759446; x=1762364246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bec5DtjUMCMZ+LaW5PfzvbvdukX10M0RMuKRh3c/XPA=; b=mEcmLwjdC7YsFMjrhnCqi9XN5JT5u+okaiC+Gk+HpJ5Zcf0byyLzpgNkLgZn+ThPfM 7vMBspNtgW+a/EcPX2cyKh8wksvkuBSQ7MbF1GOWvh5vKtZFGu4mTAjF76sb6o1llUh2 otcW7/XSQLrT9Rr/QkNKV09I+RK+Kr5QHKAUWNyFu0FgZEu7Y7jtYmwo5d89IhWb0Fly 6Wzl61r/rW4G57GWDjyXbTtcJA5elwJLEfZd0osV7jJyNIR0W3HIzDPrGoxNPzuRQZFj XQFG5zDOfQMg0YN3QLtEFKesJQRnReXmxEKTuh6G0zuI6s4DKj32NBSeehJmG3XkOkDu UuZQ== X-Forwarded-Encrypted: i=1; AJvYcCUBQ3eFjDu3DCQVplGHBfw0cRARYgy7OtULgtccZRraPlhBcEuzUAtiGyAZFSE72Y+s7SHIIHNe0Ran@vger.kernel.org X-Gm-Message-State: AOJu0YxPN4p77+MdkJHr9gNGGX7q5iABWnZgIkL4gUk8SUCkaqUIGaW7 qjdxaZblhDgAhytg5S9JbLFHADLKPy6Z3CDmh7gGtlVqA/Zt3wlEWEXg X-Gm-Gg: ASbGncvYlxiCtzsZEqwmw7zpkOpNUPi1pXVjHiDysgCVAaF0LKV3aTlyQKfJndZpYi8 ra8CaPdKz7Mcqtt/Wa6ZpBXCsSs2U0sV8D6lZjoJuh2ECFS71Se3yHWSE7n4v0PmcEuG33cOmU1 kUKT7jpYanpFyjxKO1Fxn3Kjn/XqgnjBBF/FjUZNCSCqLnnmsxOXgQUx7eMYTcWaR4dvj0Ye+is W3Mqk5bYuztaIKeGH71SHVsIFZH04kmiWnGSQG2Qiwcx8W0p29Y7zkN41Eqn4jZdjbeUSp3+bST I/jQ6UIyAKFMqK7zZbTiXLOmM7gB3ndSM0e7Fs+UKAb2e+AsRp5s6bAj8nylsVJX60Q3QV6ZIwZ hby+tV+Ny61NkdC9zdJFK9xNjvkPhstd/+WR7duSOfi5XB/dJfx3Vr/F7rihoGBixd2Nr0uWHpH lC/6ukqyc9XJhPyryVrqu13+QM9ktGAw== X-Google-Smtp-Source: AGHT+IGerI4odt8yvZLvuwrqAAAQ1NsWiR0PnVGWdiklZSUkMpKCbKISgvvccIoZVLhmQ6qz4uNj3g== X-Received: by 2002:a05:6000:2481:b0:427:151:3db6 with SMTP id ffacd0b85a97d-429aef7b230mr3253676f8f.24.1761759446075; Wed, 29 Oct 2025 10:37:26 -0700 (PDT) Received: from Ansuel-XPS24 (93-34-90-37.ip49.fastwebnet.it. [93.34.90.37]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-429952d9e80sm27493844f8f.28.2025.10.29.10.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 10:37:25 -0700 (PDT) From: Christian Marangi To: Christian Marangi , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lorenzo Bianconi , linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/4] dt-bindings: phy: Add documentation for Airoha AN7581 USB PHY Date: Wed, 29 Oct 2025 18:37:10 +0100 Message-ID: <20251029173713.7670-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251029173713.7670-1-ansuelsmth@gmail.com> References: <20251029173713.7670-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add documentation for Airoha AN7581 USB PHY that describe the USB PHY for the USB controller. Airoha AN7581 SoC support a maximum of 2 USB port. The USB 2.0 mode is always supported. The USB 3.0 mode is optional and depends on the Serdes mode currently configured on the system for the relevant USB port. The first USB port on the SoC can be both used for USB 3.0 operation or Ethernet (HSGMII). The second USB port on the SoC can be both used for USB 3.0 operation or for an additional PCIe line. Signed-off-by: Christian Marangi --- For DT maintainers, in v2 there were some comments, hope the new description and names of the property better clarify the usage and why they are needed. .../bindings/phy/airoha,an7581-usb-phy.yaml | 76 +++++++++++++++++++ MAINTAINERS | 7 ++ .../dt-bindings/phy/airoha,an7581-usb-phy.h | 11 +++ 3 files changed, 94 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/airoha,an7581-usb-phy.yaml create mode 100644 include/dt-bindings/phy/airoha,an7581-usb-phy.h diff --git a/Documentation/devicetree/bindings/phy/airoha,an7581-usb-phy.yaml b/Documentation/devicetree/bindings/phy/airoha,an7581-usb-phy.yaml new file mode 100644 index 000000000000..5106685c124d --- /dev/null +++ b/Documentation/devicetree/bindings/phy/airoha,an7581-usb-phy.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/airoha,an7581-usb-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Airoha AN7581 SoC USB PHY + +maintainers: + - Christian Marangi + +description: > + The Airoha AN7581 SoC USB PHY describes the USB PHY for the USB controller. + + Airoha AN7581 SoC support a maximum of 2 USB port. The USB 2.0 mode is + always supported. The USB 3.0 mode is optional and depends on the Serdes + mode currently configured on the system for the relevant USB port. + + The first USB port on the SoC can be both used for USB 3.0 operation or + Ethernet (HSGMII). + The second USB port on the SoC can be both used for USB 3.0 operation or + for an additional PCIe line. + +properties: + compatible: + const: airoha,an7581-usb-phy + + reg: + maxItems: 1 + + airoha,usb2-monitor-clk-sel: + description: Describe what oscillator across the available 4 + should be selected for USB 2.0 Slew Rate calibration. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + + airoha,usb3-serdes: + description: Describe what Serdes line is attached to the USB 3.0 port. + Can be either Serdes USB1 or Serdes USB2. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [2, 3] + + airoha,scu: + description: Phandle to the SCU syscon to configure the Serdes line. + $ref: /schemas/types.yaml#/definitions/phandle + + '#phy-cells': + description: Describe if the referred PHY is the USB 2.0 PHY or USB 3.0 PHY. + const: 1 + +required: + - compatible + - reg + - airoha,usb2-monitor-clk-sel + - airoha,usb3-serdes + - airoha,scu + - '#phy-cells' + +additionalProperties: false + +examples: + - | + #include + #include + + phy@1fac0000 { + compatible = "airoha,an7581-usb-phy"; + reg = <0x1fac0000 0x10000>; + + airoha,usb2-monitor-clk-sel = ; + airoha,usb3-serdes = ; + airoha,scu = <&scu>; + + #phy-cells = <1>; + }; + diff --git a/MAINTAINERS b/MAINTAINERS index 8085fdca7bcd..af23c590bbc6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -763,6 +763,13 @@ S: Maintained F: Documentation/devicetree/bindings/spi/airoha,en7581-snand.yaml F: drivers/spi/spi-airoha-snfi.c +AIROHA USB PHY DRIVER +M: Christian Marangi +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/phy/airoha,an7581-usb-phy.yaml +F: include/dt-bindings/phy/airoha,an7581-usb-phy.h + AIRSPY MEDIA DRIVER L: linux-media@vger.kernel.org S: Orphan diff --git a/include/dt-bindings/phy/airoha,an7581-usb-phy.h b/include/dt-bindings/phy/airoha,an7581-usb-phy.h new file mode 100644 index 000000000000..efbb0ae75e3a --- /dev/null +++ b/include/dt-bindings/phy/airoha,an7581-usb-phy.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ + +#ifndef _DT_BINDINGS_AIROHA_AN7581_USB_PHY_H_ +#define _DT_BINDINGS_AIROHA_AN7581_USB_PHY_H_ + +#define AIROHA_USB2_MONCLK_SEL0 0 +#define AIROHA_USB2_MONCLK_SEL1 1 +#define AIROHA_USB2_MONCLK_SEL2 2 +#define AIROHA_USB2_MONCLK_SEL3 3 + +#endif -- 2.51.0