ramips: move partitions into partition table node
[oweals/openwrt.git] / target / linux / ramips / dts / ArcherC50.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,c50", "ralink,mt7620a-soc";
10         model = "TP-Link Archer C50";
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 = "c50:green:lan";
25                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
26                 };
27
28                 led_power: power {
29                         label = "c50:green:power";
30                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
31                         default-state = "on";
32                 };
33
34                 usb {
35                         label = "c50:green:usb";
36                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
37                 };
38
39                 wan {
40                         label = "c50:green:wan";
41                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
42                 };
43
44                 wan_orange {
45                         label = "c50:orange:wan";
46                         gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
47                 };
48
49                 wlan5g {
50                         label = "c50:green:wlan5g";
51                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
52                 };
53
54                 wlan2g {
55                         label = "c50:green:wlan2g";
56                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
57                 };
58
59                 wps {
60                         label = "c50:green: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 &gpio1 {
83         status = "okay";
84 };
85
86 &gpio2 {
87         status = "okay";
88 };
89
90 &gpio3 {
91         status = "okay";
92 };
93
94 &spi0 {
95         status = "okay";
96
97         m25p80@0 {
98                 compatible = "jedec,spi-nor";
99                 reg = <0>;
100                 spi-max-frequency = <10000000>;
101
102                 partitions {
103                         compatible = "fixed-partitions";
104                         #address-cells = <1>;
105                         #size-cells = <1>;
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
145 &pinctrl {
146         state_default: pinctrl0 {
147                 gpio {
148                         ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "ephy", "spi refclk", "mdio", "wdt", "nd_sd";
149                         ralink,function = "gpio";
150                 };
151         };
152 };
153
154 &ethernet {
155                 pinctrl-names = "default";
156                 mtd-mac-address = <&rom 0xf100>;
157                 mediatek,portmap = "wllll";
158         };
159
160 &ehci {
161         status = "okay";
162 };
163
164 &ohci {
165         status = "okay";
166 };
167
168 &gsw {
169         mediatek,port4 = "ephy";
170 };
171
172 &wmac {
173         ralink,mtd-eeprom = <&radio 0>;
174         mtd-mac-address = <&rom 0xf100>;
175         mtd-mac-address-increment = <(-2)>;
176         pinctrl-names = "default";
177         pinctrl-0 = <&pa_pins>;
178 };
179
180 &pcie {
181         status = "okay";
182 };
183
184 &pcie0 {
185         mt76@0,0 {
186                 reg = <0x0000 0 0 0 0>;
187                 mediatek,mtd-eeprom = <&radio 32768>;
188                 ieee80211-freq-limit = <5000000 6000000>;
189                 mtd-mac-address = <&rom 0xf100>;
190                 mtd-mac-address-increment = <(-1)>;
191         };
192 };