The SPI-NOR flash on the LeMans EVK is connected to SPI21 (QUPv3
wrapper 3, SE0) and routed to the SAIL hardware. The flash is used
only by U-Boot during EDL or recovery flows and therefore is not
described in the Linux device tree.

Describe the SPI-NOR flash in lemans-evk-u-boot.dtsi. Keep SPI21
disabled by default so that it does not affect the normal boot flow;
the recovery flow enables the controller when required.

Signed-off-by: Vandhiadevan Karunamoorthy 
<[email protected]>
---
Changes in v2:
- Override only function of qup_spi21_default
- Drop redefined pins, drive-strength and bias-disable
- Link to v1: 
https://lore.kernel.org/u-boot/[email protected]
---
 arch/arm/dts/lemans-evk-u-boot.dtsi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/dts/lemans-evk-u-boot.dtsi 
b/arch/arm/dts/lemans-evk-u-boot.dtsi
index cdd3d32f61a..f17347b1f2b 100644
--- a/arch/arm/dts/lemans-evk-u-boot.dtsi
+++ b/arch/arm/dts/lemans-evk-u-boot.dtsi
@@ -17,3 +17,28 @@
                      <0x0 0xd3500000 0x0 0x2cb00000>;
        };
 };
+
+&qup_spi21_default {
+       function = "sail_top";
+};
+
+&{/aliases} {
+       spi0 = &spi21;
+};
+
+&qupv3_id_3 {
+       bootph-all;
+};
+
+&spi21 {
+       assigned-clocks = <&gcc GCC_QUPV3_WRAP3_S0_CLK>;
+       assigned-clock-rates = <48000000>;
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <48000000>;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <1>;
+       };
+};

---
base-commit: 9703d24aa2e5f2ca0793a47a25807eba53716792
change-id: 20260916-lemans-spi-nor-dts-4a1f7c02e938

Best regards,
--  
Vandhiadevan Karunamoorthy <[email protected]>

Reply via email to