ath79: provide label MAC address
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9342_ubnt_xw.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar9344.dtsi"
7
8 / {
9 compatible = "ubnt,xw", "qca,ar9342";
10 model = "Ubiquiti Networks XW board";
11
12 aliases {
13 led-boot = &system;
14 led-running = &system;
15 led-upgrade = &system;
16 led-failsafe = &system;
17 label-mac-device = &wmac;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 link1 {
24 label = "ubnt:red:link1";
25 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26 };
27
28 link2 {
29 label = "ubnt:orange:link2";
30 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
31 };
32
33 link3 {
34 label = "ubnt:green:link3";
35 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
36 };
37
38 system: link4 {
39 label = "ubnt:green:link4";
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "Reset button";
49 linux,code = <KEY_RESTART>;
50 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
51 debounce-interval = <60>;
52 };
53 };
54 };
55
56 &ref {
57 clock-frequency = <40000000>;
58 };
59
60 &uart {
61 status = "okay";
62 };
63
64 &gpio {
65 status = "okay";
66 };
67
68 &spi {
69 status = "okay";
70 num-cs = <1>;
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <25000000>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x000000 0x040000>;
85 read-only;
86 };
87
88 partition@40000 {
89 label = "u-boot-env";
90 reg = <0x040000 0x010000>;
91 read-only;
92 };
93
94 partition@50000 {
95 compatible = "denx,uimage";
96 label = "firmware";
97 reg = <0x050000 0x760000>;
98 };
99
100 partition@fb0000 {
101 label = "cfg";
102 reg = <0x7b0000 0x040000>;
103 read-only;
104 };
105
106 eeprom: partition@ff0000 {
107 label = "EEPROM";
108 reg = <0x7f0000 0x010000>;
109 read-only;
110 };
111 };
112 };
113 };
114
115 &wmac {
116 status = "okay";
117
118 mtd-cal-data = <&eeprom 0x1000>;
119 mtd-mac-address = <&eeprom 0x1002>;
120 };
121
122 &eth0 {
123 mtd-mac-address = <&eeprom 0x0>;
124 };