ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9561_avm_fritz4020.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 "qca956x.dtsi"
8
9 / {
10         compatible = "avm,fritz4020", "qca,qca9560";
11         model = "AVM FRITZ!Box 4020";
12
13         aliases {
14                 led-boot = &power;
15                 led-failsafe = &info_red;
16                 led-running = &power;
17                 led-upgrade = &info_red;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200n8";
22         };
23
24         led_spi {
25                 compatible = "spi-gpio";
26                 #address-cells = <1>;
27                 #size-cells = <0>;
28
29                 sck-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
30                 mosi-gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
31                 num-chipselects = <0>;
32
33                 led_gpio: led_gpio@0 {
34                         compatible = "fairchild,74hc595";
35                         reg = <0>;
36                         gpio-controller;
37                         #gpio-cells = <2>;
38                         registers-number = <1>;
39                         spi-max-frequency = <10000000>;
40
41                         gpio_latch_bit {
42                                 gpio-hog;
43                                 gpios = <7 GPIO_ACTIVE_HIGH>;
44                                 output-high;
45                                 line-name = "gpio-latch-bit";
46                         };
47                 };
48         };
49
50         leds {
51                 compatible = "gpio-leds";
52
53                 power: power {
54                         label = "fritz4020:green:power";
55                         gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
56                         default-state = "on";
57                 };
58
59                 wlan {
60                         label = "fritz4020:green:wlan";
61                         gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
62                         linux,default-trigger = "phy0tpt";
63                 };
64
65                 lan {
66                         label = "fritz4020:green:lan";
67                         gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
68                 };
69
70                 wan {
71                         label = "fritz4020:green:wan";
72                         gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
73                 };
74
75                 info {
76                         label = "fritz4020:green:info";
77                         gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
78                 };
79
80                 info_red: info_red {
81                         label = "fritz4020:red:info";
82                         gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
83                 };
84         };
85
86         keys {
87                 compatible = "gpio-keys-polled";
88                 poll-interval = <100>;
89
90                 wps_button {
91                         label = "WPS button";
92                         linux,code = <KEY_WPS_BUTTON>;
93                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
94                 };
95
96                 wlan_button {
97                         label = "WLAN button";
98                         linux,code = <KEY_RFKILL>;
99                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
100                 };
101         };
102 };
103
104 &uart {
105         status = "okay";
106 };
107
108 &gpio {
109         status = "okay";
110 };
111
112 &spi {
113         status = "okay";
114         num-cs = <1>;
115
116         flash@0 {
117                 compatible = "jedec,spi-nor";
118                 reg = <0>;
119                 spi-max-frequency = <25000000>;
120
121                 partitions {
122                         compatible = "fixed-partitions";
123                         #address-cells = <1>;
124                         #size-cells = <1>;
125
126                         partition@0 {
127                                 label = "urlader";
128                                 reg = <0x000000 0x020000>;
129                                 read-only;
130                         };
131
132                         partition@1 {
133                                 compatible = "avm,eva-firmware";
134                                 label = "firmware";
135                                 reg = <0x020000 0xee0000>;
136                         };
137
138                         partition@2 {
139                                 label = "tffs (1)";
140                                 reg = <0xf00000 0x080000>;
141                                 read-only;
142                         };
143
144                         partition@3 {
145                                 label = "tffs (2)";
146                                 reg = <0xf80000 0x080000>;
147                                 read-only;
148                         };
149                 };
150         };
151 };
152
153 &eth0 {
154         status = "okay";
155
156         phy-mode = "mii";
157         phy-handle = <&swphy0>;
158
159         gmac-config {
160                 device = <&gmac>;
161
162                 switch-phy-addr-swap = <1>;
163                 switch-phy-swap = <1>;
164         };
165 };
166
167 &eth1 {
168         status = "okay";
169 };
170
171 &wmac {
172         status = "okay";
173         qca,no-eeprom;
174 };