From 9d8fcab77aab6a9133cd6898a68ad512b0b31310 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Thu, 6 Dec 2018 11:53:05 +0100 Subject: ath79: fix GL.iNet GL-AR300M sysupgrade The userspace boardname derived from the dts compatible was out of sync with the expected board added to the image metadata. This way a sysupgrade is refused. Sync the userspace boardname and the baordname used in the image metdata to allow a seamless sasupgrade. Signed-off-by: Mathias Kresin --- .../linux/ath79/dts/qca9531_glinet_ar300m-nand.dts | 68 ++++++++++++++++++++++ .../linux/ath79/dts/qca9531_glinet_ar300m-nor.dts | 50 ++++++++++++++++ target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi | 3 - .../linux/ath79/dts/qca9531_glinet_ar300m_nand.dts | 63 -------------------- .../linux/ath79/dts/qca9531_glinet_ar300m_nor.dts | 45 -------------- 5 files changed, 118 insertions(+), 111 deletions(-) create mode 100644 target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts create mode 100644 target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts delete mode 100644 target/linux/ath79/dts/qca9531_glinet_ar300m_nand.dts delete mode 100644 target/linux/ath79/dts/qca9531_glinet_ar300m_nor.dts (limited to 'target/linux/ath79/dts') diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts new file mode 100644 index 0000000000..82f8418b31 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts @@ -0,0 +1,68 @@ +/dts-v1/; + +#include "qca9531_glinet_ar300m.dtsi" + +/ { + compatible = "glinet,ar300m-nand", "qca,qca9531"; + model = "GL.iNet GL-AR300M (NAND)"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "winbond,w25q128", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@1 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@2 { + label = "reserved"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@3 { + label = "art"; + reg = <0xff0000 0x010000>; + }; + }; + }; + + flash@1 { + compatible = "spinand,mt29f"; + reg = <1>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x000000 0x0200000>; + }; + + partition@1 { + label = "ubi"; + reg = <0x200000 0x7e00000>; + }; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts new file mode 100644 index 0000000000..36903bdb99 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts @@ -0,0 +1,50 @@ +/dts-v1/; + +#include +#include + +#include "qca9531_glinet_ar300m.dtsi" + +/ { + compatible = "glinet,ar300m-nor", "qca,qca9531"; + model = "GL.iNet GL-AR300M (NOR)"; +}; + +&spi { + status = "okay"; + num-cs = <0>; + + flash@0 { + compatible = "winbond,w25q128", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@1 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@2 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@3 { + label = "art"; + reg = <0xff0000 0x010000>; + }; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi index 986177df01..34fcfb32c3 100644 --- a/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi @@ -6,9 +6,6 @@ #include "qca953x.dtsi" / { - compatible = "glinet,ar300m", "qca,qca9531"; - model = "GL.iNet GL-AR300M"; - keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m_nand.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m_nand.dts deleted file mode 100644 index f188ac6c33..0000000000 --- a/target/linux/ath79/dts/qca9531_glinet_ar300m_nand.dts +++ /dev/null @@ -1,63 +0,0 @@ -/dts-v1/; - -#include "qca9531_glinet_ar300m.dtsi" - -&spi { - status = "okay"; - num-cs = <1>; - - flash@0 { - compatible = "winbond,w25q128", "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x040000>; - read-only; - }; - - partition@1 { - label = "u-boot-env"; - reg = <0x040000 0x010000>; - }; - - partition@2 { - label = "reserved"; - reg = <0x050000 0xfa0000>; - }; - - art: partition@3 { - label = "art"; - reg = <0xff0000 0x010000>; - }; - }; - }; - - flash@1 { - compatible = "spinand,mt29f"; - reg = <1>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "kernel"; - reg = <0x000000 0x0200000>; - }; - - partition@1 { - label = "ubi"; - reg = <0x200000 0x7e00000>; - }; - }; - }; -}; diff --git a/target/linux/ath79/dts/qca9531_glinet_ar300m_nor.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m_nor.dts deleted file mode 100644 index 1128e2da38..0000000000 --- a/target/linux/ath79/dts/qca9531_glinet_ar300m_nor.dts +++ /dev/null @@ -1,45 +0,0 @@ -/dts-v1/; - -#include -#include - -#include "qca9531_glinet_ar300m.dtsi" - -&spi { - status = "okay"; - num-cs = <0>; - - flash@0 { - compatible = "winbond,w25q128", "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x040000>; - read-only; - }; - - partition@1 { - label = "u-boot-env"; - reg = <0x040000 0x010000>; - }; - - partition@2 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x050000 0xfa0000>; - }; - - art: partition@3 { - label = "art"; - reg = <0xff0000 0x010000>; - }; - }; - }; -}; -- cgit v1.2.3