ramips: fix reboot for remaining 32 MB boards
authorMichael Pratt <mcpratt@pm.me>
Sat, 11 Sep 2021 02:06:10 +0000 (22:06 -0400)
committerPiotr Dymacz <pepe2k@gmail.com>
Fri, 8 Apr 2022 08:31:32 +0000 (10:31 +0200)
commit169c9e3a88b7d4521a797864540657ef33554663
treefaf48688a6a13e1f586ece60ad0aae461d811b85
parent39bf2aee0ed840ff6bb4838bc0a42aaddc36a4d3
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: 22d982ea0033 ("ramips: add support for switching between 3-byte and 4-byte addressing")
Ref: dfa521f12953 ("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 74516f4357d281f093f0daac01c4c5c239acc443)
18 files changed:
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-32m.dts
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826-e.dts
target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526-32m.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
target/linux/ramips/dts/mt7628an_jotale_js76x8-32m.dts
target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
target/linux/ramips/dts/mt7628an_onion_omega2p.dts
target/linux/ramips/dts/mt7628an_widora_neo-32m.dts
target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts