From: Niklas Cassel <cassel@kernel.org>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Damien Le Moal" <dlemoal@kernel.org>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Marek Vasut" <marek.vasut+renesas@mailbox.org>,
"Koichiro Den" <den@valinux.co.jp>,
"Niklas Cassel" <cassel@kernel.org>
Subject: [RFC PATCH v2 2/3] schemas: pci-bus-common: Add 'refclk-mode' property
Date: Mon, 30 Nov 2026 23:52:57 +0100 [thread overview]
Message-ID: <20261130225254.204664-7-cassel@kernel.org> (raw)
In-Reply-To: <20261130225254.204664-5-cassel@kernel.org>
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. both ends of
the Link have to schedule SKP Ordered Sets much more frequently in SRIS
mode, and some PHYs need a different receiver configuration for separate
REFCLKs.
The architecture depends on how the REFCLK of each end of the Link is
provided, which is not discoverable, and which cannot be derived
reliably from the clocks described in DT:
- Deriving it would require an absent clock to have a meaning, e.g. "the
Root Port does not supply a REFCLK" or "the endpoint uses the REFCLK
supplied by the host". In almost all existing DTs, an absent REFCLK
only means that it is not described, so such a rule would change how
existing DTs are interpreted.
- A Root Port which supplies a REFCLK to a slot has the same clocks,
regardless of whether the device in the slot uses that REFCLK, or a
REFCLK of its own, e.g. an FPGA card set to use its local oscillator.
Describing the latter would require describing the REFCLK of a plug-in
card, or of another board, in the DT of the host.
- Both ends have to operate in SRIS mode if either REFCLK uses SSC, but
the SSC configuration of the REFCLK of the other end is not known.
Always using SRIS for separate REFCLKs is not an option either, since
SRIS is not free, e.g. DWC based controllers do not support L0s in
SRIS mode.
Add a 'refclk-mode' property, which describes the REFCLK architecture of
the Link. Who supplies the REFCLK, and its SSC configuration, are still
described using the clock binding, so the property only describes what
the clock binding cannot.
Today, this is either hardcoded in drivers, or configured using vendor
specific properties, e.g. "nvidia,enable-ext-refclk", "nvidia,enable-srns"
and "rockchip,rx-common-refclk-mode".
The same property is added to the PCI endpoint controller binding in
Linux, so that both ends of a Link are described the same way.
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
dtschema/schemas/pci/pci-bus-common.yaml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/dtschema/schemas/pci/pci-bus-common.yaml b/dtschema/schemas/pci/pci-bus-common.yaml
index bfac42a..5376bed 100644
--- a/dtschema/schemas/pci/pci-bus-common.yaml
+++ b/dtschema/schemas/pci/pci-bus-common.yaml
@@ -160,6 +160,27 @@ properties:
not to advertise ASPM L1 Sub-States support if there is no CLKREQ signal.
type: boolean
+ 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.
+ 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.
+
+ The SSC configuration of a REFCLK provided by the platform is described
+ 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 ]
+
aspm-no-l0s:
description: Disables ASPM L0s capability
type: boolean
--
2.56.1
next prev parent reply other threads:[~2026-11-30 22:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 22:52 [RFC PATCH v2 0/3] PCI: Describe the reference clock architecture of a Link Niklas Cassel
2026-11-30 22:52 ` [RFC PATCH v2 1/3] schemas: pci: bridge: Document the REFCLK supplied to the Link Niklas Cassel
2026-11-30 22:52 ` Niklas Cassel [this message]
2026-11-30 22:52 ` [RFC PATCH v2 3/3] dt-bindings: PCI: pci-ep: Add refclk-mode property Niklas Cassel
2026-11-30 23:38 ` [RFC PATCH v2 0/3] PCI: Describe the reference clock architecture of a Link Niklas Cassel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130225254.204664-7-cassel@kernel.org \
--to=cassel@kernel.org \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=den@valinux.co.jp \
--cc=devicetree@vger.kernel.org \
--cc=dlemoal@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=robh@kernel.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox