ramips: Archer C50 cleanup
[openwrt/openwrt.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_HIGH>;
26 };
27
28 usb {
29 label = "c50:green:usb";
30 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
31 };
32
33 wan {
34 label = "c50:green:wan";
35 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
36 };
37
38 wan_orange {
39 label = "c50:orange:wan";
40 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
41 };
42
43 wlan5g {
44 label = "c50:green:wlan5g";
45 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan2g {
49 label = "c50:green:wlan2g";
50 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
51 };
52
53 wps {
54 label = "c50:green:wps";
55 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 gpio-keys-polled {
60 compatible = "gpio-keys-polled";
61 #address-cells = <1>;
62 #size-cells = <0>;
63 poll-interval = <20>;
64
65 reset {
66 label = "reset";
67 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68 linux,code = <KEY_RESTART>;
69 };
70
71 rfkill {
72 label = "rfkill";
73 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RFKILL>;
75 }; };
76 };
77
78 &gpio1 {
79 status = "okay";
80 };
81
82 &gpio2 {
83 status = "okay";
84 };
85
86 &gpio3 {
87 status = "okay";
88 };
89
90 &spi0 {
91 status = "okay";
92
93 m25p80@0 {
94 #address-cells = <1>;
95 #size-cells = <1>;
96 compatible = "jedec,spi-nor";
97 reg = <0>;
98 linux,modalias = "m25p80", "mx25l6405d";
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 };
173
174 &pcie {
175 status = "okay";
176
177 pcie-bridge {
178 mt76@0,0 {
179 reg = <0x0000 0 0 0 0>;
180 device_type = "pci";
181 mediatek,mtd-eeprom = <&radio 32768>;
182 mediatek,2ghz = <0>;
183 mtd-mac-address = <&rom 0xf100>;
184 mtd-mac-address-increment = <(-1)>;
185 };
186 };
187 };