ramips: add label MAC address for TP-Link Archer C20i
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_tplink_archer-c20i.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,archer-c20i", "ralink,mt7620a-soc";
10         model = "TP-Link Archer C20i";
11
12         aliases {
13                 label-mac-device = &ethernet;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,115200";
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 lan {
24                         label = "archer-c20i:blue:lan";
25                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
26                 };
27
28                 usb {
29                         label = "archer-c20i:blue:usb";
30                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
31                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
32                         linux,default-trigger = "usbport";
33                 };
34
35                 wps {
36                         label = "archer-c20i:blue:wps";
37                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
38                 };
39
40                 wan {
41                         label = "archer-c20i:blue:wan";
42                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
43                 };
44
45                 wlan {
46                         label = "archer-c20i:blue:wlan";
47                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
48                 };
49         };
50
51         keys {
52                 compatible = "gpio-keys";
53
54                 rfkill {
55                         label = "rfkill";
56                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
57                         linux,code = <KEY_RFKILL>;
58                 };
59
60                 reset_wps {
61                         label = "reset_wps";
62                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
63                         linux,code = <KEY_RESTART>;
64                 };
65         };
66 };
67
68 &gpio1 {
69         status = "okay";
70 };
71
72 &gpio2 {
73         status = "okay";
74 };
75
76 &gpio3 {
77         status = "okay";
78 };
79
80 &spi0 {
81         status = "okay";
82
83         m25p80@0 {
84                 compatible = "jedec,spi-nor";
85                 reg = <0>;
86                 spi-max-frequency = <10000000>;
87
88                 partitions {
89                         compatible = "fixed-partitions";
90                         #address-cells = <1>;
91                         #size-cells = <1>;
92
93                         partition@0 {
94                                 label = "u-boot";
95                                 reg = <0x0 0x20000>;
96                                 read-only;
97                         };
98
99                         partition@20000 {
100                                 compatible = "tplink,firmware";
101                                 label = "firmware";
102                                 reg = <0x20000 0x7a0000>;
103                         };
104
105                         partition@7c0000 {
106                                 label = "config";
107                                 reg = <0x7c0000 0x10000>;
108                         };
109
110                         rom: partition@7d0000 {
111                                 label = "rom";
112                                 reg = <0x7d0000 0x10000>;
113                         };
114
115                         partition@7e0000 {
116                                 label = "romfile";
117                                 reg = <0x7e0000 0x10000>;
118                         };
119
120                         radio: partition@7f0000 {
121                                 label = "radio";
122                                 reg = <0x7f0000 0x10000>;
123                         };
124                 };
125         };
126 };
127
128 &pinctrl {
129         state_default: pinctrl0 {
130                 gpio {
131                         ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
132                         ralink,function = "gpio";
133                 };
134         };
135 };
136
137 &ethernet {
138                 pinctrl-names = "default";
139                 mtd-mac-address = <&rom 0xf100>;
140                 mediatek,portmap = "wllll";
141         };
142
143 &ehci {
144         status = "okay";
145 };
146
147 &ohci {
148         status = "okay";
149 };
150
151 &gsw {
152         mediatek,port4 = "ephy";
153 };
154
155 &wmac {
156         ralink,mtd-eeprom = <&radio 0x0>;
157 };
158
159 &pcie {
160         status = "okay";
161 };
162
163 &pcie0 {
164         mt76@0,0 {
165                 reg = <0x0000 0 0 0 0>;
166                 mediatek,mtd-eeprom = <&radio 0x8000>;
167                 ieee80211-freq-limit = <5000000 6000000>;
168         };
169 };