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