lantiq: convert vendorid into human readable form
[openwrt.git] / target / linux / lantiq / dts / TDW89X0.dtsi
1 /include/ "vr9.dtsi"
2
3 / {
4         chosen {
5                 bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
6
7                 leds {
8                         /* the power led can't be controlled, use the wps led instead */
9                         boot = &wps;
10                         failsafe = &wps;
11
12                         dsl = &dsl;
13                         internet = &internet;
14                         usb = &usb0;
15                         usb2 = &usb2;
16                 };
17         };
18
19         memory@0 {
20                 reg = <0x0 0x4000000>;
21         };
22
23         fpi@10000000 {
24                 spi@E100800 {
25                         compatible = "lantiq,spi-xway";
26                         reg = <0xE100800 0x100>;
27                         interrupt-parent = <&icu0>;
28                         interrupts = <22 23 24>;
29                         #address-cells = <1>;
30                         #size-cells = <1>;
31                         m25p80@0 {
32                                 #address-cells = <1>;
33                                 #size-cells = <1>;
34                                 compatible = "jedec,spi-nor";
35                                 reg = <3 0>;
36                                 spi-max-frequency = <33250000>;
37                                 m25p,fast-read;
38
39                                 partition@0 {
40                                         reg = <0x0 0x20000>;
41                                         label = "u-boot";
42                                         read-only;
43                                 };
44
45                                 partition@20000 {
46                                         reg = <0x20000 0x7a0000>;
47                                         label = "firmware";
48                                 };
49
50                                 partition@7c0000 {
51                                         reg = <0x7c0000 0x10000>;
52                                         label = "config";
53                                         read-only;
54                                 };
55
56                                 ath9k_cal: partition@7d0000 {
57                                         reg = <0x7d0000 0x30000>;
58                                         label = "boardconfig";
59                                         read-only;
60                                 };
61                         };
62                 };
63
64                 gpio: pinmux@E100B10 {
65                         pinctrl-names = "default";
66                         pinctrl-0 = <&state_default>;
67
68                         state_default: pinmux {
69                                 mdio {
70                                         lantiq,groups = "mdio";
71                                         lantiq,function = "mdio";
72                                 };
73                                 gphy-leds {
74                                         lantiq,groups = "gphy0 led1", "gphy1 led1";
75                                         lantiq,function = "gphy";
76                                         lantiq,pull = <2>;
77                                         lantiq,open-drain = <0>;
78                                         lantiq,output = <1>;
79                                 };
80                                 phy-rst {
81                                         lantiq,pins = "io42";
82                                         lantiq,pull = <0>;
83                                         lantiq,open-drain = <0>;
84                                         lantiq,output = <1>;
85                                 };
86                                 spi {
87                                         lantiq,groups = "spi", "spi_cs4";
88                                         lantiq,function = "spi";
89                                 };
90                                 pcie-rst {
91                                         lantiq,pins = "io38";
92                                         lantiq,pull = <0>;
93                                         lantiq,output = <1>;
94                                 };
95                         };
96                 };
97
98                 eth@E108000 {
99                         #address-cells = <1>;
100                         #size-cells = <0>;
101                         compatible = "lantiq,xrx200-net";
102                         reg = < 0xE108000 0x3000 /* switch */
103                                 0xE10B100 0x70 /* mdio */
104                                 0xE10B1D8 0x30 /* mii */
105                                 0xE10B308 0x30 /* pmac */
106                         >;
107                         interrupt-parent = <&icu0>;
108                         interrupts = <73 72>;
109
110                         lan: interface@0 {
111                                 compatible = "lantiq,xrx200-pdi";
112                                 #address-cells = <1>;
113                                 #size-cells = <0>;
114                                 reg = <0>;
115                                 mtd-mac-address = <&ath9k_cal 0xf100>;
116                                 lantiq,switch;
117
118                                 ethernet@0 {
119                                         compatible = "lantiq,xrx200-pdi-port";
120                                         reg = <0>;
121                                         phy-mode = "rgmii";
122                                         phy-handle = <&phy0>;
123                                         // gpios = <&gpio 42 1>;
124                                 };
125                                 ethernet@5 {
126                                         compatible = "lantiq,xrx200-pdi-port";
127                                         reg = <5>;
128                                         phy-mode = "rgmii";
129                                         phy-handle = <&phy5>;
130                                 };
131                                 ethernet@2 {
132                                         compatible = "lantiq,xrx200-pdi-port";
133                                         reg = <2>;
134                                         phy-mode = "gmii";
135                                         phy-handle = <&phy11>;
136                                 };
137                                 ethernet@3 {
138                                         compatible = "lantiq,xrx200-pdi-port";
139                                         reg = <4>;
140                                         phy-mode = "gmii";
141                                         phy-handle = <&phy13>;
142                                 };
143                         };
144
145                         mdio@0 {
146                                 #address-cells = <1>;
147                                 #size-cells = <0>;
148                                 compatible = "lantiq,xrx200-mdio";
149                                 phy0: ethernet-phy@0 {
150                                         reg = <0x0>;
151                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
152                                 };
153                                 phy5: ethernet-phy@5 {
154                                         reg = <0x5>;
155                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
156                                 };
157                                 phy11: ethernet-phy@11 {
158                                         reg = <0x11>;
159                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
160                                 };
161                                 phy13: ethernet-phy@13 {
162                                         reg = <0x13>;
163                                         compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
164                                 };
165                         };
166                 };
167
168                 ifxhcd@E101000 {
169                         status = "okay";
170                         gpios = <&gpio 33 0>;
171                         lantiq,portmask = <0x3>;
172                 };
173
174                 ifxhcd@E106000 {
175                         status = "okay";
176                         gpios = <&gpio 33 0>;
177                 };
178         };
179
180         gphy-xrx200 {
181                 compatible = "lantiq,phy-xrx200";
182                 firmware = "lantiq/vr9_phy11g_a2x.bin";
183                 phys = [ 00 01 ];
184         };
185
186         pcie {
187                 compatible = "lantiq,pcie-xway";
188         };
189
190         ath9k_eep {
191                 compatible = "ath9k,eeprom";
192                 ath,eep-flash = <&ath9k_cal 0x21000>;
193                 ath,mac-offset = <0xf100>;
194                 ath,mac-increment;
195                 ath,led-pin = <0>;
196                 ath,disable-5ghz;
197                 ath,led-active-high;
198         };
199
200         gpio-keys-polled {
201                 compatible = "gpio-keys-polled";
202                 #address-cells = <1>;
203                 #size-cells = <0>;
204                 poll-interval = <100>;
205                 reset {
206                         label = "reset";
207                         gpios = <&gpio 0 1>;
208                         linux,code = <0x198>;
209                 };
210
211                 wifi {
212                         label = "wifi";
213                         gpios = <&gpio 9 0>;
214                         linux,code = <0xf7>;
215                         linux,input-type = <5>; /* EV_SW */
216                 };
217
218                 wps {
219                         label = "wps";
220                         gpios = <&gpio 39 1>;
221                         linux,code = <0x211>;
222                 };
223         };
224
225         gpio-leds {
226                 compatible = "gpio-leds";
227                 /*
228                         power is not controllable via gpio
229         */
230                 dsl: dsl {
231                         label = "tdw89x0:green:dsl";
232                         gpios = <&gpio 4 0>;
233                 };
234                 internet: internet {
235                         label = "tdw89x0:green:internet";
236                         gpios = <&gpio 5 0>;
237                 };
238                 usb0: usb0 {
239                         label = "tdw89x0:green:usb";
240                         gpios = <&gpio 19 0>;
241                 };
242                 usb2: usb2 {
243                         label = "tdw89x0:green:usb2";
244                         gpios = <&gpio 20 0>;
245                 };
246                 wps: wps {
247                         label = "tdw89x0:green:wps";
248                         gpios = <&gpio 37 0>;
249                 };
250         };
251 };