Commit Graph

13 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 231dc26867 treewide: remove dts-v1 identifier from DTSI files
The "/dts-v1/;" identifier is supposed to be put once at the beginning
of a device tree file. Thus, it makes no sense to provide it a second
time in to-be-included DTSI files.

This removes the identifier from all DTSI files in /target/linux.

Most of the DTS files in OpenWrt do contain the "/dts-v1/;". It is
missing for most of the following targets, though:
mvebu, ipq806x, mpc85xx, ipq40xx

This does not touch ipq806x for now, as the bump to 4.19 is close.

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 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
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
Adrian Schmutzler 696e6069a4 ath79: Move settings specific for TP-Link TL-WR1043ND v4 to DTS
This prepares for support of v5.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Petr Štetiar 0d23fd2ab2 treewide: dts: Remove default-state=off property from all gpio LED nodes
>From the Documentation/devicetree/bindings/leds/common.txt:

- default-state : The initial state of the LED. Valid values are "on", "off",
  and "keep". If the LED is already on or off and the default-state property is
  set the to same value, then no glitch should be produced where the LED
  momentarily turns off (or on). The "keep" setting will keep the LED at
  whatever its current state is, without producing a glitch.  The default is
  off if this property is not present.

So setting the default-state of the LEDs to `off` is redundant as `off`
is default LED state anyway. We should remove it as almost every new
PR/patch submission contains this property by default which seems to be
just copy&paste from some DTS file already present in the tree.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar bc41fb7efe ath79: Define firmware partition format to all boards where applicable
Parsing "firmware" partition (to create kernel + rootfs) was implemented
using OpenWrt downstream code enabled by CONFIG_MTD_SPLIT_FIRMWARE. With
recent upstream mtd changes we can do it in a more clean way for DTS
targets. It just requires adding a proper "compatible" string to the
"firmware" partition node.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Dmitry Tunin 7a873974f7 ath79: add support for indicating the boot state using multiple leds
Use diag.sh version used for apm821xx, ipq40xx and ipq806x, which
supports different leds for the different boot states.

The existing led sequences should be the same as before.

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
[reword commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 55ff2951ea ath79: fix dts warnings
Fix all issues found by the devicetree compiler like wrong address/size
cells as well as wrong/missing/superfluous unit addresses.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 7b42247182 ath79: fix whitespace issue in dts files
Fixes spaces vs. tabs issues and remove indentation on blank lines.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Chuanhong Guo 8288af1e18 ath79: rename dts/image using manufacturer_board scheme
This helps getting rid of SUPPORTED_DEVICES which can be
auto-generated in image/Makefile.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago