ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9331_tplink_tl-wr741nd-v4.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 "ar9331.dtsi"
8
9 / {
10         compatible = "tplink,tl-wr741n-v4", "qca,ar9331";
11         model = "TP-Link TL-WR741N/ND v4";
12
13         aliases {
14                 serial0 = &uart;
15                 led-boot = &system;
16                 led-failsafe = &system;
17                 led-running = &system;
18                 led-upgrade = &system;
19                 label-mac-device = &wmac;
20         };
21
22         keys {
23                 compatible = "gpio-keys-polled";
24                 poll-interval = <20>;
25
26                 reset {
27                         label = "reset";
28                         linux,code = <KEY_RESTART>;
29                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
30                         debounce-interval = <60>;
31                 };
32
33                 wps {
34                         label = "wps";
35                         linux,code = <KEY_WPS_BUTTON>;
36                         gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
37                         debounce-interval = <60>;
38                 };
39         };
40
41         leds {
42                 compatible = "gpio-leds";
43                 pinctrl-names = "default";
44                 pinctrl-0 = <&switch_led_disable_pins>;
45
46                 lan1 {
47                         label = "tp-link:green:lan1";
48                         gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
49                 };
50
51                 lan2 {
52                         label = "tp-link:green:lan2";
53                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
54                 };
55
56                 lan3 {
57                         label = "tp-link:green:lan3";
58                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
59                 };
60
61                 lan4 {
62                         label = "tp-link:green:lan4";
63                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
64                 };
65
66                 qss {
67                         label = "tp-link:green:qss";
68                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
69                 };
70
71                 system: system {
72                         label = "tp-link:green:system";
73                         gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
74                 };
75
76                 wan {
77                         label = "tp-link:green:wan";
78                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
79                 };
80
81                 wlan {
82                         label = "tp-link:green:wlan";
83                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
84                         linux,default-trigger = "phy0tpt";
85                 };
86         };
87 };
88
89 &spi {
90         status = "okay";
91         num-cs = <1>;
92
93         flash@0 {
94                 compatible = "jedec,spi-nor";
95                 reg = <0>;
96                 spi-max-frequency = <25000000>;
97
98                 partitions {
99                         compatible = "fixed-partitions";
100                         #address-cells = <1>;
101                         #size-cells = <1>;
102
103                         uboot: partition@0 {
104                                 reg = <0x0 0x20000>;
105                                 label = "u-boot";
106                                 read-only;
107                         };
108
109                         firmware: partition@20000 {
110                                 compatible = "tplink,firmware";
111                                 reg = <0x20000 0x3d0000>;
112                                 label = "firmware";
113                         };
114
115                         art: partition@3f0000 {
116                                 reg = <0x3f0000 0x10000>;
117                                 label = "art";
118                                 read-only;
119                         };
120                 };
121         };
122 };
123
124 &eth0 {
125         status = "okay";
126
127         mtd-mac-address = <&uboot 0x1fc00>;
128         mtd-mac-address-increment = <1>;
129
130         gmac-config {
131                 device = <&gmac>;
132
133                 switch-phy-addr-swap = <1>;
134                 switch-phy-swap = <1>;
135         };
136 };
137
138 &eth1 {
139         status = "okay";
140
141         mtd-mac-address = <&uboot 0x1fc00>;
142         mtd-mac-address-increment = <(-1)>;
143 };
144
145 &gpio {
146         status = "okay";
147 };
148
149 &uart {
150         status = "okay";
151 };
152
153 &wmac {
154         status = "okay";
155         mtd-cal-data = <&art 0x1000>;
156         mtd-mac-address = <&uboot 0x1fc00>;
157 };