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