[PATCH 3.12 188/235] ARM: dts: da850-evm: fix read access to SPI flash

From: Jiri Slaby
Date: Fri Jan 27 2017 - 06:34:18 EST

From: Fabien Parent <fparent@xxxxxxxxxxxx>

3.12-stable review patch. If anyone has any objections, please let me know.


commit 43849785e1079f6606a31cb7fda92d1200849728 upstream.

Read access to the SPI flash are broken on da850-evm, i.e. the data
read is not what is actually programmed on the flash.
According to the datasheet for the M25P64 part present on the da850-evm,
if the SPI frequency is higher than 20MHz then the READ command is not
usable anymore and only the FAST_READ command can be used to read data.

This commit specifies in the DTS that we should use FAST_READ command
instead of the READ command.

Tested-by: Kevin Hilman <khilman@xxxxxxxxxxxx>
Signed-off-by: Fabien Parent <fparent@xxxxxxxxxxxx>
[nsekhar@xxxxxx: subject line adjustment]
Signed-off-by: Sekhar Nori <nsekhar@xxxxxx>
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>

Signed-off-by: Olof Johansson <olof@xxxxxxxxx>
arch/arm/boot/dts/da850-evm.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 588ce58a2959..bd81f1da17a6 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -59,6 +59,7 @@
#size-cells = <1>;
compatible = "m25p64";
spi-max-frequency = <30000000>;
+ m25p,fast-read;
reg = <0>;
partition@0 {
label = "U-Boot-SPL";