ramips: fix reboot for remaining 32 MB boards

The following devices have a Winbond W25Q256FV flash chip,
which does not have the RESET pin enabled by default,
and otherwise would require setting a bit in a status register.

Before moving to Linux 5.4, we had the patch:
0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
which kept specific flash chips with explicit 3-byte and 4-byte address modes
to stay in 3-byte address mode while idle (after an erase or write)
by using a custom flag SPI_NOR_4B_READ_OP that was part of the patch.

this was obsoleted by the patch:
481-mtd-spi-nor-rework-broken-flash-reset-support.patch
which uses the newer upstream flag SNOR_F_BROKEN_RESET
for devices with a flash chip that cannot be hardware reset with RESET pin
and therefore must be left in 3-byte address mode when idle.

The new patch requires that the DTS of affected devices
have the property "broken-flash-reset", which was not yet added for most of them.

This commit adds the property for remaining affected devices in ramips target,
specifically because of the flash chip model.

However, it is possible that there are other devices
where the flash chip uses an explicit 4-byte address mode
and the RESET pin is not connected to the SOC on the board,
and those DTS would also need this property.

Ref: 22d982ea00 ("ramips: add support for switching between 3-byte and 4-byte addressing")
Ref: dfa521f129 ("generic: spi-nor: rework broken-flash-reset")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
[pepe2k@gmail.com: backported to 21.02]
Fixes: #9655, #9636, #9547
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
(backported from commit 74516f4357)
This commit is contained in:
Michael Pratt 2021-09-10 22:06:10 -04:00 committed by Piotr Dymacz
parent 39bf2aee0e
commit 169c9e3a88
18 changed files with 30 additions and 4 deletions

View File

@ -8,6 +8,10 @@
model = "Zbtlink ZBT-WE1026-H (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};

View File

@ -30,7 +30,7 @@
&spi0 {
status = "okay";
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;

View File

@ -12,6 +12,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -40,6 +40,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -69,6 +69,7 @@
reg = <0>;
spi-max-frequency = <80000000>;
m25p,fast-read;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -47,6 +47,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -5,6 +5,10 @@
model = "Zbtlink ZBT-WG3526 (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};

View File

@ -49,7 +49,7 @@
&spi0 {
status = "okay";
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;

View File

@ -80,6 +80,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -61,6 +61,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -7,6 +7,10 @@
model = "Jotale JS76x8 (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};

View File

@ -58,7 +58,7 @@
pinctrl-names = "default";
pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;

View File

@ -95,7 +95,7 @@
pinctrl-names = "default";
pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;

View File

@ -5,6 +5,10 @@
model = "Onion Omega2+";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};

View File

@ -15,6 +15,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -97,6 +97,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -28,6 +28,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";

View File

@ -86,6 +86,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";