OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity High
  • Priority Very Low
  • Reported Version openwrt-21.02
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Jarkko Santala - 06.09.2021

FS#4010 - Onion Omega2P+ reboot broken 19.07.8->21.02.0

This problem had gone away for most Omega2 devices in 19.07, but now its back.

See older ticket, it’s probably the same thing again: https://bugs.openwrt.org/index.php?do=details&task_id=2445

Rico Wang commented on 08.09.2021 09:09

From 19.07.8→21.02.0, mtd driver has been replaced with spi-nor, the new driver has introduced a new optional property: broken-flash-reset. If this new property is not set, the driver would not revert it back to 3 bytes mode during reset.

mtd/spi-nor/spi-nor.c: in spi_nor_scan:

    if (of_property_read_bool(np, "broken-flash-reset"))
        nor->flags |= SNOR_F_BROKEN_RESET;

mtd/spi-nor/spi-nor.c:

void spi_nor_restore(struct spi_nor *nor)
{
    /* restore the addressing mode */
    if (nor->addr_width == 4 && !(nor->flags & SNOR_F_4B_OPCODES) &&
        nor->flags & SNOR_F_BROKEN_RESET)
        nor->params.set_4byte(nor, false);
}

https://www.kernel.org/doc/Documentation/devicetree/bindings/mtd/jedec%2Cspi-nor.txt

Jarkko Santala commented on 02.12.2021 09:48

Any idea on how to enable this on our own builds?

Jarkko Santala commented on 18.12.2021 15:16

This seemed to do the trick - any change of getting this patch in:

diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
index b6d2df4756..cd41be0d4a 100644
--- a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
+++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
@@ -99,6 +99,7 @@
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <40000000>;
+               broken-flash-reset;
 
                partitions {
                        compatible = "fixed-partitions";

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing