ath79: provide label MAC address
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7242_tplink_tl-wr2543-v1.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 "ar7242.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr2543-v1", "qca,ar7242";
11 model = "TP-Link TL-WR2543N/ND";
12
13 aliases {
14 led-boot = &system;
15 led-failsafe = &system;
16 led-running = &system;
17 led-upgrade = &system;
18 label-mac-device = &eth0;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200n8";
23 };
24
25 extosc: ref {
26 compatible = "fixed-clock";
27 #clock-cells = <0>;
28 clock-frequency = <40000000>;
29 };
30
31 keys {
32 compatible = "gpio-keys-polled";
33 poll-interval = <20>;
34
35 reset {
36 label = "reset";
37 linux,code = <KEY_RESTART>;
38 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39 debounce-interval = <60>;
40 };
41
42 wps {
43 label = "wps";
44 linux,code = <KEY_WPS_BUTTON>;
45 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
46 debounce-interval = <60>;
47 };
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 system: wps {
54 label = "tplink:green:wps";
55 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
56 };
57
58 usb {
59 label = "tplink:green:usb";
60 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
61 trigger-sources = <&hub_port>;
62 linux,default-trigger = "usbport";
63 };
64 };
65
66 ath9k-leds {
67 compatible = "gpio-leds";
68
69 wlan2g {
70 label = "tplink:green:wlan2g";
71 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
72 linux,default-trigger = "phy0tpt";
73 };
74
75 wlan5g {
76 label = "tplink:green:wlan5g";
77 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
78 linux,default-trigger = "phy0tpt";
79 };
80 };
81
82 rtl8367 {
83 compatible = "realtek,rtl8367";
84 gpio-sda = <&gpio 1 GPIO_ACTIVE_HIGH>;
85 gpio-sck = <&gpio 6 GPIO_ACTIVE_HIGH>;
86 realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
87
88 mdio-bus {
89 #address-cells = <1>;
90 #size-cells = <0>;
91 status = "okay";
92
93 phy0: ethernet-phy@0 {
94 reg = <0>;
95 };
96 };
97 };
98 };
99
100 &pll {
101 clocks = <&extosc>;
102 };
103
104 &spi {
105 status = "okay";
106 num-cs = <1>;
107
108 flash@0 {
109 compatible = "jedec,spi-nor";
110 reg = <0>;
111 spi-max-frequency = <25000000>;
112
113 partitions {
114 compatible = "fixed-partitions";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 uboot: partition@0 {
119 label = "u-boot";
120 reg = <0x000000 0x020000>;
121 read-only;
122 };
123
124 partition@20000 {
125 compatible = "tplink,firmware";
126 label = "firmware";
127 reg = <0x020000 0x7d0000>;
128 };
129
130 partition@7f0000 {
131 label = "art";
132 reg = <0x7f0000 0x010000>;
133 read-only;
134 };
135 };
136 };
137 };
138
139 &uart {
140 status = "okay";
141 };
142
143 &usb {
144 #address-cells = <1>;
145 #size-cells = <0>;
146 status = "okay";
147
148 hub_port: port@1 {
149 reg = <1>;
150 #trigger-source-cells = <0>;
151 };
152 };
153
154 &usb_phy {
155 status = "okay";
156 };
157
158 &pcie {
159 status = "okay";
160
161 ath9k: wifi@0,0 {
162 reg = <0x0000 0 0 0 0>;
163 #gpio-cells = <2>;
164 gpio-controller;
165 qca,no-eeprom;
166 mtd-mac-address = <&uboot 0x1fc00>;
167 };
168 };
169
170 &eth0 {
171 status = "okay";
172
173 phy-mode = "rgmii";
174 mtd-mac-address = <&uboot 0x1fc00>;
175
176 phy-handle = <&phy0>;
177 fixed-link {
178 speed = <1000>;
179 full-duplex;
180 };
181 };