e74a0e8e9fe691ad83cb42b5a406b3354d852772
[oweals/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / VR200.dtsi
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
5
6 / {
7         memory@0 {
8                 device_type = "memory";
9                 reg = <0x0 0x7f00000>;
10         };
11
12         usb_vbus: regulator-usb-vbus {
13                 compatible = "regulator-fixed";
14
15                 regulator-name = "USB_VBUS";
16
17                 regulator-min-microvolt = <5000000>;
18                 regulator-max-microvolt = <5000000>;
19
20                 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
21                 enable-active-high;
22         };
23 };
24
25 &eth0 {
26         lan: interface@0 {
27                 compatible = "lantiq,xrx200-pdi";
28                 #address-cells = <1>;
29                 #size-cells = <0>;
30                 reg = <0>;
31                 mtd-mac-address = <&romfile 0xf100>;
32                 lantiq,switch;
33
34                 ethernet@0 {
35                         compatible = "lantiq,xrx200-pdi-port";
36                         reg = <0>;
37                         phy-mode = "rgmii";
38                         phy-handle = <&phy0>;
39                         // gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
40                 };
41                 ethernet@5 {
42                         compatible = "lantiq,xrx200-pdi-port";
43                         reg = <5>;
44                         phy-mode = "rgmii";
45                         phy-handle = <&phy5>;
46                 };
47                 ethernet@2 {
48                         compatible = "lantiq,xrx200-pdi-port";
49                         reg = <2>;
50                         phy-mode = "gmii";
51                         phy-handle = <&phy11>;
52                 };
53                 ethernet@3 {
54                         compatible = "lantiq,xrx200-pdi-port";
55                         reg = <4>;
56                         phy-mode = "gmii";
57                         phy-handle = <&phy13>;
58                 };
59         };
60
61         mdio {
62                 #address-cells = <1>;
63                 #size-cells = <0>;
64                 compatible = "lantiq,xrx200-mdio";
65
66                 phy0: ethernet-phy@0 {
67                         reg = <0x0>;
68                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
69                 };
70                 phy5: ethernet-phy@5 {
71                         reg = <0x5>;
72                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
73                 };
74                 phy11: ethernet-phy@11 {
75                         reg = <0x11>;
76                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
77                 };
78                 phy13: ethernet-phy@13 {
79                         reg = <0x13>;
80                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
81                 };
82         };
83 };
84
85 &gphy0 {
86         lantiq,gphy-mode = <GPHY_MODE_GE>;
87 };
88
89 &gphy1 {
90         lantiq,gphy-mode = <GPHY_MODE_GE>;
91 };
92
93 &gpio {
94         pinctrl-names = "default";
95         pinctrl-0 = <&state_default>;
96
97         state_default: pinmux {
98                 mdio {
99                         lantiq,groups = "mdio";
100                         lantiq,function = "mdio";
101                 };
102                 gphy-leds {
103                         lantiq,groups = "gphy0 led1", "gphy1 led1";
104                         lantiq,function = "gphy";
105                         lantiq,pull = <2>;
106                         lantiq,open-drain = <0>;
107                         lantiq,output = <1>;
108                 };
109                 phy-rst {
110                         lantiq,pins = "io42";
111                         lantiq,pull = <0>;
112                         lantiq,open-drain = <0>;
113                         lantiq,output = <1>;
114                 };
115                 pcie-rst {
116                         lantiq,pins = "io38";
117                         lantiq,pull = <0>;
118                         lantiq,output = <1>;
119                 };
120         };
121         pins_spi_default: pins_spi_default {
122                 spi_in {
123                         lantiq,groups = "spi_di";
124                         lantiq,function = "spi";
125                 };
126                 spi_out {
127                         lantiq,groups = "spi_do", "spi_clk",
128                                 "spi_cs4";
129                         lantiq,function = "spi";
130                         lantiq,output = <1>;
131                 };
132         };
133 };
134
135 &pci0 {
136         status = "okay";
137         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
138 };
139
140 &spi {
141         status = "okay";
142
143         pinctrl-names = "default";
144         pinctrl-0 = <&pins_spi_default>;
145
146         m25p80@4 {
147                 compatible = "jedec,spi-nor";
148                 reg = <4>;
149                 spi-max-frequency = <33250000>;
150                 m25p,fast-read;
151
152                 partitions {
153                         compatible = "fixed-partitions";
154                         #address-cells = <1>;
155                         #size-cells = <1>;
156
157                         partition@0 {
158                                 reg = <0x0 0x20000>;
159                                 label = "u-boot";
160                                 read-only;
161                         };
162
163                         partition@20000 {
164                                 reg = <0x20000 0xf90000>;
165                                 label = "firmware";
166                         };
167
168                         partition@fb0000 {
169                                 reg = <0xfb0000 0x10000>;
170                                 label = "radioDECT";
171                                 read-only;
172                         };
173
174                         partition@fc0000 {
175                                 reg = <0xfc0000 0x10000>;
176                                 label = "config";
177                                 read-only;
178                         };
179
180                         romfile: partition@fd0000 {
181                                 reg = <0xfd0000 0x10000>;
182                                 label = "romfile";
183                                 read-only;
184                         };
185
186                         partition@fe0000 {
187                                 reg = <0xfe0000 0x10000>;
188                                 label = "rom";
189                                 read-only;
190                         };
191
192                         partition@ff0000 {
193                                 reg = <0xff0000 0x10000>;
194                                 label = "radio";
195                                 read-only;
196                         };
197                 };
198         };
199 };
200
201 &usb_phy0 {
202         status = "okay";
203 };
204
205 &usb_phy1 {
206         status = "okay";
207 };
208
209 &usb0 {
210         status = "okay";
211         vbus-supply = <&usb_vbus>;
212 };
213
214 &usb1 {
215         status = "okay";
216         vbus-supply = <&usb_vbus>;
217 };