From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079202; b=on6bu+V5OxiYnPOwOk/V+untCC7H6eFk8mP49sF1OY1pQ4dGcLYWnwR6i7KlkZA81keW dwDpzyuVJWgS8K/tD7y1jYDBggelDX2q69MCj3WKT8W5htX4lWMEd47LYQrbf3EeJcxe8 ZSO8VskoLM/psx7J5R4QvaI2DUZcNBG7Xm2wPjtjMbSou2TrlVYmj5h0RyxQ87m7zzSFf DMljFOjjn2iG3/Epi11+MgYsubNweP+kNGVrL/3h4mswM1OEvak50vsEBVkW198w7wX3v R5zQkZ/BKtknrl1NpBEZ++rFGS7KDarNz3lOh4Hqq9zMFvAP1VHDvk3yhCBYUDnZuCQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079202; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-Developer-Signature: X-Developer-Key:Content-Transfer-Encoding; bh=9fNnX0/27xBm6tgeD5PNj/D8K/L5NbuAhADosIs0g7U=; b=lg/7TOFfDlBZrhAX5UQwTQDz0rhZoRRd0T6/S4jZyWs13eXeIck/0EYQjFDG2oi6veOg vS+zZQurbS3iY8wZ1t4YoJ5Kbns7b/efjm5D7gQiItYhRJzuasJC45ViXPS8NFgKyRpp1 I0OB0xiEMhSWFgLbB/uEcP2qUk3kpLCInY2XtNSEVxhAiNf9Yk88ByHOUO3D1PXs33xQ1 Lg0hc61YR2Z9jNRPNHXpoEjfSOS4S5UJtETk1C58U5x3bBJJGNJnL2sXcSVc8DQouamXj HiXmU625X4oSOi8fqMfvWLXq9QP93dIjzRCcICHeT9EX0etkqWllpEy5AJOS2WsjYZg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nQ3kkZH+; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A81FC606A31A; Mon, 30 Nov 2026 22:53:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nQ3kkZH+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 635DC1F00896; Mon, 30 Nov 2026 22:53:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796079202; bh=9fNnX0/27xBm6tgeD5PNj/D8K/L5NbuAhADosIs0g7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nQ3kkZH+fnRPHKe5CvROyHDHdeSZ8Qti3zReaeIB/e0d5pa2uArsmnWJw97lTG9zF NEY0RbuWa7TMR1GUc7qyiOQW05mVg3RpES2Cn2SPj095sXWY8JRyw3U8O/k//meA3C Ukgw6yaiKJwLDXmDnNo5QWl+dr0vfXn1kqvP/ph7uJxj+n0xHUfsUgtIaau8MS52bL nL9NcOxKu12b6D9KGLvPKux2cquJD6PKG4TVyln+Ncw4hZ+rMP8qYQMXV/kzlaZx5q DxqnPPqX84xIxPeyNH5A+2fNEA4DGH7vG5WBaac3P/EPt6NnPvZNNj5kyxXX24WBcb nLLvW0aO6rJtQ== From: Niklas Cassel To: Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, Bjorn Helgaas , Manivannan Sadhasivam , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Damien Le Moal , Vincent Guittot , Marek Vasut , Koichiro Den , Niklas Cassel Subject: [RFC PATCH v2 3/3] dt-bindings: PCI: pci-ep: Add refclk-mode property Date: Mon, 30 Nov 2026 23:52:58 +0100 Message-ID: <20261130225254.204664-8-cassel@kernel.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261130225254.204664-5-cassel@kernel.org> References: <20261130225254.204664-5-cassel@kernel.org> X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3405; i=cassel@kernel.org; h=from:subject; bh=jBm7zCoBR9mE1LW+YoNnjdKsHm87jvMIgP4rmkvZktg=; b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGLJ5/7nNUz8R258pEWfYExHHK/NY4LTnxMT1cxd47Fjnu f1gqsi3jlIWBjEuBlkxRRbfHy77i7vdpxxXvGMDM4eVCWQIAxenAEykv5CRYamM0FTx/48f/r/W VD7z7n22jml+xd/XeUyXblxkefTLWWOGfwZbfizb8VtwX4dIYf68rmAj+8ebi0RFA5fIhexpiW0 L5QAA X-Developer-Key: i=cassel@kernel.org; a=openpgp; fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA Content-Transfer-Encoding: 8bit The PCIe Base Specification defines a Common Refclk architecture, where both ends of a Link use the same reference clock (REFCLK), and separate REFCLK architectures with No SSC (SRNS) or with Independent SSC (SRIS). The architecture has to be known before Link training, e.g. to configure SRIS mode. For an endpoint, the architecture depends on the board design: whether the board can use the REFCLK that the host supplies through the connector, or uses a REFCLK of its own, and whether spread spectrum clocking (SSC) is used. This is not discoverable, and cannot be derived reliably from the clocks of the endpoint: - In existing DTs, an absent local REFCLK only means that it is not described, so it cannot be taken to mean that the endpoint uses the REFCLK supplied by the host. - An endpoint with a separate REFCLK without SSC still has to operate in SRIS mode if the REFCLK of the host uses SSC. Add a 'refclk-mode' property, with the same name and values as the property for the Downstream Port side in the dt-schema pci-bus-common schema, so that both ends of a Link are described the same way. A REFCLK local to the endpoint, and its SSC configuration, are described using the clock binding. Some endpoint controller bindings already have vendor specific properties for this, e.g. "nvidia,enable-ext-refclk" (Common Refclk) and "nvidia,enable-srns" (SRNS). Signed-off-by: Niklas Cassel --- .../devicetree/bindings/pci/pci-ep.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/pci-ep.yaml b/Documentation/devicetree/bindings/pci/pci-ep.yaml index baeb583..626dd71 100644 --- a/Documentation/devicetree/bindings/pci/pci-ep.yaml +++ b/Documentation/devicetree/bindings/pci/pci-ep.yaml @@ -110,6 +110,30 @@ properties: default: 1 maximum: 16 + refclk-mode: + description: | + The reference clock (REFCLK) architecture of the Link, as defined by + the PCIe Base Specification. It depends on how the REFCLK of each end + of the Link is provided, which is not discoverable, but has to be known + before Link training, e.g. to configure SRIS mode, or the receiver of + the PHY. + + common: Common Refclk. Both ends of the Link use the same REFCLK, + typically the REFCLK that the host supplies through the connector. + srns: Separate Refclk with No SSC. Each end of the Link uses its own + REFCLK, and neither of them uses spread spectrum clocking (SSC). + sris: Separate Refclk with Independent SSC. Each end of the Link uses + its own REFCLK, and at least one of them uses SSC. + + A REFCLK local to the endpoint (e.g. a PLL internal to the SoC, or a + clock generator on the board) is described using the clock binding, as + defined by the device specific binding, and its SSC configuration by the + assigned-clock-sscs property. Note that both ends of the Link have to + operate in SRIS mode if either REFCLK uses SSC, so the architecture + cannot be derived from the local SSC configuration alone. + $ref: /schemas/types.yaml#/definitions/string + enum: [ common, srns, sris ] + linux,pci-domain: description: If present this property assigns a fixed PCI domain number to a PCI -- 2.56.1