From patchwork Fri Apr 12 12:58:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 1923082 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=m9nVlnWD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.199.223; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-58739-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (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 4VGGpS4TDSz1yYB for ; Fri, 12 Apr 2024 22:58:40 +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 E5BA71C216F3 for ; Fri, 12 Apr 2024 12:58:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF23F5915A; Fri, 12 Apr 2024 12:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m9nVlnWD" 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 959CE55C3B for ; Fri, 12 Apr 2024 12:58:32 +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=1712926712; cv=none; b=gQrACaR/aglAclx96SkokVsy/AXS9dXTAxLnBkZqKmV0sGp801IWYONjDVcaN1vdD4xQ1CYJ03j6tv+mv1zGI64Yp7SiIugGVWHd1ho+G7hOLcPUltQH93tQkqPkDVaTYiKMotDdqa1HI3uB2M98xCLJuFEbfm4UenVrjMqgwA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712926712; c=relaxed/simple; bh=6jKTFVNQuNQalKatg6CmqSXTnFJUallQY7OIfMkZQzs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Z/mWw2yerJ9VfCnz6xxGJv9u4le1yxsiku5kmUg3aW+7wTHIrBJuneG2ftqylCHbiFc3MxkjVg2aLD3PuScAEZwTxWDJkIC+NN8b69Fhkhh7ZrNFpIDvOElX28so+Ciy15L0vpkwEP170JZP13avxF7MOujgubcWhmDsx9SDyKQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m9nVlnWD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7EF1C113CC; Fri, 12 Apr 2024 12:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712926712; bh=6jKTFVNQuNQalKatg6CmqSXTnFJUallQY7OIfMkZQzs=; h=From:To:Cc:Subject:Date:From; b=m9nVlnWDXq6qsfaIw0d4f3EsFNcaM0VTh2o5jjXI5pE1tIk+hq0HLjHDPQgHYYHim Ts9R2WND6hUPzassL3Uv9BA41Zv6xVH9QJZy5nTsQqD701B+EeVcM3hFLyeIUFYj0f TUcL0vjfceCiWyeAlBbDEWiiL1G+X6SD9wuviAllBPl14jZF9qAhKY1gtXe/+yffQK WXgReZ9t1mHwmpzDXCcZren0/fVmxWketDJhifW88jcB9nHzcCV1O9oUB/jBvHTsrP oJpZgNY0/SyfKTwmvQyoV0VweNE8iTcFNkTJphFmrZIPPqz7C7O10es5H/tZvIAdAg PxDMn15PXMeuA== 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 v2 0/2] rockchip pcie3-phy separate refclk support Date: Fri, 12 Apr 2024 14:58:14 +0200 Message-ID: <20240412125818.17052-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/next 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 Changes since V1: -Picked up tags -Rebased on phy/next 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(+)