Commit Graph

12 Commits (b123ffdf6ebaa3108524bb50d306d6ae73ff7405)

Author SHA1 Message Date
Adrian Schmutzler b123ffdf6e ath79: drop redundant status for gpio target-wide
All definitions of gpio in SoC DTSI files do not set status, i.e.
have it enabled. This drops all remaining redundant "status = okay"
definitions in descendent files (mostly older ones).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 635f111148 ath79: drop and consolidate redundant chosen/bootargs
In ath79, for several SoCs the console bootargs are defined to the
very same value in every device's DTS. Consolidate these definitions
in the SoC dtsi files and drop further redundant definitions elsewhere.

The only device without any bootargs set has been OpenMesh OM5P-AC V2.
This will now inherit the setting from qca955x.dtsi

Note that while this tidies up master a lot, it might develop into a
frequent pitfall for backports.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler f4026ad24d ath79: DTS file style update and harmonization
This applies several style adjustments that have been requested in
recent reviews to older DTS files. Despite making the code base more
consistent, this will also help to reduce review time when DTSes
are copy/pasted.

Applied changes:
- Rename gpio-keys/gpio-leds to keys/leds
- Remove node labels that are not used
- Use label property for partitions
- Prefix led node labels with "led_"
- Remove redundant includes
- Harmonize new lines after status property
- Several smaller style fixes

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 929becbc2d ath79: fix whitespace issues in DTS files
This is the result of grepping/searching for several common
whitespace issues like double empty lines, leading spaces, etc.

This patch fixes them for the ath79 target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 50fdc0374b ath79: provide label MAC address
This patch adds the label MAC address for several devices in
ath79.

Some devices require setting the MAC address in 02_network:

For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- alfa-network,ap121f
- avm,fritz300e
- ubnt-xm devices

For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- adtran,bsap1800-v2
- adtran,bsap1840
- dlink,dir-842-c1/-c2/-c3
- engenius,ecb1750
- iodata,etg3-r
- iodata,wn-ac1167dgr
- iodata,wn-ac1600dgr
- iodata,wn-ac1600dgr2
- iodata,wn-ag300dgr
- nec,wg800hp
- nec,wg1200cr
- trendnet,tew-823dru

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Christian Lamparter 487c686318 ath79: fix "spi-gpio: convert deprecated binding"
This patch fixes the previous commit that rendered the
devices (mostly leds) useless.

Fixes: 1fa24de8c2 ("ath79: spi-gpio: convert deprecated binding")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter 1fa24de8c2 ath79: spi-gpio: convert deprecated binding
The old gpio-{sck,miso and mosi} binding is
deprecated in favour of {sck,miso and mosi}-gpios.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Adrian Schmutzler 3d153323ab ath79: Consistently label info partition
The info/product-info partition, which frequently contains MAC
adresses, is typically assigned the 'info' alias in DTS, but
then labelled with 'info', 'product-info' or 'config'.

This leads to different aliases if used for setting MAC adresses
in DTS compared to when using e.g. mtd_get_mac_binary. Occationally,
also multiple switch-case entries are used just because of different
labelling.

This patch relabels those partitions in ath79 to consistently use
'info'.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Petr Štetiar 6648e9458f ath79: set mib-poll-interval on mdio0 attached ar83xx switch
Commit "generic: ar8216: add mib_poll_interval switch attribute" sets
mib-poll-interval as disabled by default (was set to 2s), so it makes
switch LEDs trigger disfunctional on devices which don't have
mib-poll-interval set.

So this patch sets mib-poll-interval to 500ms on devices which have
ar83xx switch connected to mdio0 bus, as the same value was set for
built in switches in 443fc9ac35 ("ath79: use ar8216 for builtin
switch").

Some measurements performed on TP-Link Archer C7-v5:

 mib-type=0, mib-poll-interval=500ms (10s pidstat)

  Average:  %usr %system  %guest   %wait    %CPU   CPU  Command
  Average:  0.00    1.93    0.00    0.00    1.93     -  kworker/0:2

  iperf3 (30s): 334 Mbits/sec

 mib-type=0, mib-poll-interval=2s (10s pidstat)

  Average:  %usr %system  %guest   %wait    %CPU   CPU  Command
  Average:  0.00    1.14    0.00    0.00    1.14     -  kworker/0:2

  iperf3 (30s): 334 Mbits/sec

So it seems like we get 4x faster LED refresh rate for additional 0.8%
CPU load.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
David Santamaría Rogado 6c558bae64 ath79: TP-Link Archer C7 v4 swap usb led names
Commit 34b10b46 made usb match with the corresponding usb label.
The problem is that v4 seems to use in stock firmware the
upper led for usb 1 and the lower led for usb 2.

The led assigned varies between TP-Link models and even
same model versions. For example, Archer C7 v1 and v2 have
the leds in the reverse order.

Revert 34b10b46 and swap led labels instead, now usb port
and led label match and also respect the original behavior.

Tested-by: Oldrich Jedlicka <oldium.pro@gmail.com>
Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
5 years ago
David Santamaría Rogado 34b10b468e ath79: TP-Link Archer C7 v4 swap usb port leds
USB 1 triggers usb2 led and USB 2 triggers usb1.
Lower LED is usb1 and upper LED usb2.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
5 years ago
Oldřich Jedlička 12310f05b7 ath79: add support for TP-LINK Archer C7 v4
TP-Link Archer C7 v4 is a dual-band AC1750 router, based on the
Qualcomm/Atheros QCA9561 SoC + QCA9880.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 7x LED, 2x button
- UART header on PCB

Flash instruction:
1. Upload openwrt-ath79-generic-tplink_archer-c7-v4-squashfs-factory.bin
   via Web interface

Flash instruction using TFTP recovery:
1. Set PC to fixed ip address 192.168.0.66
2. Download openwrt-ath79-generic-tplink_archer-c7-v4-squashfs-factory.bin
   and rename it to ArcherC7v4_tp_recovery.bin
3. Start a tftp server with the file tp_recovery.bin in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
   the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
5 years ago