lantiq: move partitions into partion table node
[openwrt.git] / target / linux / lantiq / dts / VR200v.dts
1 /dts-v1/;
2
3 /include/ "vr9.dtsi"
4
5 / {
6         model = "VR200v - TP-LINK Archer VR200v";
7
8         chosen {
9                 bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
10
11                 leds {
12                         boot = &power;
13                         failsafe = &power;
14
15                         dsl = &dsl;
16                         internet = &internet;
17                         usb = &usb;
18                         usb2 = &usb;
19                 };
20         };
21
22         memory@0 {
23                 reg = <0x0 0x7f00000>;
24         };
25
26         fpi@10000000 {
27                 gpio: pinmux@E100B10 {
28                         pinctrl-names = "default";
29                         pinctrl-0 = <&state_default>;
30
31                         state_default: pinmux {
32                                 mdio {
33                                         lantiq,groups = "mdio";
34                                         lantiq,function = "mdio";
35                                 };
36                                 gphy-leds {
37                                         lantiq,groups = "gphy0 led1", "gphy1 led1";
38                                         lantiq,function = "gphy";
39                                         lantiq,pull = <2>;
40                                         lantiq,open-drain = <0>;
41                                         lantiq,output = <1>;
42                                 };
43                                 phy-rst {
44                                         lantiq,pins = "io42";
45                                         lantiq,pull = <0>;
46                                         lantiq,open-drain = <0>;
47                                         lantiq,output = <1>;
48                                 };
49                                 pcie-rst {
50                                         lantiq,pins = "io38";
51                                         lantiq,pull = <0>;
52                                         lantiq,output = <1>;
53                                 };
54                         };
55                         pins_spi_default: pins_spi_default {
56                                 spi_in {
57                                         lantiq,groups = "spi_di";
58                                         lantiq,function = "spi";
59                                 };
60                                 spi_out {
61                                         lantiq,groups = "spi_do", "spi_clk",
62                                                 "spi_cs4";
63                                         lantiq,function = "spi";
64                                         lantiq,output = <1>;
65                                 };
66                         };
67                 };
68
69                 ifxhcd@E101000 {
70                         status = "okay";
71                         gpios = <&gpio 33 0>;
72                         lantiq,portmask = <0x3>;
73                 };
74
75                 ifxhcd@E106000 {
76                         status = "okay";
77                         gpios = <&gpio 33 0>;
78                 };
79         };
80
81         gphy-xrx200 {
82                 compatible = "lantiq,phy-xrx200";
83                 firmware = "lantiq/vr9_phy11g_a2x.bin";
84                 phys = [ 00 01 ];
85         };
86
87         gpio-keys-polled {
88                 compatible = "gpio-keys-polled";
89                 #address-cells = <1>;
90                 #size-cells = <0>;
91                 poll-interval = <100>;
92                 reset {
93                         label = "reset";
94                         gpios = <&gpio 22 1>;
95                         linux,code = <0x198>;
96                 };
97
98                 wifi {
99                         label = "wifi";
100                         gpios = <&gpio 0 0>;
101                         linux,code = <0xf7>;
102                         linux,input-type = <5>; /* EV_SW */
103                 };
104
105                 wps {
106                         label = "wps";
107                         gpios = <&gpio 2 1>;
108                         linux,code = <0x211>;
109                 };
110
111                 dect_paging {
112                         label = "dect_paging";
113                         gpios = <&gpio 39 1>;
114                         linux,code = <0x211>;
115                 };
116         };
117
118         gpio-leds {
119                 compatible = "gpio-leds";
120                 power: power {
121                         label = "vr200v:blue:power";
122                         gpios = <&gpio 46 1>;
123                 };
124                 dsl: dsl {
125                         label = "vr200v:blue:dsl";
126                         gpios = <&gpio 4 1>;
127                 };
128                 internet: internet {
129                         label = "vr200v:blue:internet";
130                         gpios = <&gpio 5 1>;
131                 };
132                 usb: usb {
133                         label = "vr200v:blue:usb";
134                         gpios = <&gpio 25 1>;
135                 };
136                 eth {
137                         label = "vr200v:blue:lan";
138                         gpios = <&gpio 40 1>;
139                 };
140                 wlan {
141                         label = "vr200v:blue:wlan";
142                         gpios = <&gpio 24 1>;
143                 };
144                 wlan5g {
145                         label = "vr200v:blue:wlan5g";
146                         gpios = <&gpio 20 1>;
147                 };
148                 phone {
149                         label = "vr200v:blue:phone";
150                         gpios = <&gpio 44 1>;
151                 };
152         };
153 };
154
155 &spi {
156         pinctrl-names = "default";
157         pinctrl-0 = <&pins_spi_default>;
158
159         status = "ok";
160
161         m25p80@4 {
162                 #address-cells = <1>;
163                 #size-cells = <1>;
164                 compatible = "jedec,spi-nor";
165                 reg = <4 0>;
166                 spi-max-frequency = <33250000>;
167                 m25p,fast-read;
168
169                 partitions {
170                         compatible = "fixed-partitions";
171                         #address-cells = <1>;
172                         #size-cells = <1>;
173
174                         partition@0 {
175                                 reg = <0x0 0x20000>;
176                                 label = "u-boot";
177                                 read-only;
178                         };
179
180                         partition@20000 {
181                                 reg = <0x20000 0xf90000>;
182                                 label = "firmware";
183                         };
184
185                         partition@fb0000 {
186                                 reg = <0xfb0000 0x10000>;
187                                 label = "radioDECT";
188                                 read-only;
189                         };
190
191                         partition@fc0000 {
192                                 reg = <0xfc0000 0x10000>;
193                                 label = "config";
194                                 read-only;
195                         };
196
197                         romfile: partition@fd0000 {
198                                 reg = <0xfd0000 0x10000>;
199                                 label = "romfile";
200                                 read-only;
201                         };
202
203                         partition@fe0000 {
204                                 reg = <0xfe0000 0x10000>;
205                                 label = "rom";
206                                 read-only;
207                         };
208
209                         partition@ff0000 {
210                                 reg = <0xff0000 0x10000>;
211                                 label = "radio";
212                                 read-only;
213                         };
214                 };
215         };
216 };
217
218 &eth0 {
219         lan: interface@0 {
220                 compatible = "lantiq,xrx200-pdi";
221                 #address-cells = <1>;
222                 #size-cells = <0>;
223                 reg = <0>;
224                 mtd-mac-address = <&romfile 0xf100>;
225                 lantiq,switch;
226
227                 ethernet@0 {
228                         compatible = "lantiq,xrx200-pdi-port";
229                         reg = <0>;
230                         phy-mode = "rgmii";
231                         phy-handle = <&phy0>;
232                         // gpios = <&gpio 42 1>;
233                 };
234                 ethernet@5 {
235                         compatible = "lantiq,xrx200-pdi-port";
236                         reg = <5>;
237                         phy-mode = "rgmii";
238                         phy-handle = <&phy5>;
239                 };
240                 ethernet@2 {
241                         compatible = "lantiq,xrx200-pdi-port";
242                         reg = <2>;
243                         phy-mode = "gmii";
244                         phy-handle = <&phy11>;
245                 };
246                 ethernet@3 {
247                         compatible = "lantiq,xrx200-pdi-port";
248                         reg = <4>;
249                         phy-mode = "gmii";
250                         phy-handle = <&phy13>;
251                 };
252         };
253
254         mdio@0 {
255                 #address-cells = <1>;
256                 #size-cells = <0>;
257                 compatible = "lantiq,xrx200-mdio";
258                 phy0: ethernet-phy@0 {
259                         reg = <0x0>;
260                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
261                 };
262                 phy5: ethernet-phy@5 {
263                         reg = <0x5>;
264                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
265                 };
266                 phy11: ethernet-phy@11 {
267                         reg = <0x11>;
268                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
269                 };
270                 phy13: ethernet-phy@13 {
271                         reg = <0x13>;
272                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
273                 };
274         };
275 };