Commit Graph

7 Commits (70233e3afe409b3de9963db0b906bee97c771543)

Author SHA1 Message Date
Christian Lamparter ba68afa204 ath79: convert Netgear WNDR3700 series to gpio-keys
This patch converts the WNDR3700 to use the interrupt-driven
gpio-keys driver over the polled variant.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar a012b3dfa8 ath79: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
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>
6 years ago
Dmitry Tunin ae9c3105a3 ath79: use both WNDR3x00 power leds for boot status indication
Use the orange led by default to match the bootloader/stock firmware
behaviour. Turn on the green power led after boot to indicate a
finished boot and the orange one off.

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
[reword commit message, keep orange power led enabled during early
kernel boot]
Signed-off-by: Mathias Kresin <dev@kresin.me>
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
Hannu Nyman 437e35f8a3 ath79: Add wifi to WNDR3700, WNDR3700v2 and WNDR3800
Add ath9k wifi capabilities to WNDR3700 family.

* use kmod-owl-loader to load firmware from "art"
* add wifi to DTS
* add wifi LEDs

Avoid using the same MAC for eth0 LAN and wlan0 by
toggling the eth0 MAC into a locally administered MAC.
That is currently done by in user-space by adding a
uci config item into /etc/config/network
(More elegant solution might be setting it already in
preinit phase.)

Known issues:

* wifi firmware file may not get created on the first boot
  after flashing on time to bring wifi normally up. Likely
  the overlay jffs2 is not yet ready for creating the
  firmware file. "wifi up" may still bring wifi up.
  Wifi will work normally at subsequent boots.

* phy0 and phy1 may get assigned mixed, so that phy0 may
  be the 5GHz radio instead of the normal 2.4GHz, and vice
  versa for phy1. Does not happen always, but may happen.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[fix the wifi unit address in the dts]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Hannu Nyman b58df9919e ath79: create WNDR3700 series .dtsi and adjust WNDR3800
Prepare for addition of WNDR3700 and WNDR3700v2 by
separating the common parts into wndr3700.dtsi and
leaving just the device-specific things into wndr3800.dts

The three routers are identical except
  * device IDs
  * WNDR3700 (v1) has only 8 MB flash, while others have 16 MB.
    Partition structure needs to be defined for each device.
  * (WNDR3800 has 128 MB RAM, but RAM size is not in DTS)

Also separate the common parts of the image recipe.
(Drop also the initramfs recipe.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years ago