Skip to content
Snippets Groups Projects
Commit 74516f43 authored by Michael Pratt's avatar Michael Pratt Committed by Christian Lamparter
Browse files

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: 22d982ea ("ramips: add support for switching between 3-byte and 4-byte addressing")
Ref: dfa521f1 ("generic: spi-nor: rework broken-flash-reset")
Signed-off-by: default avatarMichael Pratt <mcpratt@pm.me>
parent daae59b7
No related branches found
No related tags found
No related merge requests found
Showing
with 44 additions and 7 deletions
......@@ -7,6 +7,10 @@
model = "Youku YK-L1";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......@@ -56,7 +56,7 @@
&spi0 {
status = "okay";
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
......
......@@ -8,6 +8,10 @@
model = "Zbtlink ZBT-WE1026-H (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......@@ -30,7 +30,7 @@
&spi0 {
status = "okay";
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
......
......@@ -5,6 +5,10 @@
model = "Zbtlink ZBT-WE826 (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......@@ -33,6 +33,10 @@
};
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......
......@@ -52,7 +52,7 @@
&spi0 {
status = "okay";
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
......
......@@ -69,6 +69,7 @@
reg = <0>;
spi-max-frequency = <80000000>;
m25p,fast-read;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";
......
......@@ -47,6 +47,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";
......
......@@ -5,6 +5,10 @@
model = "Zbtlink ZBT-WG3526 (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......@@ -49,7 +49,7 @@
&spi0 {
status = "okay";
flash@0 {
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
......
......@@ -81,6 +81,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";
......
......@@ -61,6 +61,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";
......
......@@ -7,6 +7,10 @@
model = "Jotale JS76x8 (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......@@ -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>;
......
......@@ -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>;
......
......@@ -5,6 +5,10 @@
model = "Onion Omega2+";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......@@ -5,6 +5,10 @@
model = "Widora-NEO (32M)";
};
&flash0 {
broken-flash-reset;
};
&firmware {
reg = <0x50000 0x1fb0000>;
};
......@@ -52,7 +52,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>;
......
......@@ -97,6 +97,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
broken-flash-reset;
partitions {
compatible = "fixed-partitions";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment