ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7161_netgear_wndr3700.dtsi
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 "ar7100.dtsi"
8
9 / {
10         aliases {
11                 led-boot = &power_orange;
12                 led-failsafe = &power_orange;
13                 led-running = &power_green;
14                 led-upgrade = &power_orange;
15                 label-mac-device = &eth0;
16         };
17
18         chosen {
19                 bootargs = "console=ttyS0,115200";
20         };
21
22         extosc: ref {
23                 compatible = "fixed-clock";
24                 #clock-cells = <0>;
25                 clock-output-names = "ref";
26                 clock-frequency = <40000000>;
27         };
28
29         reset-leds {
30                 compatible = "reset-leds";
31
32                 usb_led {
33                         label = "netgear:green:usb";
34                         resets = <&rst 12>;
35                         trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
36                         linux,default-trigger = "usbport";
37                 };
38         };
39
40         gpio-leds {
41                 compatible = "gpio-leds";
42
43                 wps {
44                         label = "netgear:orange:wps";
45                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
46                 };
47
48                 power_green: power_green {
49                         label = "netgear:green:power";
50                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
51                 };
52
53                 power_orange: power_orange {
54                         label = "netgear:orange:power";
55                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
56                         default-state = "on";
57                 };
58
59                 wps_green {
60                         label = "netgear:green:wps";
61                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
62                 };
63
64                 wan_green {
65                         label = "netgear:green:wan";
66                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
67                 };
68         };
69
70         ath9k-leds {
71                 compatible = "gpio-leds";
72                 wlan2g {
73                         label = "netgear:green:wlan2g";
74                         gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
75                         linux,default-trigger = "phy0tpt";
76                 };
77                 wlan5g {
78                         label = "netgear:blue:wlan5g";
79                         gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
80                         linux,default-trigger = "phy1tpt";
81                 };
82         };
83
84         keys {
85                 compatible = "gpio-keys";
86
87                 wps {
88                         label = "wps";
89                         linux,code = <KEY_WPS_BUTTON>;
90                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
91                 };
92
93                 reset {
94                         label = "reset";
95                         linux,code = <KEY_RESTART>;
96                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
97                 };
98
99                 rfkill {
100                         label = "rfkill";
101                         linux,code = <KEY_RFKILL>;
102                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
103                 };
104         };
105
106         rtl8366s {
107                 compatible = "realtek,rtl8366s";
108                 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
109                 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
110
111                 mdio-bus {
112                         #address-cells = <1>;
113                         #size-cells = <0>;
114                         status = "okay";
115
116                         phy-mask = <0x10>;
117
118                         phy4: ethernet-phy@4 {
119                                 reg = <4>;
120                                 phy-mode = "rgmii";
121                         };
122                 };
123         };
124 };
125
126 &usb_phy {
127         status = "okay";
128 };
129
130 &usb1 {
131         #address-cells = <1>;
132         #size-cells = <0>;
133         status = "okay";
134
135         usb_ochi_port: port@1 {
136                 reg = <1>;
137                 #trigger-source-cells = <0>;
138         };
139 };
140
141 &usb2 {
142         #address-cells = <1>;
143         #size-cells = <0>;
144         status = "okay";
145
146         usb_echi_port: port@1 {
147                 reg = <1>;
148                 #trigger-source-cells = <0>;
149         };
150 };
151
152 &pcie0 {
153         status = "okay";
154
155         ath9k0: wifi@0,11 {
156                 compatible = "pci168c,0029";
157                 reg = <0x8800 0 0 0 0x10000>;
158                 mtd-mac-address = <&art 0x0>;
159                 qca,no-eeprom;
160                 #gpio-cells = <2>;
161                 gpio-controller;
162         };
163
164         ath9k1: wifi@0,12 {
165                 compatible = "pci168c,0029";
166                 reg = <0x9000 0 0 0 0x10000>;
167                 mtd-mac-address = <&art 0xc>;
168                 qca,no-eeprom;
169                 #gpio-cells = <2>;
170                 gpio-controller;
171         };
172 };
173
174 &uart {
175         status = "okay";
176 };
177
178 &spi {
179         status = "okay";
180         num-cs = <1>;
181
182         flash@0 {
183                 compatible = "jedec,spi-nor";
184                 reg = <0>;
185                 spi-max-frequency = <25000000>;
186
187                 partitions: partitions {
188                         compatible = "fixed-partitions";
189                         #address-cells = <1>;
190                         #size-cells = <1>;
191                 };
192         };
193 };
194
195 &eth0 {
196         status = "okay";
197
198         pll-data = <0x11110000 0x00001099 0x00991099>;
199
200         mtd-mac-address = <&art 0x00>;
201
202         fixed-link {
203                 speed = <1000>;
204                 full-duplex;
205         };
206 };
207
208 &eth1 {
209         status = "okay";
210
211         pll-data = <0x11110000 0x00001099 0x00991099>;
212
213         mtd-mac-address = <&art 0x06>;
214
215         phy-handle = <&phy4>;
216 };