* [PATCH v2] arm64: dts: rockchip: rk356x: Fix PCIe register and range mappings
@ 2023-06-01 13:25 Nicolas Frattaroli
2023-06-02 21:41 ` Diederik de Haas
2023-06-06 17:07 ` Heiko Stuebner
0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Frattaroli @ 2023-06-01 13:25 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Peter Geis
Cc: Andrew Powers-Holmes, Ondrej Jirman, stable, Jonas Karlman,
Nicolas Frattaroli, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
From: Andrew Powers-Holmes <aholmes@omnom.net>
The register and range mappings for the PCIe controller in Rockchip's
RK356x SoCs are incorrect. Replace them with corrected values from the
vendor BSP sources, updated to match current DT schema.
These values are also used in u-boot.
Fixes: 66b51ea7d70f ("arm64: dts: rockchip: Add rk3568 PCIe2x1 controller")
Cc: stable@vger.kernel.org
Signed-off-by: Andrew Powers-Holmes <aholmes@omnom.net>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
---
Since nobody else was gonna submit this fix on a fix, I decided
to do it myself, based on the u-boot patch Jonas Karlman wrote.
Please test that this does not break the PCIe 3 controller on
RK3568 hardware, I don't have the right setup to easily test it
on there.
Changes since v1:
- Fix copy-paste error on second reg property from 0xf2000000
to 0xf0000000
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 14 ++++++++------
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 7 ++++---
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
index ba67b58f05b7..f1be76a54ceb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
@@ -94,9 +94,10 @@ pcie3x1: pcie@fe270000 {
power-domains = <&power RK3568_PD_PIPE>;
reg = <0x3 0xc0400000 0x0 0x00400000>,
<0x0 0xfe270000 0x0 0x00010000>,
- <0x3 0x7f000000 0x0 0x01000000>;
- ranges = <0x01000000 0x0 0x3ef00000 0x3 0x7ef00000 0x0 0x00100000>,
- <0x02000000 0x0 0x00000000 0x3 0x40000000 0x0 0x3ef00000>;
+ <0x0 0xf2000000 0x0 0x00100000>;
+ ranges = <0x01000000 0x0 0xf2100000 0x0 0xf2100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf2200000 0x0 0xf2200000 0x0 0x01e00000>,
+ <0x03000000 0x0 0x40000000 0x3 0x40000000 0x0 0x40000000>;
reg-names = "dbi", "apb", "config";
resets = <&cru SRST_PCIE30X1_POWERUP>;
reset-names = "pipe";
@@ -146,9 +147,10 @@ pcie3x2: pcie@fe280000 {
power-domains = <&power RK3568_PD_PIPE>;
reg = <0x3 0xc0800000 0x0 0x00400000>,
<0x0 0xfe280000 0x0 0x00010000>,
- <0x3 0xbf000000 0x0 0x01000000>;
- ranges = <0x01000000 0x0 0x3ef00000 0x3 0xbef00000 0x0 0x00100000>,
- <0x02000000 0x0 0x00000000 0x3 0x80000000 0x0 0x3ef00000>;
+ <0x0 0xf0000000 0x0 0x00100000>;
+ ranges = <0x01000000 0x0 0xf0100000 0x0 0xf0100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf0200000 0x0 0xf0200000 0x0 0x01e00000>,
+ <0x03000000 0x0 0x40000000 0x3 0x80000000 0x0 0x40000000>;
reg-names = "dbi", "apb", "config";
resets = <&cru SRST_PCIE30X2_POWERUP>;
reset-names = "pipe";
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index f62e0fd881a9..61680c7ac489 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -952,7 +952,7 @@ pcie2x1: pcie@fe260000 {
compatible = "rockchip,rk3568-pcie";
reg = <0x3 0xc0000000 0x0 0x00400000>,
<0x0 0xfe260000 0x0 0x00010000>,
- <0x3 0x3f000000 0x0 0x01000000>;
+ <0x0 0xf4000000 0x0 0x00100000>;
reg-names = "dbi", "apb", "config";
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
@@ -982,8 +982,9 @@ pcie2x1: pcie@fe260000 {
phys = <&combphy2 PHY_TYPE_PCIE>;
phy-names = "pcie-phy";
power-domains = <&power RK3568_PD_PIPE>;
- ranges = <0x01000000 0x0 0x3ef00000 0x3 0x3ef00000 0x0 0x00100000
- 0x02000000 0x0 0x00000000 0x3 0x00000000 0x0 0x3ef00000>;
+ ranges = <0x01000000 0x0 0xf4100000 0x0 0xf4100000 0x0 0x00100000>,
+ <0x02000000 0x0 0xf4200000 0x0 0xf4200000 0x0 0x01e00000>,
+ <0x03000000 0x0 0x40000000 0x3 0x00000000 0x0 0x40000000>;
resets = <&cru SRST_PCIE20_POWERUP>;
reset-names = "pipe";
#address-cells = <3>;
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] arm64: dts: rockchip: rk356x: Fix PCIe register and range mappings
2023-06-01 13:25 [PATCH v2] arm64: dts: rockchip: rk356x: Fix PCIe register and range mappings Nicolas Frattaroli
@ 2023-06-02 21:41 ` Diederik de Haas
2023-06-06 17:07 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Diederik de Haas @ 2023-06-02 21:41 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Peter Geis, Nicolas Frattaroli
Cc: Andrew Powers-Holmes, Ondrej Jirman, stable, Jonas Karlman,
Nicolas Frattaroli, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
On Thursday, 1 June 2023 15:25:16 CEST Nicolas Frattaroli wrote:
> The register and range mappings for the PCIe controller in Rockchip's
> RK356x SoCs are incorrect. Replace them with corrected values from the
> vendor BSP sources, updated to match current DT schema.
I have been using the exact same patch for a while now and without it my
Quartz64 Model A with a USB3 adapter card either caused a boot failure, a
fatal kernel crash or a non-fatal kernel crash (system seemed to work apart
from the USB3 adapter card).
With the patch, everything worked. So
Tested-by: Diederik de Haas <didi.debian@cknow.org>
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] arm64: dts: rockchip: rk356x: Fix PCIe register and range mappings
2023-06-01 13:25 [PATCH v2] arm64: dts: rockchip: rk356x: Fix PCIe register and range mappings Nicolas Frattaroli
2023-06-02 21:41 ` Diederik de Haas
@ 2023-06-06 17:07 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2023-06-06 17:07 UTC (permalink / raw)
To: Nicolas Frattaroli, Conor Dooley, Krzysztof Kozlowski, Peter Geis,
Rob Herring
Cc: Heiko Stuebner, stable, linux-arm-kernel, linux-rockchip,
devicetree, Jonas Karlman, Ondrej Jirman, linux-kernel,
Andrew Powers-Holmes
On Thu, 1 Jun 2023 15:25:16 +0200, Nicolas Frattaroli wrote:
> From: Andrew Powers-Holmes <aholmes@omnom.net>
>
> The register and range mappings for the PCIe controller in Rockchip's
> RK356x SoCs are incorrect. Replace them with corrected values from the
> vendor BSP sources, updated to match current DT schema.
>
> These values are also used in u-boot.
>
> [...]
Applied, thanks!
[1/1] arm64: dts: rockchip: rk356x: Fix PCIe register and range mappings
commit: 568a67e742dfa90b19a23305317164c5c350b71e
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-06 17:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01 13:25 [PATCH v2] arm64: dts: rockchip: rk356x: Fix PCIe register and range mappings Nicolas Frattaroli
2023-06-02 21:41 ` Diederik de Haas
2023-06-06 17:07 ` Heiko Stuebner
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).