Skip to contentSkip to conversation

ARM: dts: stm32: Reduce DHCOR SPI NOR frequency to 50 MHz

PATCH In review Marek Vasut 2 participants 3 messages Aug 9, 2021 – Aug 16, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: stm32: Reduce DHCOR SPI NOR frequency to 50 MHz

The SPI NOR is a bit further away from the SoC on DHCOR than on DHCOM, which causes additional signal delay. At 108 MHz, this delay triggers a sporadic issue where the first bit of RX data is not received by the QSPI controller.

There are two options of addressing this problem, either by using the DLYB block to compensate the extra delay, or by reducing the QSPI bus clock frequency. The former requires calibration and that is overly complex for SPL, so opt for the second option. This incurs 20ms delay during boot, when SPL loads U-Boot to DRAM.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi +1 -1
index 64299df8166..94cf80dbede 100644
@@ -198,7 +198,7 @@
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		spi-rx-bus-width = <4>;
-		spi-max-frequency = <108000000>;
+		spi-max-frequency = <50000000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
 	};
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Marek

Quoted 24 lines · Marek Vasut

The SPI NOR is a bit further away from the SoC on DHCOR than on DHCOM, which causes additional signal delay. At 108 MHz, this delay triggers a sporadic issue where the first bit of RX data is not received by the QSPI controller.

There are two options of addressing this problem, either by using the DLYB block to compensate the extra delay, or by reducing the QSPI bus clock frequency. The former requires calibration and that is overly complex for SPL, so opt for the second option. This incurs 20ms delay during boot, when SPL loads U-Boot to DRAM.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi +0 -0
index 64299df8166..94cf80dbede 100644

arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi line 204

Quoted 8 lines
arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi +1 -1
@@ -198,7 +198,7 @@
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		spi-rx-bus-width = <4>;
-		spi-max-frequency = <108000000>;
+		spi-max-frequency = <50000000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
 	};

Thanks
Patrice

#2 lore raw

Hi Marek

Quoted 37 lines · Patrice CHOTARD

Hi Marek

Quoted 24 lines · Marek Vasut

The SPI NOR is a bit further away from the SoC on DHCOR than on DHCOM, which causes additional signal delay. At 108 MHz, this delay triggers a sporadic issue where the first bit of RX data is not received by the QSPI controller.

There are two options of addressing this problem, either by using the DLYB block to compensate the extra delay, or by reducing the QSPI bus clock frequency. The former requires calibration and that is overly complex for SPL, so opt for the second option. This incurs 20ms delay during boot, when SPL loads U-Boot to DRAM.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi +0 -0
index 64299df8166..94cf80dbede 100644

arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi line 204

Quoted 8 lines
arch/arm/dts/stm32mp15xx-dhcor-io3v3.dtsi +1 -1
@@ -198,7 +198,7 @@
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		spi-rx-bus-width = <4>;
-		spi-max-frequency = <108000000>;
+		spi-max-frequency = <50000000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
 	};
Quoted 3 lines

Thanks
Patrice

Applied to u-boot-stm/master

Thanks
Patrice