ramips: fix Archer C2 v1 5GHz MAC address
[openwrt/openwrt.git] / target / linux / ramips / dts / ArcherC2-v1.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,c2-v1", "ralink,mt7620a-soc";
10 model = "TP-Link Archer C2 v1";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 pinctrl {
24 state_default: pinctrl0 {
25 gpio {
26 ralink,group = "i2c", "uartf", "wled", "ephy", "spi refclk";
27 ralink,function = "gpio";
28 };
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 lan {
36 label = "c2-v1:green:lan";
37 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
38 };
39
40 usb {
41 label = "c2-v1:green:usb";
42 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
43 trigger-sources = <&ohci_port1>, <&ehci_port1>;
44 linux,default-trigger = "usbport";
45 };
46
47 led_wps: wps {
48 label = "c2-v1:green:wps";
49 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
50 };
51
52 wan {
53 label = "c2-v1:green:wan";
54 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
55 };
56
57 wlan {
58 label = "c2-v1:green:wlan";
59 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
60 linux,default-trigger = "phy1tpt";
61 };
62 };
63
64 keys {
65 compatible = "gpio-keys";
66
67 reset_wps {
68 label = "reset_wps";
69 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_RESTART>;
71 };
72
73 rfkill {
74 label = "rfkill";
75 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
76 linux,code = <KEY_RFKILL>;
77 };
78 };
79
80 rtl8367rb {
81 compatible = "realtek,rtl8367b", "rtl8367b";
82 cpu_port = <6>;
83 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
84 mii-bus = <&mdio0>;
85 };
86 };
87
88 &spi0 {
89 status = "okay";
90
91 m25p80@0 {
92 compatible = "jedec,spi-nor";
93 reg = <0>;
94 spi-max-frequency = <10000000>;
95
96 partitions {
97 compatible = "fixed-partitions";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 partition@0 {
102 label = "u-boot";
103 reg = <0x0 0x20000>;
104 read-only;
105 };
106
107 partition@20000 {
108 compatible = "tplink,firmware";
109 label = "firmware";
110 reg = <0x20000 0x7a0000>;
111 };
112
113 partition@7c0000 {
114 label = "config";
115 reg = <0x7c0000 0x10000>;
116 read-only;
117 };
118
119 rom: partition@7d0000 {
120 label = "rom";
121 reg = <0x7d0000 0x10000>;
122 read-only;
123 };
124
125 partition@7e0000 {
126 label = "romfile";
127 reg = <0x7e0000 0x10000>;
128 read-only;
129 };
130
131 radio: partition@7f0000 {
132 label = "radio";
133 reg = <0x7f0000 0x10000>;
134 read-only;
135 };
136 };
137 };
138 };
139
140 &ethernet {
141 status = "okay";
142 mtd-mac-address = <&rom 0xf100>;
143 pinctrl-names = "default";
144 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
145
146 port@5 {
147 status = "okay";
148 mediatek,fixed-link = <1000 1 1 1>;
149 phy-mode = "rgmii";
150 };
151
152 mdio0: mdio-bus {
153 status = "okay";
154 };
155 };
156
157
158 &gpio1 {
159 status = "okay";
160 };
161
162 &gpio2 {
163 status = "okay";
164 };
165
166 &gpio3 {
167 status = "okay";
168 };
169
170 &wmac {
171 ralink,mtd-eeprom = <&radio 0>;
172 mtd-mac-address = <&rom 0xf100>;
173 };
174
175 &ehci {
176 status = "okay";
177 };
178
179 &ohci {
180 status = "okay";
181 };
182
183 &pcie {
184 status = "okay";
185 };
186
187 &pcie0 {
188 mt76@0,0 {
189 reg = <0x0000 0 0 0 0>;
190 mediatek,mtd-eeprom = <&radio 0x8000>;
191 mtd-mac-address = <&rom 0xf100>;
192 mtd-mac-address-increment = <(-1)>;
193 };
194 };