diff options
author | Roger Pueyo Centelles <roger.pueyo@guifi.net> | 2019-07-04 14:08:10 +0200 |
---|---|---|
committer | Piotr Dymacz <pepe2k@gmail.com> | 2019-07-31 08:38:01 +0200 |
commit | 334bbc51987c6694e130af25876f178babf37140 (patch) | |
tree | dfb7ba47ac3e4a296b904d895a923794b6500c26 /target/linux/ath79/dts | |
parent | 12840674d0550e6f5aa077cd2b578988f0c07074 (diff) | |
download | upstream-334bbc51987c6694e130af25876f178babf37140.tar.gz upstream-334bbc51987c6694e130af25876f178babf37140.tar.bz2 upstream-334bbc51987c6694e130af25876f178babf37140.zip |
ath79: add support for ALFA Network AP121F
This commit ports support for the ALFA Network AP121F, a pocket-size
router with 1 Ethernet and 2.4 GHz WiFi based on the AR9331 SoC, to the
ath79 target (it was already supported in ar71xx; see commit 0c6165d2
for more details).
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[pepe2k@gmail.com: fixed GPIO polarity, included USB support, changed
DTS nodes order, moved WLAN LED trigger define to DTS, made U-Boot env
partition writable]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Diffstat (limited to 'target/linux/ath79/dts')
-rw-r--r-- | target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts new file mode 100644 index 0000000000..82e6f74074 --- /dev/null +++ b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dts @@ -0,0 +1,134 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> + +#include "ar9331.dtsi" + +/ { + model = "ALFA Network AP121F"; + compatible = "alfa-network,ap121f", "qca,ar9331"; + + aliases { + label-mac-device = &wmac; + led-boot = &vpn; + led-failsafe = &vpn; + led-upgrade = &vpn; + serial0 = &uart; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = <KEY_RESTART>; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + switch { + label = "switch"; + linux,code = <BTN_0>; + gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + lan { + label = "ap121f:green:lan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + vpn: vpn { + label = "ap121f:green:vpn"; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "ap121f:green:wlan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +ð0 { + status = "okay"; + mtd-mac-address = <&art 0x0>; + + gmac-config { + device = <&gmac>; + switch-phy-addr-swap = <0>; + switch-phy-swap = <0>; + }; +}; + +ð1 { + status = "okay"; + compatible = "syscon", "simple-mfd"; +}; + +&gpio { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x030000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x030000 0x010000>; + }; + + art: partition@40000 { + label = "art"; + reg = <0x040000 0x010000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xfb0000>; + }; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&usb { + status = "okay"; + dr_mode = "host"; +}; + +&usb_phy { + status = "okay"; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; +}; |