lantiq: split device definitions into files
[openwrt/staging/wigyori.git] / target / linux / lantiq / files / 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 led-upgrade = &power_blue;
21
22 led-dsl = &broadband_blue;
23 led-wifi = &wireless_blue;
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x8000000>;
29 };
30
31 keys {
32 compatible = "gpio-keys-polled";
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_POWER2>;
51 };
52 };
53
54 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 {
160 #address-cells = <1>;
161 #size-cells = <0>;
162 compatible = "lantiq,xrx200-mdio";
163
164 phy0: ethernet-phy@0 {
165 reg = <0x0>;
166 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
167 };
168 phy1: ethernet-phy@1 {
169 reg = <0x1>;
170 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
171 };
172 phy5: ethernet-phy@5 {
173 reg = <0x5>;
174 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
175 };
176 phy11: ethernet-phy@11 {
177 reg = <0x11>;
178 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
179 };
180 phy13: ethernet-phy@13 {
181 reg = <0x13>;
182 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
183 };
184 };
185 };
186
187 &gphy0 {
188 lantiq,gphy-mode = <GPHY_MODE_GE>;
189 };
190
191 &gphy1 {
192 lantiq,gphy-mode = <GPHY_MODE_GE>;
193 };
194
195 &gpio {
196 pinctrl-names = "default";
197 pinctrl-0 = <&state_default>;
198
199 state_default: pinmux {
200 pci_rst {
201 lantiq,pins = "io21";
202 lantiq,output = <1>;
203 lantiq,open-drain;
204 };
205 pcie_rst {
206 lantiq,pins = "io38";
207 lantiq,pull = <0>;
208 lantiq,output = <1>;
209 lantiq,open-drain;
210 };
211 usb_vbus {
212 lantiq,pins = "io33";
213 lantiq,pull = <0>;
214 lantiq,open-drain = <0>;
215 lantiq,output = <1>;
216 };
217 };
218 };
219
220 &localbus {
221 flash@1 {
222 compatible = "lantiq,nand-xway";
223 lantiq,cs = <1>;
224 bank-width = <2>;
225 reg = <0x1 0x0 0x2000000>;
226
227 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
228 pinctrl-names = "default";
229
230 nand-on-flash-bbt;
231 nand-ecc-strength = <3>;
232 nand-ecc-step-size = <256>;
233
234 partitions {
235 compatible = "fixed-partitions";
236 #address-cells = <1>;
237 #size-cells = <1>;
238
239 partition@0 {
240 label = "u-boot";
241 reg = <0x0 0xa0000>;
242 read-only;
243 };
244 partition@a0000 {
245 label = "uboot-env";
246 reg = <0xa0000 0x20000>;
247 read-only;
248 };
249 partition@c0000 {
250 label = "unused";
251 reg = <0xc0000 0x40000>;
252 };
253 partition@100000 {
254 label = "ubi";
255 reg = <0x100000 0x7e80000>;
256 };
257 /*
258 * last 512 KiB are for the bad block table, not writable
259 */
260 };
261 };
262 };
263
264 &pci0 {
265 status = "okay";
266 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
267
268 wifi@168c,002d {
269 compatible = "pci168c,002d";
270 reg = <0x7000 0 0 0 0>;
271 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
272 qca,disable-5ghz;
273 };
274 };
275
276 &usb_phy0 {
277 status = "okay";
278 };
279
280 &usb0 {
281 status = "okay";
282 vbus-supply = <&usb_vbus>;
283 };