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