ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-c2-v3.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 "qca956x.dtsi"
8
9 / {
10         compatible = "tplink,archer-c2-v3", "qca,qca9563";
11         model = "TP-Link Archer C2 v3";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &system;
19                 led-failsafe = &system;
20                 led-running = &system;
21                 led-upgrade = &system;
22         };
23
24         gpio_leds: leds {
25                 compatible = "gpio-leds";
26
27                 system: system {
28                         label = "tp-link:green:system";
29                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
30                         default-state = "on";
31                 };
32
33                 wifi2g {
34                         label = "tp-link:green:wifi2g";
35                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
36                         linux,default-trigger = "phy1tpt";
37                 };
38
39                 wifi5g {
40                         label = "tp-link:green:wifi5g";
41                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
42                         linux,default-trigger = "phy0tpt";
43                 };
44
45                 wifi_wps {
46                         label = "tp-link:green:wps";
47                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
48                 };
49
50                 wan {
51                         label = "tp-link:green:wan";
52                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
53                 };
54
55                 wan_fail {
56                         label = "tp-link:orange:wan";
57                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
58                 };
59
60                 lan1 {
61                         label = "tp-link:green:lan1";
62                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
63                 };
64
65                 lan2 {
66                         label = "tp-link:green:lan2";
67                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
68                 };
69
70                 lan3 {
71                         label = "tp-link:green:lan3";
72                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
73                 };
74
75                 lan4 {
76                         label = "tp-link:green:lan4";
77                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
78                 };
79         };
80
81         keys {
82                 compatible = "gpio-keys";
83
84                 reset {
85                         label = "Reset button";
86                         linux,code = <KEY_RESTART>;
87                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
88                         debounce-interval = <60>;
89                 };
90
91                 wps {
92                         label = "WPS button";
93                         linux,code = <KEY_WPS_BUTTON>;
94                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
95                         debounce-interval = <60>;
96                 };
97         };
98 };
99
100 &uart {
101         status = "okay";
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                         partition@0 {
119                                 label = "factory-uboot";
120                                 reg = <0x000000 0x020000>;
121                                 read-only;
122                         };
123
124                         partition@20000 {
125                                 label = "uboot";
126                                 reg = <0x020000 0x10000>;
127                                 read-only;
128                         };
129
130                         partition@30000 {
131                                 label = "firmware";
132                                 reg = <0x030000 0x7A0000>;
133                                 compatible = "denx,uimage";
134                         };
135
136                         info: partition@7e0000 {
137                                 label = "info";
138                                 reg = <0x7e0000 0x010000>;
139                                 read-only;
140                         };
141
142                         art: partition@7f0000 {
143                                 label = "art";
144                                 reg = <0x7f0000 0x010000>;
145                                 read-only;
146                         };
147                 };
148         };
149 };
150
151 &gpio {
152         status = "okay";
153 };
154
155 &mdio0 {
156         status = "okay";
157
158         phy-mask = <0>;
159         phy0: ethernet-phy@0 {
160                 reg = <0>;
161                 phy-mode = "sgmii";
162                 qca,mib-poll-interval = <500>;
163
164                 qca,ar8327-initvals = <
165                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
166                         0x7c 0x0000007e /* PORT0_STATUS */
167                 >;
168         };
169 };
170
171 &pcie {
172         status = "okay";
173 };
174
175 &eth0 {
176         status = "okay";
177
178         mtd-mac-address = <&info 0x8>;
179         phy-mode = "sgmii";
180         phy-handle = <&phy0>;
181 };
182
183 &wmac {
184         status = "okay";
185         mtd-cal-data = <&art 0x1000>;
186         mtd-mac-address = <&info 0x8>;
187 };