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=1796079199; b=qfHvWCiR4+Ed3UsETatna1Qbc25w5hdUtupuz2R0x2q2+XnpPstOYygYWsnduMamyDti bJUExuA+hHI/Rh7iowEBAzK26wDBww8qKDZ9y0tkBgQwPSMeQ6AY9or7I/HrlJYjMajeX 9GOyVkKlekcKGuTjfWcQTCyCiNZFnx0qhpLM8fBVZ9GXE3mgnV868KwVQHVRn9C8L9ua6 5VtD8UlkRbzKnRpqeA3A+iTwQu39NBj6ZgMpXjNyS9e9dEnm7r2aLQjmE2f3p85IIlnms RvmiuKPE00r5xY7TvRyOhPatHBBoJCKsHB0rLgMTj3RFFupVy69FPqrR+WYucnbBJxA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079199; 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=VEW4utrMKSzbgaa1fUCTtkhBZIvvucYm/LRA6JaIYNQ=; b=Zhfoe9uMFUBayzqH0eTIxdxlep2k4lGL3oZ9dk6pc6OmHHI0rS4QdOXnkdkybrwK98AB mGVAAC8/I2ser3sDb/Ugt41N2xghwuKv1bD3XB8ljoJ2E5vKupegBj4JDWRJMlwEoJyoK PDPUe0uIFHhykyP2XM/K5ZPxaKEMOPt9ur8s7HmO8rdNB+cZhnx90TuhTrmRGklMRriOp hogjmJ+Jd7lFlgk0B6afFBKb0ajg4WgF00VvNP5n/zeyI0dWwJrJTblzpMcM1H22EwIba E6+wKP5A3IYiwtJuAxfJTYVMj0jNgUlpRTtExw624cYDDV0D7FsIywLua+yTtw+yQ8g== 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=KzVVwSuS; 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 4C271606A32E; Mon, 30 Nov 2026 22:53:19 +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=KzVVwSuS Received: by smtp.kernel.org (Postfix) with ESMTPSA id 267EE1F00927; Mon, 30 Nov 2026 22:53:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796079198; bh=VEW4utrMKSzbgaa1fUCTtkhBZIvvucYm/LRA6JaIYNQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KzVVwSuSwicd96xdKo8k/VNOOoJWZi20b5BLiJwjnbeZjJOEzWm+cLBLT3WiR75Yd 7fcqG3VBBTiqpElXt6DZez6jNYFXI6tQeueAQ5fyvfKlCbVOi5XyUmKnK5AluFZLy6 kISUfQrwFLt98wYH/ASw135fdN46lwZmNl65r2K1nhwZr31Shx6NcPmsrDZ3JyJVml z+foeLE6E4XArK/KtQyuYCrmp7mMcUwA6+2cUC5Pk7524xQhB2D7PfLaErsXgV0NPB p/A9PEf4ZobDQ7lDXqw1Ad8Zgg3nNIxsVPDIHtkiw2TZbqfRtwxcDpWPfEtzzEPSZT JVeQor6Ne6b4Q== 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 2/3] schemas: pci-bus-common: Add 'refclk-mode' property Date: Mon, 30 Nov 2026 23:52:57 +0100 Message-ID: <20261130225254.204664-7-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: devicetree@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=3940; i=cassel@kernel.org; h=from:subject; bh=c1kiKztNpGBFiGjOKV9Dn101/TZkh3mJApWj6Mhek2s=; b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGLJ5/7ltnG8oVsDcpNQjFXL+a2zp9OdL32rz+Dlusbza3 HvqoEtMRykLgxgXg6yYIovvD5f9xd3uU44r3rGBmcPKBDKEgYtTACbiuoLhn+ZeoaoHbepOAtty Pot91ly0Q4VnUpPM+6+CBdsNsvda1zMyLPk3q9bv45LVrFMiJvuGTTFzZM+wipTpn/j4qryqYuI TJgA= 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. 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 --- 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