[PATCH] arm64: dts: rockchip: Lower the SPI flash frequency on ROCK Pi 4A/B/C
From: Igor Velkov via B4 Relay
Date: Wed Dec 02 2026 - 02:30:53 EST
From: Igor Velkov <iav@xxxxxx>
On a ROCK Pi 4A (XTX XT25F32B flash) running v7.4-rc3, reads from the
SPI NOR flash come back corrupted from 16.5 MHz up. With clk_spi1 at
198 MHz, three reads at each of 9.9, 12.4 and 14.1 MHz match a 4 MiB
test image written at 9.9 MHz byte for byte; at 16.5 MHz every read
differs from it in 90k to 450k bytes, and at 24.75 and 33 MHz the JEDEC
ID reads as ff, so the flash is not probed. spi-rockchip caps the bus
clock at 50 MHz and divides clk_spi1 by an even number, so the 108 MHz
now in the device tree becomes 49.5 MHz. Raising the drive strength of
the SPI pins to 12 mA, or setting rx-sample-delay-ns on the controller
(5 to 45 ns), does not make 16.5 MHz reliable.
A Helios64, with the same SoC and SPI1 pins, reads its W25Q128 cleanly
at 24.75 MHz, so the limit is not in the SoC or the driver.
Go back to 10 MHz, the value used before the commit in Fixes. Tested on
ROCK Pi 4A; 4B and 4C return to the same earlier value.
Fixes: fa16d7a820e4 ("arm64: dts: rockchip: Increase maximum frequency of SPI flash for ROCK Pi 4A/B/C")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Igor Velkov <iav@xxxxxx>
---
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts | 2 +-
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts | 2 +-
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts
index 32d6bce5e3d4..f2530339593c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts
@@ -19,6 +19,6 @@ &spi1 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <108000000>;
+ spi-max-frequency = <10000000>;
};
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
index 55285c7c6e54..672ff0b1eb6c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
@@ -37,7 +37,7 @@ &spi1 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <108000000>;
+ spi-max-frequency = <10000000>;
};
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts
index 5dc5505b58e2..12d4a4d95783 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts
@@ -49,7 +49,7 @@ &spi1 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <108000000>;
+ spi-max-frequency = <10000000>;
};
};
---
base-commit: 3e016cc87fb9ff7b4174f9338cbd31314428c1a7
change-id: 20261202-rp4-spi-10mhz-7076c8a3269d
Best regards,
--
Igor Velkov <iav@xxxxxx>