5905568711d7ca4d440efe8b78c7f53fed154f99
[openwrt/staging/lynxis.git] / target / linux / lantiq / files / arch / mips / boot / dts / P2812HNUFX.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 compatible = "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
11 };
12
13 aliases {
14 led-boot = &power_green;
15 led-failsafe = &power_red;
16 led-running = &power_green;
17 led-upgrade = &power_green;
18
19 led-dsl = &dsl_green;
20 led-internet = &internet_green;
21 led-wifi = &wireless_green;
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x8000000>;
27 };
28
29 gpio-keys-polled {
30 compatible = "gpio-keys-polled";
31 #address-cells = <1>;
32 #size-cells = <0>;
33 poll-interval = <100>;
34
35 reset {
36 label = "reset";
37 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40
41 rfkill {
42 label = "rfkill";
43 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RFKILL>;
45 };
46 };
47
48 gpio-leds {
49 compatible = "gpio-leds";
50
51 internet_red {
52 label = "p2812hnufx:red:internet";
53 gpios = <&stp 16 GPIO_ACTIVE_LOW>;
54 };
55 internet_green: internet_green {
56 label = "p2812hnufx:green:internet";
57 gpios = <&stp 17 GPIO_ACTIVE_LOW>;
58 };
59 dsl_green: dsl_green {
60 label = "p2812hnufx:green:dsl";
61 gpios = <&stp 18 GPIO_ACTIVE_LOW>;
62 };
63 dsl_orange {
64 label = "p2812hnufx:orange:dsl";
65 gpios = <&stp 19 GPIO_ACTIVE_LOW>;
66 };
67 wireless_orange {
68 label = "p2812hnufx:orange:wlan";
69 gpios = <&stp 20 GPIO_ACTIVE_LOW>;
70 };
71 wireless_green: wireless_green {
72 label = "p2812hnufx:green:wlan";
73 gpios = <&stp 21 GPIO_ACTIVE_LOW>;
74 };
75 power_red: power {
76 label = "p2812hnufx:red:power";
77 gpios = <&stp 22 GPIO_ACTIVE_LOW>;
78 };
79 power_green: power2 {
80 label = "p2812hnufx:green:power";
81 gpios = <&stp 23 GPIO_ACTIVE_LOW>;
82 default-state = "keep";
83 };
84 phone1 {
85 label = "p2812hnufx:green:phone";
86 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
87 };
88 phone1warn {
89 label = "p2812hnufx:orange:phone";
90 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
91 };
92 phone2warn {
93 label = "p2812hnufx:orange:phone2";
94 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
95 };
96 phone2 {
97 label = "p2812hnufx:green:phone2";
98 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
99 };
100 };
101
102 usb_vbus: regulator-usb-vbus {
103 compatible = "regulator-fixed";
104
105 regulator-name = "USB_VBUS";
106
107 regulator-min-microvolt = <5000000>;
108 regulator-max-microvolt = <5000000>;
109
110 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
111 enable-active-high;
112 };
113 };
114
115 &eth0 {
116 lan: interface@0 {
117 compatible = "lantiq,xrx200-pdi";
118 #address-cells = <1>;
119 #size-cells = <0>;
120 reg = <0>;
121 mac-address = [ 00 11 22 33 44 55 ];
122 lantiq,switch;
123
124 ethernet@0 {
125 compatible = "lantiq,xrx200-pdi-port";
126 reg = <0>;
127 phy-mode = "rgmii";
128 phy-handle = <&phy0>;
129 };
130 ethernet@1 {
131 compatible = "lantiq,xrx200-pdi-port";
132 reg = <1>;
133 phy-mode = "rgmii";
134 phy-handle = <&phy1>;
135 };
136 ethernet@2 {
137 compatible = "lantiq,xrx200-pdi-port";
138 reg = <2>;
139 phy-mode = "gmii";
140 phy-handle = <&phy11>;
141 };
142 ethernet@4 {
143 compatible = "lantiq,xrx200-pdi-port";
144 reg = <4>;
145 phy-mode = "gmii";
146 phy-handle = <&phy13>;
147 };
148 ethernet@5 {
149 compatible = "lantiq,xrx200-pdi-port";
150 reg = <5>;
151 phy-mode = "rgmii";
152 phy-handle = <&phy5>;
153 };
154 };
155
156 mdio@0 {
157 #address-cells = <1>;
158 #size-cells = <0>;
159 compatible = "lantiq,xrx200-mdio";
160 reg = <0>;
161
162 phy0: ethernet-phy@0 {
163 reg = <0x0>;
164 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
165 };
166 phy1: ethernet-phy@1 {
167 reg = <0x1>;
168 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
169 };
170 phy5: ethernet-phy@5 {
171 reg = <0x5>;
172 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
173 };
174 phy11: ethernet-phy@11 {
175 reg = <0x11>;
176 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
177 };
178 phy13: ethernet-phy@13 {
179 reg = <0x13>;
180 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
181 };
182 };
183 };
184
185 &gphy0 {
186 lantiq,gphy-mode = <GPHY_MODE_GE>;
187 };
188
189 &gphy1 {
190 lantiq,gphy-mode = <GPHY_MODE_GE>;
191 };
192
193 &gpio {
194 pinctrl-names = "default";
195 pinctrl-0 = <&state_default>;
196
197 state_default: pinmux {
198 exin3 {
199 lantiq,groups = "exin3";
200 lantiq,function = "exin";
201 };
202 mdio {
203 lantiq,groups = "mdio";
204 lantiq,function = "mdio";
205 };
206 gphy-leds {
207 lantiq,groups = "gphy0 led1", "gphy1 led1",
208 "gphy0 led2", "gphy1 led2";
209 lantiq,function = "gphy";
210 lantiq,pull = <2>;
211 lantiq,open-drain = <0>;
212 lantiq,output = <1>;
213 };
214 stp {
215 lantiq,groups = "stp";
216 lantiq,function = "stp";
217 lantiq,pull = <2>;
218 lantiq,open-drain = <0>;
219 lantiq,output = <1>;
220 };
221 pci-in {
222 lantiq,groups = "req1";
223 lantiq,function = "pci";
224 lantiq,output = <0>;
225 lantiq,open-drain = <1>;
226 lantiq,pull = <2>;
227 };
228 pci-out {
229 lantiq,groups = "gnt1";
230 lantiq,function = "pci";
231 lantiq,output = <1>;
232 lantiq,open-drain = <0>;
233 lantiq,pull = <0>;
234 };
235 pci_rst {
236 lantiq,pins = "io21";
237 lantiq,output = <1>;
238 lantiq,open-drain = <0>;
239 lantiq,pull = <2>;
240 };
241 pcie-rst {
242 lantiq,pins = "io38";
243 lantiq,pull = <0>;
244 lantiq,output = <1>;
245 };
246 ifxhcd-rst {
247 lantiq,pins = "io33";
248 lantiq,pull = <0>;
249 lantiq,open-drain = <0>;
250 lantiq,output = <1>;
251 };
252 nand_out {
253 lantiq,groups = "nand cle", "nand ale";
254 lantiq,function = "ebu";
255 lantiq,output = <1>;
256 lantiq,open-drain = <0>;
257 lantiq,pull = <0>;
258 };
259 nand_cs1 {
260 lantiq,groups = "nand cs1";
261 lantiq,function = "ebu";
262 lantiq,open-drain = <0>;
263 lantiq,pull = <0>;
264 };
265 };
266 };
267
268 &pci0 {
269 status = "okay";
270 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
271 };
272
273 &stp {
274 status = "okay";
275
276 lantiq,shadow = <0xffffff>;
277 lantiq,groups = <0x7>;
278 lantiq,dsl = <0x0>;
279 lantiq,phy1 = <0x0>;
280 lantiq,phy2 = <0x0>;
281 };
282
283 &usb_phy0 {
284 status = "okay";
285 };
286
287 &usb_phy1 {
288 status = "okay";
289 };
290
291 &usb0 {
292 status = "okay";
293 vbus-supply = <&usb_vbus>;
294 };
295
296 &usb1 {
297 status = "okay";
298 vbus-supply = <&usb_vbus>;
299 };