openwrt-redmi-ax3000/target/linux/ath79
Adrian Schmutzler ebc090e420 ath79: reduce spi-max-frequency to 50 MHz
The introduction of ebf0d8dade ("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: ebf0d8dade ("ath79: add new ar934x spi driver")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-02-27 12:14:09 +01:00
..
base-files ath79: move mikrotik-caldata.sh to target base-files 2020-02-17 20:23:59 +01:00
dts ath79: reduce spi-max-frequency to 50 MHz 2020-02-27 12:14:09 +01:00
files ath79: ag71xx: use netif_receive_skb_list on 4.19 2020-02-07 10:58:01 +08:00
generic ath79: add support for Teltonika RUT955 2020-02-21 22:35:12 +01:00
image ath79: add support for MikroTik RouterBOARD 922UAGS-5HPacD 2020-02-26 14:46:46 +01:00
nand ath79: add support for MikroTik RouterBOARD 922UAGS-5HPacD 2020-02-26 14:46:46 +01:00
patches-4.14 kernel: bump 4.14 to 4.14.171 2020-02-24 14:18:59 +01:00
patches-4.19 kernel: bump 4.19 to 4.19.106 2020-02-24 19:11:36 +01:00
tiny ath79: add support for TP-Link TL-WA701ND/730RE/801ND/901ND v1 2020-02-21 13:55:33 +01:00
config-4.14 ath79: enable PCI for whole target 2019-10-27 18:02:55 +01:00
config-4.19 ath79: add new ar934x spi driver 2020-02-06 22:53:03 +08:00
Makefile treewide: kernel: bump some targets to 4.19 2019-06-18 16:08:55 +02:00
modules.mk