From 73eeac49be566d389df728b5335f7146d03d2f90 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 8 Jul 2024 00:05:14 +0800 Subject: [PATCH] ramips: limit max spi clock frequency to 50 MHz In the past few years, we have received several reports about SPI Flash not working properly. This is caused by excessively fast clock frequency. It's really annoying to fix them one by one. Let's reduce these aggressive frequencies to 50 MHz. This is a safe and suggested value in the vendor SDK. Signed-off-by: Shiji Yang --- target/linux/ramips/dts/mt7620a_bolt_bl100.dts | 2 +- target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts | 2 +- target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts | 2 +- target/linux/ramips/dts/mt7620a_domywifi.dtsi | 2 +- target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi | 2 +- target/linux/ramips/dts/mt7620a_netcore_nw5212.dts | 2 +- target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi | 2 +- target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts | 2 +- target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi | 2 +- target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts | 2 +- target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi | 2 +- target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts | 2 +- target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi | 2 +- target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts | 2 +- target/linux/ramips/dts/mt7621_jcg_y2.dts | 2 +- target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts | 2 +- target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts | 2 +- target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts | 2 +- target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi | 2 +- target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts | 2 +- target/linux/ramips/dts/mt7621_yuncore_ax820.dts | 2 +- target/linux/ramips/dts/mt7621_yuncore_fap640.dts | 2 +- target/linux/ramips/dts/mt7621_yuncore_fap690.dts | 2 +- target/linux/ramips/dts/mt7628an_duzun_dm06.dts | 2 +- target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi | 2 +- target/linux/ramips/dts/mt7628an_motorola_mwr03.dts | 2 +- target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi | 2 +- target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts | 2 +- target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_bolt_bl100.dts b/target/linux/ramips/dts/mt7620a_bolt_bl100.dts index e4bc6e211b4e..cb1f3b8055af 100644 --- a/target/linux/ramips/dts/mt7620a_bolt_bl100.dts +++ b/target/linux/ramips/dts/mt7620a_bolt_bl100.dts @@ -145,7 +145,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts index 7ea288615c79..6ed3063ecba2 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts @@ -101,7 +101,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index 978de470f0a1..645030b5bbdf 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -97,7 +97,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7620a_domywifi.dtsi b/target/linux/ramips/dts/mt7620a_domywifi.dtsi index e2bd8e103bda..844c1a4ee49a 100644 --- a/target/linux/ramips/dts/mt7620a_domywifi.dtsi +++ b/target/linux/ramips/dts/mt7620a_domywifi.dtsi @@ -95,7 +95,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 7fcd68e6ba2e..6a602b841168 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -31,7 +31,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts index 2e112c71791f..439ad2a11807 100644 --- a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts +++ b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts @@ -75,7 +75,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi index 4faa45933fd8..ce53781e6000 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi @@ -52,7 +52,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions: partitions { diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index c5c4d01835b8..b032cd9d4f60 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -55,7 +55,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi b/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi index 8c565385e8f5..cedefe3c5ed9 100644 --- a/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi +++ b/target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi @@ -158,7 +158,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index c0141b196dab..41221891f770 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -83,7 +83,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index 2f9920fc4561..2ddb0d8408cc 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -63,7 +63,7 @@ flash0: flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts index 4a5194c36391..6895052eb92b 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts +++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts @@ -97,7 +97,7 @@ compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <70000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi index 6bfdffefb7c8..24869f3d564b 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi +++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi @@ -68,7 +68,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index 548ab7ba599f..f1c593ea8304 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -65,7 +65,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts index 5012bc3d62f5..555beae04f69 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -41,7 +41,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts index cd0e7465ff2a..8ee88b260997 100644 --- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts @@ -53,7 +53,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <104000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index de352741f8bb..4917ffc81e5c 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -102,7 +102,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts index 234202ba87a8..165b48d20914 100644 --- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts +++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts @@ -92,7 +92,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index 3264a8673c1e..ff2c39d70491 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -44,7 +44,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index 7090869c4e0c..d40f56e1e9c0 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -67,7 +67,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <104000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index 316c1800983a..51421aba6a02 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -87,7 +87,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts index 536b45e03f35..5e18ded9b0db 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts @@ -100,7 +100,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts index 9f7ca430922f..bb25ade1a802 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts @@ -69,7 +69,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts index 59d411f88fb1..1c40c12cafd7 100644 --- a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts +++ b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts @@ -96,7 +96,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <60000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi index 42bb804c6571..4b114c94145a 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi @@ -36,7 +36,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts index 1c57fce196bb..7b288701c931 100644 --- a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts +++ b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts @@ -50,7 +50,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index 41e5fb7e4b72..a8e735396704 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -70,7 +70,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <86000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions: partitions { diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts index 177cd4db8a57..b6a5a61b7ce2 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts @@ -89,7 +89,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <104000000>; + spi-max-frequency = <50000000>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts index 7755b5dfefb8..658a71066a55 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts @@ -56,7 +56,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <60000000>; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; -- 2.30.2