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