ramips: fix pci/pcie related 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 #address-cells = <1>;
68 #size-cells = <0>;
69 poll-interval = <20>;
70
71 reset {
72 label = "reset";
73 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RESTART>;
75 };
76
77 rfkill {
78 label = "rfkill";
79 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_RFKILL>;
81 };
82 };
83 };
84
85 &gpio1 {
86 status = "okay";
87 };
88
89 &gpio2 {
90 status = "okay";
91 };
92
93 &gpio3 {
94 status = "okay";
95 };
96
97 &spi0 {
98 status = "okay";
99
100 m25p80@0 {
101 #address-cells = <1>;
102 #size-cells = <1>;
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <10000000>;
106
107 partition@0 {
108 label = "u-boot";
109 reg = <0x0 0x20000>;
110 read-only;
111 };
112
113 partition@20000 {
114 label = "firmware";
115 reg = <0x20000 0x7a0000>;
116 };
117
118 partition@7c0000 {
119 label = "config";
120 reg = <0x7c0000 0x10000>;
121 read-only;
122 };
123
124 rom: partition@7d0000 {
125 label = "rom";
126 reg = <0x7d0000 0x10000>;
127 read-only;
128 };
129
130 partition@7e0000 {
131 label = "romfile";
132 reg = <0x7e0000 0x10000>;
133 read-only;
134 };
135
136 radio: partition@7f0000 {
137 label = "radio";
138 reg = <0x7f0000 0x10000>;
139 read-only;
140 };
141 };
142 };
143
144 &pinctrl {
145 state_default: pinctrl0 {
146 gpio {
147 ralink,group = "i2c", "uartf", "wled", "ephy", "spi refclk", "wdt";
148 ralink,function = "gpio";
149 };
150 };
151 };
152
153 &ethernet {
154 pinctrl-names = "default";
155 mtd-mac-address = <&rom 0xf100>;
156 mediatek,portmap = "wllll";
157 };
158
159 &ehci {
160 status = "okay";
161 };
162
163 &ohci {
164 status = "okay";
165 };
166
167 &gsw {
168 mediatek,port4 = "ephy";
169 };
170
171 &wmac {
172 ralink,mtd-eeprom = <&radio 0>;
173 mtd-mac-address = <&rom 0xf100>;
174 mtd-mac-address-increment = <(-2)>;
175 pinctrl-names = "default";
176 pinctrl-0 = <&pa_pins>;
177 };
178
179 &pcie {
180 status = "okay";
181 };
182
183 &pcie0 {
184 mt76@0,0 {
185 reg = <0x0000 0 0 0 0>;
186 mediatek,mtd-eeprom = <&radio 0x8000>;
187 ieee80211-freq-limit = <5000000 6000000>;
188 mtd-mac-address = <&rom 0xf100>;
189 mtd-mac-address-increment = <(-1)>;
190 };
191 };