ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9331_alfa-network_ap121f.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 label-mac-device = &wmac;
12 led-boot = &led_vpn;
13 led-failsafe = &led_vpn;
14 led-upgrade = &led_vpn;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 linux,code = <KEY_RESTART>;
23 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
24 debounce-interval = <60>;
25 };
26
27 switch {
28 label = "switch";
29 linux,code = <BTN_0>;
30 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
31 debounce-interval = <60>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 lan {
39 function = LED_FUNCTION_LAN;
40 color = <LED_COLOR_ID_GREEN>;
41 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
42 };
43
44 led_vpn: vpn {
45 label = "green:vpn";
46 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
47 };
48
49 wlan {
50 function = LED_FUNCTION_WLAN;
51 color = <LED_COLOR_ID_GREEN>;
52 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
53 linux,default-trigger = "phy0tpt";
54 };
55 };
56 };
57
58 &eth0 {
59 status = "okay";
60
61 nvmem-cells = <&macaddr_art_0>;
62 nvmem-cell-names = "mac-address";
63
64 gmac-config {
65 device = <&gmac>;
66 switch-phy-addr-swap = <0>;
67 switch-phy-swap = <0>;
68 };
69 };
70
71 &eth1 {
72 status = "okay";
73
74 compatible = "syscon", "simple-mfd";
75 };
76
77 &spi {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <50000000>;
84 m25p,fast-read;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "u-boot";
93 reg = <0x000000 0x030000>;
94 read-only;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x030000 0x010000>;
100 };
101
102 partition@40000 {
103 label = "art";
104 reg = <0x040000 0x010000>;
105 read-only;
106
107 nvmem-layout {
108 compatible = "fixed-layout";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 cal_art_1000: cal@1000 {
113 reg = <0x1000 0x440>;
114 };
115
116 macaddr_art_0: macaddr@0 {
117 reg = <0x0 0x6>;
118 };
119
120 macaddr_art_1002: macaddr@1002 {
121 reg = <0x1002 0x6>;
122 };
123 };
124 };
125
126 partition@50000 {
127 compatible = "denx,uimage";
128 label = "firmware";
129 reg = <0x050000 0xfb0000>;
130 };
131 };
132 };
133 };
134
135 &usb {
136 status = "okay";
137 };
138
139 &usb_phy {
140 status = "okay";
141 };
142
143 &wmac {
144 status = "okay";
145
146 nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
147 nvmem-cell-names = "calibration", "mac-address";
148 };