lantiq: kernel 4.14: use vbus-supply devicetree property
[oweals/openwrt.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / ARV7519RW22.dts
1 /dts-v1/;
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
7
8 / {
9         compatible = "arcadyan,arv7519rw22", "lantiq,xway", "lantiq,vr9";
10         model = "Orange Livebox 2.1";
11
12         chosen {
13                 bootargs = "console=ttyLTQ0,115200";
14         };
15
16         aliases {
17                 led-boot = &power_green;
18                 led-failsafe = &power_green;
19                 led-running = &power_green;
20
21                 led-dsl = &internet_green;
22         };
23
24         memory@0 {
25                 reg = <0x0 0x8000000>;
26         };
27
28         gpio-keys-polled {
29                 compatible = "gpio-keys-polled";
30                 #address-cells = <1>;
31                 #size-cells = <0>;
32                 poll-interval = <100>;
33
34                 reset {
35                         label = "reset";
36                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
37                         linux,code = <KEY_RESTART>;
38                 };
39                 rfkill {
40                         label = "rfkill";
41                         gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
42                         linux,code = <KEY_RFKILL>;
43                 };
44                 wps {
45                         label = "wps";
46                         gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
47                         linux,code = <KEY_WPS_BUTTON>;
48                 };
49         };
50
51         gpio-leds {
52                 compatible = "gpio-leds";
53
54                 lan_green {
55                         label = "arv7519rw22:green:lan";
56                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
57                 };
58                 internet_red {
59                         label = "arv7519rw22:red:internet";
60                         gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
61                 };
62                 power_green: power_green {
63                         label = "arv7519rw22:green:power";
64                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
65                         default-state = "keep";
66                 };
67                 alarm_blue {
68                         label = "arv7519rw22:blue:alarm";
69                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
70                 };
71                 internet_orange {
72                         label = "arv7519rw22:orange:internet";
73                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
74                 };
75                 internet_green: internet_green {
76                         label = "arv7519rw22:green:internet";
77                         gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
78                 };
79                 voice_green {
80                         label = "arv7519rw22:green:voice";
81                         gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
82                 };
83         };
84
85         usb_vbus: regulator-usb-vbus {
86                 compatible = "regulator-fixed";
87
88                 regulator-name = "USB_VBUS";
89
90                 regulator-min-microvolt = <5000000>;
91                 regulator-max-microvolt = <5000000>;
92
93                 gpio = <&gpio 32 GPIO_ACTIVE_HIGH>;
94                 enable-active-high;
95         };
96 };
97
98 &eth0 {
99         lan: interface@0 {
100                 compatible = "lantiq,xrx200-pdi";
101                 #address-cells = <1>;
102                 #size-cells = <0>;
103                 reg = <0>;
104                 mtd-mac-address = <&boardconfig 0x16>;
105                 lantiq,switch;
106
107                 ethernet@0 {
108                         compatible = "lantiq,xrx200-pdi-port";
109                         reg = <0>;
110                         phy-mode = "rgmii";
111                         phy-handle = <&phy0>;
112                 };
113                 ethernet@1 {
114                         compatible = "lantiq,xrx200-pdi-port";
115                         reg = <4>;
116                         phy-mode = "mii";
117                         phy-handle = <&phy13>;
118                 };
119                 ethernet@2 {
120                         compatible = "lantiq,xrx200-pdi-port";
121                         reg = <5>;
122                         phy-mode = "mii";
123                         phy-handle = <&phy14>;
124                 };
125                 ethernet@3 {
126                         compatible = "lantiq,xrx200-pdi-port";
127                         reg = <2>;
128                         phy-mode = "mii";
129                         phy-handle = <&phy11>;
130                 };
131                 ethernet@4 {
132                         compatible = "lantiq,xrx200-pdi-port";
133                         reg = <3>;
134                         phy-mode = "mii";
135                         phy-handle = <&phy12>;
136                 };
137         };
138
139         mdio@0 {
140                 #address-cells = <1>;
141                 #size-cells = <0>;
142                 compatible = "lantiq,xrx200-mdio";
143                 reg = <0>;
144
145                 phy0: ethernet-phy@0 {
146                         reg = <0x0>;
147                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
148                 };
149                 phy11: ethernet-phy@11 {
150                         reg = <0x11>;
151                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
152                 };
153                 phy12: ethernet-phy@12 {
154                         reg = <0x12>;
155                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
156                 };
157                 phy13: ethernet-phy@13 {
158                         reg = <0x13>;
159                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
160                 };
161                 phy14: ethernet-phy@14 {
162                         reg = <0x14>;
163                         compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
164                 };
165         };
166 };
167
168 &gphy0 {
169         lantiq,gphy-mode = <GPHY_MODE_FE>;
170 };
171
172 &gphy1 {
173         lantiq,gphy-mode = <GPHY_MODE_FE>;
174 };
175
176 &gpio {
177         pinctrl-names = "default";
178         pinctrl-0 = <&state_default>;
179
180         state_default: pinmux {
181                 mdio {
182                         lantiq,groups = "mdio";
183                         lantiq,function = "mdio";
184                 };
185                 pcie-rst {
186                         lantiq,pins = "io21";
187                         lantiq,pull = <0>;
188                         lantiq,output = <1>;
189                 };
190         };
191 };
192
193 &localbus {
194         nor@0 {
195                 compatible = "lantiq,nor";
196                 bank-width = <2>;
197                 reg = <0 0x0 0x2000000>;
198                 #address-cells = <1>;
199                 #size-cells = <1>;
200
201                 partitions {
202                         compatible = "fixed-partitions";
203                         #address-cells = <1>;
204                         #size-cells = <1>;
205
206                         partition@0 {
207                                 label = "uboot";
208                                 reg = <0x0 0x60000>;
209                                 read-only;
210                         };
211
212                         partition@60000 {
213                                 label = "uboot-env";
214                                 reg = <0x60000 0x20000>;
215                                 read-only;
216                         };
217
218                         partition@80000 {
219                                 label = "firmware";
220                                 reg = <0x80000 0x1f00000>;
221                         };
222
223                         boardconfig: partition@1f80000 {
224                                 label = "boardconfig";
225                                 reg = <0x1f80000 0x80000>;
226                                 read-only;
227                         };
228                 };
229         };
230 };
231
232 &pcie0 {
233         status = "okay";
234         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
235 };
236
237 &usb_phy0 {
238         status = "okay";
239 };
240
241 &usb_phy1 {
242         status = "okay";
243 };
244
245 &usb0 {
246         status = "okay";
247         vbus-supply = <&usb_vbus>;
248 };
249
250 &usb1 {
251         status = "okay";
252         vbus-supply = <&usb_vbus>;
253 };