ath79: add support for Netgear WNR1000 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_alfa-network_ap121f.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9331.dtsi"
8
9 / {
10 model = "ALFA Network AP121F";
11 compatible = "alfa-network,ap121f", "qca,ar9331";
12
13 aliases {
14 label-mac-device = &wmac;
15 led-boot = &vpn;
16 led-failsafe = &vpn;
17 led-upgrade = &vpn;
18 serial0 = &uart;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 linux,code = <KEY_RESTART>;
27 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
28 };
29
30 switch {
31 label = "switch";
32 linux,code = <BTN_0>;
33 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 lan {
41 label = "ap121f:green:lan";
42 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
43 };
44
45 vpn: vpn {
46 label = "ap121f:green:vpn";
47 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
48 };
49
50 wlan {
51 label = "ap121f:green:wlan";
52 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
53 linux,default-trigger = "phy0tpt";
54 };
55 };
56 };
57
58 &eth0 {
59 status = "okay";
60 mtd-mac-address = <&art 0x0>;
61
62 gmac-config {
63 device = <&gmac>;
64 switch-phy-addr-swap = <0>;
65 switch-phy-swap = <0>;
66 };
67 };
68
69 &eth1 {
70 status = "okay";
71 compatible = "syscon", "simple-mfd";
72 };
73
74 &gpio {
75 status = "okay";
76 };
77
78 &spi {
79 status = "okay";
80 num-cs = <1>;
81
82 flash@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <25000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x000000 0x030000>;
95 read-only;
96 };
97
98 partition@30000 {
99 label = "u-boot-env";
100 reg = <0x030000 0x010000>;
101 };
102
103 art: partition@40000 {
104 label = "art";
105 reg = <0x040000 0x010000>;
106 read-only;
107 };
108
109 partition@50000 {
110 compatible = "denx,uimage";
111 label = "firmware";
112 reg = <0x050000 0xfb0000>;
113 };
114 };
115 };
116 };
117
118 &uart {
119 status = "okay";
120 };
121
122 &usb {
123 status = "okay";
124 dr_mode = "host";
125 };
126
127 &usb_phy {
128 status = "okay";
129 };
130
131 &wmac {
132 status = "okay";
133 mtd-cal-data = <&art 0x1000>;
134 };