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