ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_rex5x.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 "qca9557.dtsi"
8
9 / {
10         chosen {
11                 bootargs = "console=ttyS0,115200n8";
12         };
13
14         aliases {
15                 led-boot = &led_power;
16                 led-failsafe = &led_power;
17                 led-running = &led_power;
18                 led-upgrade = &led_power;
19                 mdio-gpio0 = &mdio2;
20                 label-mac-device = &eth0;
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_power: power {
27                         label = "tp-link:blue:power";
28                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29                 };
30
31                 wlan2g {
32                         label = "tp-link:blue:wlan2g";
33                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
34                         linux,default-trigger = "phy1tpt";
35                 };
36
37                 wlan5g {
38                         label = "tp-link:blue:wlan5g";
39                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
40                         linux,default-trigger = "phy0tpt";
41                 };
42
43                 lan_link {
44                         label = "tp-link:green:lan_link";
45                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
46                 };
47
48                 lan_data {
49                         label = "tp-link:green:lan_data";
50                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wps_blue {
54                         label = "tp-link:blue:wps";
55                         gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
56                 };
57
58                 wps_red {
59                         label = "tp-link:red:wps";
60                         gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
61                 };
62         };
63
64         keys {
65                 compatible = "gpio-keys";
66
67                 reset {
68                         label = "Reset button";
69                         linux,code = <KEY_RESTART>;
70                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
71                         debounce-interval = <60>;
72                 };
73
74                 leds {
75                         label = "LED control button";
76                         linux,code = <BTN_0>;
77                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
78                         debounce-interval = <60>;
79                 };
80
81                 wps {
82                         label = "WPS button";
83                         linux,code = <KEY_WPS_BUTTON>;
84                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
85                         debounce-interval = <60>;
86                 };
87         };
88
89         mdio2: mdio {
90                 compatible = "virtual,mdio-gpio";
91
92                 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>, /* MDC */
93                         <&gpio 1 GPIO_ACTIVE_HIGH>; /* MDIO */
94                 #address-cells = <1>;
95                 #size-cells = <0>;
96
97                 phy0: ethernet-phy@4 {
98                         reg = <4>;
99                         reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
100                 };
101         };
102 };
103
104 &pcie0 {
105         status = "okay";
106 };
107
108 &uart {
109         status = "okay";
110 };
111
112 &gpio {
113         status = "okay";
114 };
115
116 &spi {
117         status = "okay";
118         num-cs = <1>;
119
120         flash@0 {
121                 compatible = "jedec,spi-nor";
122                 reg = <0>;
123                 spi-max-frequency = <25000000>;
124
125                 partitions {
126                         compatible = "fixed-partitions";
127                         #address-cells = <1>;
128                         #size-cells = <1>;
129
130                         partition@0 {
131                                 label = "u-boot";
132                                 reg = <0x000000 0x020000>;
133                                 read-only;
134                         };
135
136                         partition@20000 {
137                                 compatible = "tplink,firmware";
138                                 label = "firmware";
139                                 reg = <0x020000 0x5e0000>;
140                         };
141
142                         partition@600000 {
143                                 label = "partition-table";
144                                 reg = <0x600000 0x010000>;
145                                 read-only;
146                         };
147
148                         info: partition@610000 {
149                                 label = "info";
150                                 reg = <0x610000 0x020000>;
151                                 read-only;
152                         };
153
154                         partition@630000 {
155                                 label = "config";
156                                 reg = <0x630000 0x1c0000>;
157                                 read-only;
158                         };
159
160                         art: partition@7f0000 {
161                                 label = "art";
162                                 reg = <0x7f0000 0x010000>;
163                                 read-only;
164                         };
165                 };
166         };
167 };
168
169 &eth0 {
170         status = "okay";
171         mtd-mac-address = <&info 0x8>;
172         pll-data = <0xa6000000 0x00000101 0x00001616>;
173         phy-handle = <&phy0>;
174 };
175
176 &wmac {
177         status = "okay";
178         mtd-cal-data = <&art 0x1000>;
179         mtd-mac-address = <&info 0x8>;
180         mtd-mac-address-increment = <(-1)>;
181 };