Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) (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 7DF1B2F83BB for ; Fri, 7 Nov 2025 19:16:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762542969; cv=none; b=TFtRD4+S1PjMuYrbgSsuDcxmRcYwb3EOYQ1dwLgKnEdvbzjAMKqK2qNcvLD2GIYy9PQ4p+vDRyFbwEFEQx3Vf0yBd2XG4bk7B9bdxet4gEzuuSJsNcrlubTH66p4Mnv76WaxMecGjZDMmxkLiHFbLEIB4qjhvLQR9Py0XKgxgis= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762542969; c=relaxed/simple; bh=w4sH8gKES/QyK5DTu18MOerFvzDp7pfH5YwAuXgh+W4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OX4le17rSjkK2Vc8F2SVLz/ABRYbdwmPoygpUJtJBxLnzHoTpGtKQ5q3bPEFmeX0nr7lJkf2D0r7ddPAI6owZIFz+7fgqedEfB2CUJ1ie4676K1LkAZD1z2/bdsaq/e7Oc/fM9Ak3uwA6SKQPtIMCXZoebSWo2C0K3OQMjNrd1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b=JO7SK/eO; arc=none smtp.client-ip=209.85.166.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b="JO7SK/eO" Received: by mail-io1-f65.google.com with SMTP id ca18e2360f4ac-9486354dcb2so44848339f.3 for ; Fri, 07 Nov 2025 11:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1762542966; x=1763147766; 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; bh=Jj6J8lcepG5DYDhxKSNWV2cRY6QtdiZGtrhbDPkQq8E=; b=JO7SK/eOEhiir2AZ1/7cl+4lmy/IZeZ/o4sOHbEJ/LPzfIjNvAOyGg//Wcq7HAl7x3 gK+10t+ayZxMLF+fX7SjmvTQx6qvQzEZnS+F1WGTKa9DGE7wEUueAM/6Hpqdn7+aGwCH odEyg8l47DQj0UizRcJDCxV4YdaGX7x4sL2Sms5p75uPXl1B3y6bU8JAI0U2gWV8bP0p NNux0s1yOTSETNwjN/psScgHQmVXftV5qhCSdk+98Mrtd5+LB5Jw3Y2LPq363sraVWV4 ulIBMjEws2+G8xrSpgEcgAqE4k39yTyuVahsfGSOthlD9rQZGq7Ed8ApJ4T8cRWrlxVa Z40A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762542966; x=1763147766; 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; bh=Jj6J8lcepG5DYDhxKSNWV2cRY6QtdiZGtrhbDPkQq8E=; b=VtcBbvs9Ly98OUQjB1gXjmKodlyEewNV3fDJFMVb8G6xRWCm5fKNY7iqGMnhSakbyK viF7N7nDnhrViINBbHg4GEAe17n8Y8C04TFVZmNzeUH8x5f2Dotm4FgSbGGa++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X-Received: by 2002:a05:6602:3418:b0:948:3f60:a625 with SMTP id ca18e2360f4ac-94895fb109cmr59742139f.3.1762542966451; Fri, 07 Nov 2025 11:16:06 -0800 (PST) Received: from zippy.localdomain (c-75-72-117-212.hsd1.mn.comcast.net. [75.72.117.212]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-94888c34c6asm118772939f.10.2025.11.07.11.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Nov 2025 11:16:06 -0800 (PST) From: Alex Elder To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: ziyao@disroot.org, dlan@gentoo.org, guodong@riscstar.com, devicetree@vger.kernel.org, linux-phy@lists.infradead.org, spacemit@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/7] dt-bindings: phy: spacemit: Introduce PCIe PHY Date: Fri, 7 Nov 2025 13:15:51 -0600 Message-ID: <20251107191557.1827677-3-elder@riscstar.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251107191557.1827677-1-elder@riscstar.com> References: <20251107191557.1827677-1-elder@riscstar.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 the Device Tree binding for two PCIe PHYs present on the SpacemiT K1 SoC. These PHYs are dependent on a separate combo PHY, which determines at probe time the calibration values used by the PCIe-only PHYs. Reviewed-by: Rob Herring (Arm) Signed-off-by: Alex Elder --- v5: - Wrap lines at 80 columns .../bindings/phy/spacemit,k1-pcie-phy.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml new file mode 100644 index 0000000000000..019b28349be75 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/spacemit,k1-pcie-phy.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/spacemit,k1-pcie-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SpacemiT K1 PCIe PHY + +maintainers: + - Alex Elder + +description: > + Two PHYs on the SpacemiT K1 SoC used for only for PCIe. These + PHYs must be configured using calibration values that are + determined by a third "combo PHY". The combo PHY determines + these calibration values during probe so they can be used for + the two PCIe-only PHYs. + + The PHY uses an external oscillator as a reference clock. During + normal operation, the PCIe host driver is responsible for ensuring + all other clocks needed by a PHY are enabled, and all resets + affecting the PHY are deasserted. + +properties: + compatible: + const: spacemit,k1-pcie-phy + + reg: + items: + - description: PHY control registers + + clocks: + items: + - description: External oscillator used by the PHY PLL + + clock-names: + const: refclk + + resets: + items: + - description: PHY reset; remains deasserted after initialization + + reset-names: + const: phy + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - reset-names + - "#phy-cells" + +additionalProperties: false + +examples: + - | + #include + phy@c0c10000 { + compatible = "spacemit,k1-pcie-phy"; + reg = <0xc0c10000 0x1000>; + clocks = <&vctcxo_24m>; + clock-names = "refclk"; + resets = <&syscon_apmu RESET_PCIE1_GLOBAL>; + reset-names = "phy"; + #phy-cells = <0>; + }; -- 2.48.1