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