lantiq: kernel 4.14: use vbus-supply devicetree property
[openwrt/openwrt.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / BTHOMEHUBV5A.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 = "bt,homehub-v5a", "lantiq,xway", "lantiq,vr9";
10 model = "BT Home Hub 5A";
11
12 chosen {
13 bootargs = "console=ttyLTQ0,115200";
14 };
15
16 aliases {
17 led-boot = &power_green;
18 led-failsafe = &power_red;
19 led-running = &power_blue;
20
21 led-dsl = &broadband_blue;
22 led-wifi = &wireless_blue;
23 };
24
25 memory@0 {
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 2 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40
41 wps {
42 label = "wps";
43 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_WPS_BUTTON>;
45 };
46
47 restart {
48 label = "restart";
49 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_POWER>;
51 };
52 };
53
54 gpio-leds {
55 compatible = "gpio-leds";
56
57 /* broadband-* is a single RGB led */
58 broadband-red {
59 label = "bthomehubv5a:red:broadband";
60 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
61 };
62 broadband-green {
63 label = "bthomehubv5a:green:broadband";
64 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
65 };
66 broadband_blue: broadband-blue {
67 label = "bthomehubv5a:blue:broadband";
68 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
69 };
70
71 /* wireless-* is a single RGB led */
72 wireless-red {
73 label = "bthomehubv5a:red:wireless";
74 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
75 };
76 wireless-green {
77 label = "bthomehubv5a:green:wireless";
78 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
79 };
80 wireless_blue: wireless-blue {
81 label = "bthomehubv5a:blue:wireless";
82 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
83 };
84
85 /* power-* is a single RGB led */
86 power_red: power-red {
87 label = "bthomehubv5a:red:power";
88 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
89 };
90 power_green: power-green {
91 label = "bthomehubv5a:green:power";
92 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
93 default-state = "keep";
94 };
95 power_blue: power-blue {
96 label = "bthomehubv5a:blue:power";
97 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
98 };
99
100 dimmed {
101 label = "dimmed";
102 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
103 };
104 };
105
106 usb_vbus: regulator-usb-vbus {
107 compatible = "regulator-fixed";
108
109 regulator-name = "USB_VBUS";
110
111 regulator-min-microvolt = <5000000>;
112 regulator-max-microvolt = <5000000>;
113
114 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
115 enable-active-high;
116 };
117 };
118
119 &eth0 {
120 lan: interface@0 {
121 compatible = "lantiq,xrx200-pdi";
122 #address-cells = <1>;
123 #size-cells = <0>;
124 reg = <0>;
125 lantiq,switch;
126
127 ethernet@0 {
128 compatible = "lantiq,xrx200-pdi-port";
129 reg = <0>;
130 phy-mode = "rgmii";
131 phy-handle = <&phy0>;
132 };
133 ethernet@1 {
134 compatible = "lantiq,xrx200-pdi-port";
135 reg = <1>;
136 phy-mode = "rgmii";
137 phy-handle = <&phy1>;
138 };
139 ethernet@2 {
140 compatible = "lantiq,xrx200-pdi-port";
141 reg = <2>;
142 phy-mode = "gmii";
143 phy-handle = <&phy11>;
144 };
145 ethernet@4 {
146 compatible = "lantiq,xrx200-pdi-port";
147 reg = <4>;
148 phy-mode = "gmii";
149 phy-handle = <&phy13>;
150 };
151 ethernet@5 {
152 compatible = "lantiq,xrx200-pdi-port";
153 reg = <5>;
154 phy-mode = "rgmii";
155 phy-handle = <&phy5>;
156 };
157 };
158
159 mdio@0 {
160 #address-cells = <1>;
161 #size-cells = <0>;
162 compatible = "lantiq,xrx200-mdio";
163 reg = <0>;
164
165 phy0: ethernet-phy@0 {
166 reg = <0x0>;
167 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
168 };
169 phy1: ethernet-phy@1 {
170 reg = <0x1>;
171 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
172 };
173 phy5: ethernet-phy@5 {
174 reg = <0x5>;
175 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
176 };
177 phy11: ethernet-phy@11 {
178 reg = <0x11>;
179 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
180 };
181 phy13: ethernet-phy@13 {
182 reg = <0x13>;
183 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
184 };
185 };
186 };
187
188 &gphy0 {
189 lantiq,gphy-mode = <GPHY_MODE_GE>;
190 };
191
192 &gphy1 {
193 lantiq,gphy-mode = <GPHY_MODE_GE>;
194 };
195
196 &gpio {
197 pinctrl-names = "default";
198 pinctrl-0 = <&state_default>;
199
200 state_default: pinmux {
201 mdio {
202 lantiq,groups = "mdio";
203 lantiq,function = "mdio";
204 };
205 pci_rst {
206 lantiq,pins = "io21";
207 lantiq,output = <1>;
208 lantiq,open-drain;
209 };
210 pcie_rst {
211 lantiq,pins = "io38";
212 lantiq,pull = <0>;
213 lantiq,output = <1>;
214 lantiq,open-drain;
215 };
216 usb_vbus {
217 lantiq,pins = "io33";
218 lantiq,pull = <0>;
219 lantiq,open-drain = <0>;
220 lantiq,output = <1>;
221 };
222 nand_out {
223 lantiq,groups = "nand cle", "nand ale";
224 lantiq,function = "ebu";
225 lantiq,output = <1>;
226 lantiq,open-drain = <0>;
227 lantiq,pull = <0>;
228 };
229 nand_cs1 {
230 lantiq,groups = "nand cs1";
231 lantiq,function = "ebu";
232 lantiq,open-drain = <0>;
233 lantiq,pull = <0>;
234 };
235 };
236 };
237
238 &localbus {
239 nand@1 {
240 compatible = "lantiq,nand-xway";
241 lantiq,cs = <1>;
242 bank-width = <2>;
243 reg = <0x1 0x0 0x2000000>;
244 #address-cells = <1>;
245 #size-cells = <1>;
246 nand-on-flash-bbt;
247 nand-ecc-strength = <3>;
248 nand-ecc-step-size = <256>;
249
250 partitions {
251 compatible = "fixed-partitions";
252 #address-cells = <1>;
253 #size-cells = <1>;
254
255 partition@0 {
256 label = "u-boot";
257 reg = <0x0 0xa0000>;
258 read-only;
259 };
260 partition@a0000 {
261 label = "uboot-env";
262 reg = <0xa0000 0x20000>;
263 read-only;
264 };
265 partition@c0000 {
266 label = "unused";
267 reg = <0xc0000 0x40000>;
268 };
269 partition@100000 {
270 label = "ubi";
271 reg = <0x100000 0x7e80000>;
272 };
273 /*
274 * last 512 KiB are for the bad block table, not writable
275 */
276 };
277 };
278 };
279
280 &pci0 {
281 status = "okay";
282 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
283
284 wifi@168c,002d {
285 compatible = "pci168c,002d";
286 reg = <0x7000 0 0 0 0>;
287 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
288 qca,disable-5ghz;
289 };
290 };
291
292 &usb_phy0 {
293 status = "okay";
294 };
295
296 &usb0 {
297 status = "okay";
298 vbus-supply = <&usb_vbus>;
299 };