aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-27 11:55:36 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-27 12:14:09 +0100
commitebc090e420d1fc3ed30fc9f0331ee95422c2bace (patch)
tree48fd8b997020c7ecb15f8e00937a5c6087adac1e /target/linux/ath79
parent9de6bc872af50c80f0ba449422f413cfa613f7e5 (diff)
downloadupstream-ebc090e420d1fc3ed30fc9f0331ee95422c2bace.tar.gz
upstream-ebc090e420d1fc3ed30fc9f0331ee95422c2bace.tar.bz2
upstream-ebc090e420d1fc3ed30fc9f0331ee95422c2bace.zip
ath79: reduce spi-max-frequency to 50 MHz
The introduction of ebf0d8dadeca ("ath79: add new ar934x spi driver") made the SPI memory unusable on devices with very high spi-max-frequency (104 MHz). Here's how the actual clock is calculated: (AHB_CLK/((CLOCK_DIVIDER+1)*2)) where AHB_CLK is a fixed clock (e.g. 200MHz on AR9331) and CLOCK_DIVIDER is the parameter we can set. Highest clock according to this formula is AHB_CLK/2 (100MHz, but that didn't work in device tests). The next possible value is AHB_CLK/4 (50MHz). Speeds between 50 MHz and 100 MHz will be rounded down, so using values higher than 50 MHz does not provide any benefit. Consequently, this patch reduces spi-max-frequency for all devices with values higher than 50 MHz to 50 MHz (effectively, this only affects devices with 104 MHz before this patch). Tested on GL.inet GL-AR150: Boot fails with 104 MHz but is successful with both 50 MHz and 80 MHz (fast-read), where the latter two yield identical read speeds. Fixes: ebf0d8dadeca ("ath79: add new ar934x spi driver") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ath79')
-rw-r--r--target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts2
-rw-r--r--target/linux/ath79/dts/ar9330_pqi_air-pen.dts2
-rw-r--r--target/linux/ath79/dts/ar9331_8dev_carambola2.dts2
-rw-r--r--target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts2
-rw-r--r--target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts2
-rw-r--r--target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts2
6 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
index 70754c905e..68e1995c76 100644
--- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
+++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
@@ -86,7 +86,7 @@
flash@0 {
compatible = "jedec,spi-nor";
- spi-max-frequency = <104000000>;
+ spi-max-frequency = <50000000>;
reg = <0>;
partitions {
diff --git a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts
index 92484f9331..8537faa0f9 100644
--- a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts
+++ b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts
@@ -75,7 +75,7 @@
flash@0 {
compatible = "jedec,spi-nor";
- spi-max-frequency = <104000000>;
+ spi-max-frequency = <50000000>;
reg = <0>;
partitions {
diff --git a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
index cc0320d652..ef244f0b55 100644
--- a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
+++ b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
@@ -73,7 +73,7 @@
flash@0 {
compatible = "jedec,spi-nor";
- spi-max-frequency = <104000000>;
+ spi-max-frequency = <50000000>;
reg = <0>;
partitions {
diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
index 3489a972d4..4761b91093 100644
--- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
+++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
@@ -68,7 +68,7 @@
flash@0 {
compatible = "jedec,spi-nor";
- spi-max-frequency = <104000000>;
+ spi-max-frequency = <50000000>;
reg = <0>;
partitions {
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
index 3cd5c130c8..97a058edf6 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
@@ -120,7 +120,7 @@
/* Spansion S25FL032PIF SPI flash */
flash@0 {
compatible = "jedec,spi-nor";
- spi-max-frequency = <104000000>;
+ spi-max-frequency = <50000000>;
reg = <0>;
partitions {
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
index e8a3dfbce7..5918e611dd 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
@@ -114,7 +114,7 @@
flash@0 {
compatible = "jedec,spi-nor";
- spi-max-frequency = <104000000>;
+ spi-max-frequency = <50000000>;
reg = <0>;
partitions {