From 9b1102416fff7257626fa0bcdfe2fead9f0b2aeb Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Sun, 13 Jan 2019 21:30:25 +0100 Subject: [PATCH] mvebu: espressobin: correct spi node in dts Drop customizations in: 508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch and move them to separate patch, with broader explanation. Signed-off-by: Tomasz Maciej Nowak --- ...a-3720-espressobin-wire-up-spi-flash.patch | 27 ++++++--- ...da-3720-espressobin-correct-spi-node.patch | 58 +++++++++++++++++++ 2 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch diff --git a/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch b/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch index fb80db7e89..840897473f 100644 --- a/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch +++ b/target/linux/mvebu/patches-4.14/508-arm64-dts-armada-3720-espressobin-wire-up-spi-flash.patch @@ -14,16 +14,13 @@ Tested-by: Gregory CLEMENT Signed-off-by: Ellie Reeves Signed-off-by: Uwe Kleine-König Signed-off-by: Gregory CLEMENT - -[drop partitions, not every U-Boot has same layout] -Signed-off-by: Tomasz Maciej Nowak --- - .../dts/marvell/armada-3720-espressobin.dts | 13 +++++++++++++ - 1 file changed, 13 insertions(+) + .../dts/marvell/armada-3720-espressobin.dts | 27 +++++++++++++++++++ + 1 file changed, 27 insertions(+) --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -96,6 +96,19 @@ +@@ -96,6 +96,33 @@ status = "okay"; }; @@ -31,12 +28,26 @@ Signed-off-by: Tomasz Maciej Nowak + status = "okay"; + + flash@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; + reg = <0>; + compatible = "winbond,w25q32dw", "jedec,spi-flash"; + spi-max-frequency = <104000000>; + m25p,fast-read; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "uboot"; ++ reg = <0 0x180000>; ++ }; ++ ++ partition@180000 { ++ label = "ubootenv"; ++ reg = <0x180000 0x10000>; ++ }; ++ }; + }; +}; + diff --git a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch new file mode 100644 index 0000000000..1d2bdfca75 --- /dev/null +++ b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch @@ -0,0 +1,58 @@ +From 3217cdfe8a3eae76fafbebbe407be5985a7fd4c2 Mon Sep 17 00:00:00 2001 +From: Tomasz Maciej Nowak +Date: Mon, 31 Dec 2018 14:18:50 +0100 +Subject: [PATCH] arm64: dts: armada-3720-espressobin: correct spi node + +The manufacturer of this board, ships it with various SPI NOR chips and +increments U-Boot bootloader version along the time. There is no way to +tell which is placed on the board since no revision bump takes place. +This creates two issues. + +The first, cosmetic. Since the SPI chip may differ, there's message on +boot stating that kernel expected w25q32dw and found different one. To +correct this, remove optional device-specific compatible string. Being +here lets replace bogus "spi-flash" string with proper one. + +The second is linked to partitions layout, it changed after commit [1] +in Marvells downstream U-Boot fork, shifting environment location to the +end of boot device. Since the new boards can have U-Boot with this +change it can lead to improper results writing or reading from these +partitions. We can't tell if users will update bootloader to recent +version, so let's drop current layout. + +1. https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/commit/81e7251252aefe1a6b829ed05f3586320cb45372 + +Signed-off-by: Tomasz Maciej Nowak +--- + .../dts/marvell/armada-3720-espressobin.dts | 18 +----------------- + 1 file changed, 1 insertion(+), 17 deletions(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -101,25 +101,9 @@ + + flash@0 { + reg = <0>; +- compatible = "winbond,w25q32dw", "jedec,spi-flash"; ++ compatible = "jedec,spi-nor"; + spi-max-frequency = <104000000>; + m25p,fast-read; +- +- partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- label = "uboot"; +- reg = <0 0x180000>; +- }; +- +- partition@180000 { +- label = "ubootenv"; +- reg = <0x180000 0x10000>; +- }; +- }; + }; + }; +