From patchwork Thu Apr 11 13:01:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 1922541 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=c/X/UEdh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-58303-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFfwr4tN6z1yYQ for ; Thu, 11 Apr 2024 23:02:04 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8CCBE1C21AB2 for ; Thu, 11 Apr 2024 13:02:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AC0146B9A; Thu, 11 Apr 2024 13:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c/X/UEdh" X-Original-To: devicetree@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AA69624 for ; Thu, 11 Apr 2024 13:01:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712840518; cv=none; b=AGVFMp2jAOG8PhqXaGEdhX/Ujx5nxrLjZ4BBstxC0OJ2qthHCz1suwjsXTRoslbTokq17jnT2UX0COFQKLFwRS8W5RObRVrrs1CO9Qgr+qAivbwVS8GhJEHzRiKU1iQqHHTEfKNQ8/AIbPf/zZeK6/aasWhNOmBCOtJLY0U02iQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712840518; c=relaxed/simple; bh=NmTuJ01mkdJ4M9SVkg9GPWdStss5bWliTugsuTs2VlM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=swaVDm4XXBSgjgEHNkNM34oHEgSjuQGWgIML4QkP/GLNc/o/EkwMArIHPuD84ZUZM9PNxl5fo76ZPeGIdWaBiIXf/fEQlMob6LF/B/WxyA6PHELg7sy4UwAw7YAGMAago75T2a8VmydPy+Y1HlxXeYSkuphOTHNsUHoLwkXLW3Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c/X/UEdh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7454EC433C7; Thu, 11 Apr 2024 13:01:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712840517; bh=NmTuJ01mkdJ4M9SVkg9GPWdStss5bWliTugsuTs2VlM=; h=From:To:Cc:Subject:Date:From; b=c/X/UEdh/jiwhdWH1yldKABp0w5pXUdODB2ZvPtWR9kT/vJ7l6NpKQlKp5q3Hmzqn ZAdmGl7R1F/OxjKxz8d3AXCkuBm0yt2JPPh+iNRkvM4En+76SfAYjzGAYmObzKMc2P tmeCBVKSLF3XSVKD7kc9UrZIQ190D57JhColEjyAINfnWSBdbUnEu7CREHzi7LtcW1 ye3wrZV//bk1quYBgXKNWtNrHMjP9v43vsrOPt442QxJ+cQDyFEoq5ZsfB5tScFcQB w+mUH56YSVTuKZ6yT2D+E9IDBDG2EWR1xiJLBbvTLZQ4v2KcyC3EJ4r0dbBLlEO+wh D2Nl+lq2Wnynw== From: Niklas Cassel To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: devicetree@vger.kernel.org, Sebastian Reichel , Michal Tomek , Damien Le Moal , Jon Lin , Niklas Cassel , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 0/2] rockchip pcie3-phy separate refclk support Date: Thu, 11 Apr 2024 15:01:46 +0200 Message-ID: <20240411130150.128107-1-cassel@kernel.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This series is based on: linux-phy phy/fixes (Since there are other rockchip,pcie3-phy changes there that have not yet reached mainline and which would otherwise have caused conflicts.) Hello all, The rockchip,pcie3-phy PHY in rk3588 is by default configured to run in "common reference clock" mode. (Which is a sensible default, as the most commonly used clock configuration is "common reference clock".) However, PCIe also defines two other configurations where the Root Complex and Endpoint uses separate reference clocks: SRNS and SRIS. Having the Root Complex PHY configured in "common reference clock mode" while having an Endpoint connected which is supplying its own reference clock (i.e. SRNS or SRIS configuration), will either result in the link training failing, or a highly unstable link that continuously jumps between link states L0 and recovery. Add a rockchip specific device tree property that can be added to the rk3588 Root Complex device tree PHY node, if the connected Endpoint device is using a separate refererence clock. This way we will get a stable link when using an Endpoint configured in SRNS or SRIS mode. Kind regards, Niklas Niklas Cassel (2): dt-bindings: phy: rockchip,pcie3-phy: add rockchip,rx-common-refclk-mode phy: rockchip-snps-pcie3: add support for rockchip,rx-common-refclk-mode .../bindings/phy/rockchip,pcie3-phy.yaml | 10 +++++ .../phy/rockchip/phy-rockchip-snps-pcie3.c | 37 +++++++++++++++++++ 2 files changed, 47 insertions(+)