devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Edwards <cfsworks@gmail.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Ondrej Jirman" <megi@xff.cz>,
	"Chris Morgan" <macromorgan@hotmail.com>,
	"Alex Zhao" <zzc@rock-chips.com>,
	"Dragan Simic" <dsimic@manjaro.org>,
	"FUKAUMI Naoki" <naoki@radxa.com>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Jing Luo" <jing@jing.rocks>,
	"Kever Yang" <kever.yang@rock-chips.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Daniel Kukieła" <daniel@kukiela.pl>,
	"Joshua Riek" <jjriek@verizon.net>,
	"Sam Edwards" <CFSworks@gmail.com>,
	"Jonathan Bennett" <jbennett@incomsystems.biz>
Subject: [PATCH 2/5] arm64: dts: rockchip: Fix Turing RK1 PCIe3 hang
Date: Wed, 11 Sep 2024 19:50:31 -0700	[thread overview]
Message-ID: <20240912025034.180233-3-CFSworks@gmail.com> (raw)
In-Reply-To: <20240912025034.180233-1-CFSworks@gmail.com>

The PCIe 3 PHY in the RK3588 requires a running external reference clock
for both external bus transfers and some internal PIPE operations.
Without this clock, the PCIe3 controller fails to initialize and ignores
DBI transactions indefinitely, which stalls the Linux boot process.

On most RK3588 boards, this is evidently not an issue. But on some "SoM"
designs (Turing RK1, Mixtile Core 3588E, ArmSoM AIM7, to name a few),
this clock is only provided when the CLKREQ# signal is asserted.

The PCIe 3 PHY generates the CLKREQ# signal when it knows it needs the
reference clock for proper operation. Unfortunately, the current DT for
Turing RK1 does not mux out these low-speed signals, resulting in broken
boots and potentially other issues.

This patch, following the previous one that split up the PCIe pinctrls,
resolves this problem for Turing RK1 by explicitly muxing all of the
signals needed for PCIe 2 and 3 support.

Cc: Jonathan Bennett <jbennett@incomsystems.biz>
Fixes: 2806a69f3f ("arm64: dts: rockchip: Add Turing RK1 SoM support")
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
---
 arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
index dbaa94ca69f4..9bcb5acdea54 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
@@ -211,7 +211,7 @@ rgmii_phy: ethernet-phy@1 {
 &pcie2x1l1 {
 	linux,pci-domain = <1>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&pcie2_reset>;
+	pinctrl-0 = <&pcie2_reset>, <&pcie30x1m1_0_clkreqn>, <&pcie30x1m1_0_waken>;
 	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 };
@@ -223,7 +223,7 @@ &pcie30phy {
 &pcie3x4 {
 	linux,pci-domain = <0>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&pcie3_reset>;
+	pinctrl-0 = <&pcie3_reset>, <&pcie30x4m1_clkreqn>, <&pcie30x4m1_waken>;
 	reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc3v3_pcie30>;
 	status = "okay";
-- 
2.44.2


  parent reply	other threads:[~2024-09-12  2:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12  2:50 [PATCH 0/5] Turing RK1 SoM DT updates Sam Edwards
2024-09-12  2:50 ` [PATCH 1/5] arm64: dts: rockchip: Split up RK3588's PCIe pinctrls Sam Edwards
2024-09-12  2:50 ` Sam Edwards [this message]
2024-09-12  2:50 ` [PATCH 3/5] arm64: dts: rockchip: Enable automatic fan control on Turing RK1 Sam Edwards
2024-09-12  2:50 ` [PATCH 4/5] arm64: dts: rockchip: Enable all 3 USBs " Sam Edwards
2024-09-12 19:53   ` Jonas Karlman
2024-09-12 21:06     ` Sam Edwards
2024-09-12 22:35       ` Jonas Karlman
2024-09-12 23:20         ` Sam Edwards
2024-09-12  2:50 ` [PATCH 5/5] arm64: dts: rockchip: Enable GPU " Sam Edwards
2024-09-30 10:55 ` (subset) [PATCH 0/5] Turing RK1 SoM DT updates Heiko Stuebner

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=20240912025034.180233-3-CFSworks@gmail.com \
    --to=cfsworks@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@kukiela.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=dsimic@manjaro.org \
    --cc=heiko@sntech.de \
    --cc=jbennett@incomsystems.biz \
    --cc=jing@jing.rocks \
    --cc=jjriek@verizon.net \
    --cc=kever.yang@rock-chips.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=macromorgan@hotmail.com \
    --cc=megi@xff.cz \
    --cc=naoki@radxa.com \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=zzc@rock-chips.com \
    /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;
as well as URLs for NNTP newsgroup(s).