lantiq: device tree bindings for dwc2 on danube
[oweals/openwrt.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 init=/etc/preinit";
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
37                                 partitions {
38                                         compatible = "fixed-partitions";
39                                         #address-cells = <1>;
40                                         #size-cells = <1>;
41
42                                         partition@0 {
43                                                 label = "u-boot";
44                                                 reg = <0x0 0x40000>;
45                                                 read-only;
46                                         };
47                                         partition@40000 {
48                                                 label = "uboot-env";
49                                                 reg = <0x40000 0x40000>;
50                                         };
51                                         caldata: partition@80000 {
52                                                 label = "caldata";
53                                                 reg = <0x80000 0x20000>;
54                                                 read-only;
55                                         };
56                                         partition@a0000 {
57                                                 label = "kernel";
58                                                 reg = <0xa0000 0x200000>;
59                                         };
60                                         partition@2a0000 {
61                                                 label = "ubi";
62                                                 reg = <0x2a0000 0x7d60000>;
63                                         };
64                                 };
65                         };
66                 };
67
68                 gpio: pinmux@E100B10 {
69                         pinctrl-names = "default";
70                         pinctrl-0 = <&state_default>;
71
72                         state_default: pinmux {
73                                 mdio {
74                                         lantiq,groups = "mdio";
75                                         lantiq,function = "mdio";
76                                 };
77                                 pci_rst {
78                                         lantiq,pins = "io21";
79                                         lantiq,output = <1>;
80                                         lantiq,open-drain;
81                                 };
82                                 pcie_rst {
83                                         lantiq,pins = "io38";
84                                         lantiq,pull = <0>;
85                                         lantiq,output = <1>;
86                                         lantiq,open-drain;
87                                 };
88                                 usb_vbus {
89                                         lantiq,pins = "io33";
90                                         lantiq,pull = <0>;
91                                         lantiq,open-drain = <0>;
92                                         lantiq,output = <1>;
93                                 };
94                                 nand_out {
95                                         lantiq,groups = "nand cle", "nand ale";
96                                         lantiq,function = "ebu";
97                                         lantiq,output = <1>;
98                                         lantiq,open-drain = <0>;
99                                         lantiq,pull = <0>;
100                                 };
101                                 nand_cs1 {
102                                         lantiq,groups = "nand cs1";
103                                         lantiq,function = "ebu";
104                                         lantiq,open-drain = <0>;
105                                         lantiq,pull = <0>;
106                                 };
107                         };
108                 };
109
110                 ifxhcd@E101000 {
111                         status = "okay";
112                         gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
113                 };
114
115                 pci@E105400 {
116                         status = "okay";
117                         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
118                 };
119         };
120
121         gphy-xrx200 {
122                 compatible = "lantiq,phy-xrx200";
123                 firmware1 = "lantiq/vr9_phy11g_a1x.bin";        /*VR9 1.1*/
124                 firmware2 = "lantiq/vr9_phy11g_a2x.bin";        /*VR9 1.2*/
125                 phys = [ 00 01 ];
126         };
127
128         ath9k_eep {
129                 compatible = "ath9k,eeprom";
130                 ath,eep-flash = <&caldata 0x1000>;
131                 ath,mac-offset = <0x110c>;
132                 ath,mac-increment = <2>;
133                 ath,pci-slot = <0xe>; /* 14 */
134         };
135
136         gpio-keys-polled {
137                 compatible = "gpio-keys-polled";
138                 #address-cells = <1>;
139                 #size-cells = <0>;
140                 poll-interval = <100>;
141
142                 reset {
143                         label = "reset";
144                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
145                         linux,code = <KEY_RESTART>;
146                 };
147
148                 wps {
149                         label = "wps";
150                         gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
151                         linux,code = <KEY_WPS_BUTTON>;
152                 };
153
154                 restart {
155                         label = "restart";
156                         gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
157                         linux,code = <KEY_POWER>;
158                 };
159         };
160
161         gpio-leds {
162                 compatible = "gpio-leds";
163
164                 /* broadband-* is a single RGB led */
165                 broadband-red {
166                         label = "bthomehubv5a:red:broadband";
167                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
168                 };
169                 broadband-green {
170                         label = "bthomehubv5a:green:broadband";
171                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
172                 };
173                 broadband_blue: broadband-blue {
174                         label = "bthomehubv5a:blue:broadband";
175                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
176                 };
177
178                 /* wireless-* is a single RGB led */
179                 wireless-red {
180                         label = "bthomehubv5a:red:wireless";
181                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
182                 };
183                 wireless-green {
184                         label = "bthomehubv5a:green:wireless";
185                         gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
186                 };
187                 wireless_blue: wireless-blue {
188                         label = "bthomehubv5a:blue:wireless";
189                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
190                 };
191
192                 /* power-* is a single RGB led */
193                 power_red: power-red {
194                         label = "bthomehubv5a:red:power";
195                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
196                 };
197                 power_green: power-green {
198                         label = "bthomehubv5a:green:power";
199                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
200                         default-state = "keep";
201                 };
202                 power_blue: power-blue {
203                         label = "bthomehubv5a:blue:power";
204                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
205                 };
206
207                 dimmed {
208                         label = "dimmed";
209                         gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
210                 };
211         };
212 };
213
214 &eth0 {
215         lan: interface@0 {
216                 compatible = "lantiq,xrx200-pdi";
217                 #address-cells = <1>;
218                 #size-cells = <0>;
219                 reg = <0>;
220                 mtd-mac-address = <&caldata 0x110c>;
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                 mtd-mac-address = <&caldata 0x110c>;
255                 mtd-mac-address-increment = <4>;
256                 lantiq,wan;
257
258                 ethernet@5 {
259                         compatible = "lantiq,xrx200-pdi-port";
260                         reg = <5>;
261                         phy-mode = "rgmii";
262                         phy-handle = <&phy5>;
263                 };
264         };
265
266         mdio@0 {
267                 #address-cells = <1>;
268                 #size-cells = <0>;
269                 compatible = "lantiq,xrx200-mdio";
270
271                 phy0: ethernet-phy@0 {
272                         reg = <0x0>;
273                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
274                 };
275                 phy1: ethernet-phy@1 {
276                         reg = <0x1>;
277                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
278                 };
279                 phy5: ethernet-phy@5 {
280                         reg = <0x5>;
281                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
282                 };
283                 phy11: ethernet-phy@11 {
284                         reg = <0x11>;
285                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
286                 };
287                 phy13: ethernet-phy@13 {
288                         reg = <0x13>;
289                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
290                 };
291         };
292 };