70c6f84300d151826392402925d0bbdcac66d7bf
[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 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <10000000>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "u-boot";
110 reg = <0x0 0x20000>;
111 read-only;
112 };
113
114 partition@20000 {
115 label = "firmware";
116 reg = <0x20000 0x7a0000>;
117 };
118
119 partition@7c0000 {
120 label = "config";
121 reg = <0x7c0000 0x10000>;
122 read-only;
123 };
124
125 rom: partition@7d0000 {
126 label = "rom";
127 reg = <0x7d0000 0x10000>;
128 read-only;
129 };
130
131 partition@7e0000 {
132 label = "romfile";
133 reg = <0x7e0000 0x10000>;
134 read-only;
135 };
136
137 radio: partition@7f0000 {
138 label = "radio";
139 reg = <0x7f0000 0x10000>;
140 read-only;
141 };
142 };
143 };
144 };
145
146 &pinctrl {
147 state_default: pinctrl0 {
148 gpio {
149 ralink,group = "i2c", "uartf", "wled", "ephy", "spi refclk", "wdt";
150 ralink,function = "gpio";
151 };
152 };
153 };
154
155 &ethernet {
156 pinctrl-names = "default";
157 mtd-mac-address = <&rom 0xf100>;
158 mediatek,portmap = "wllll";
159 };
160
161 &ehci {
162 status = "okay";
163 };
164
165 &ohci {
166 status = "okay";
167 };
168
169 &gsw {
170 mediatek,port4 = "ephy";
171 };
172
173 &wmac {
174 ralink,mtd-eeprom = <&radio 0>;
175 mtd-mac-address = <&rom 0xf100>;
176 mtd-mac-address-increment = <(-2)>;
177 pinctrl-names = "default";
178 pinctrl-0 = <&pa_pins>;
179 };
180
181 &pcie {
182 status = "okay";
183 };
184
185 &pcie0 {
186 mt76@0,0 {
187 reg = <0x0000 0 0 0 0>;
188 mediatek,mtd-eeprom = <&radio 0x8000>;
189 ieee80211-freq-limit = <5000000 6000000>;
190 mtd-mac-address = <&rom 0xf100>;
191 mtd-mac-address-increment = <(-1)>;
192 };
193 };