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