lantiq: define default leds in dts files
[openwrt/openwrt.git] / target / linux / lantiq / dts / FRITZ3370.dts
1 /dts-v1/;
2
3 /include/ "vr9.dtsi"
4
5 / {
6 model = "FRITZ3370 - Fritz!Box WLAN 3370";
7
8 chosen {
9 bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9";
10
11 leds {
12 dsl = &dsl;
13 internet = &info_green;
14 power = &power;
15 power2 = &power2;
16 wifi = &wifi;
17 };
18 };
19
20 memory@0 {
21 reg = <0x0 0x8000000>;
22 };
23
24 fpi@10000000 {
25 localbus@0 {
26 nand-parts@0 {
27 compatible = "gen_nand", "lantiq,nand-xway";
28 bank-width = <2>;
29 reg = <1 0x0 0x2000000>;
30 #address-cells = <1>;
31 #size-cells = <1>;
32
33 partition@0 {
34 label = "kernel";
35 reg = <0x0 0x400000>;
36 };
37
38 partition@400000 {
39 label = "rootfs_ubi";
40 reg = <0x400000 0x3000000>;
41 };
42
43 partition@3400000 {
44 label = "vr9_firmware";
45 reg = <0x3400000 0x400000>;
46 };
47 partition@3800000 {
48 label = "reserved";
49 reg = <0x3800000 0x3000000>;
50 };
51 partition@6800000 {
52 label = "config";
53 reg = <0x6800000 0x200000>;
54 };
55 partition@6a00000 {
56 label = "nand-filesystem";
57 reg = <0x6a00000 0x1600000>;
58 };
59 };
60 };
61
62 gpio: pinmux@E100B10 {
63 pinctrl-names = "default";
64 pinctrl-0 = <&state_default>;
65
66 state_default: pinmux {
67 spi {
68 lantiq,groups = "spi", "spi_cs4";
69 lantiq,function = "gpio";
70 };
71 mdio {
72 lantiq,groups = "mdio";
73 lantiq,function = "mdio";
74 };
75 nand {
76 lantiq,groups = "nand cle", "nand ale",
77 "nand rd", "nand cs1", "nand rdy";
78 lantiq,function = "ebu";
79 lantiq,pull = <1>;
80 };
81 phy-rst {
82 lantiq,pins = "io37", "io44";
83 lantiq,pull = <0>;
84 lantiq,open-drain = <0>;
85 lantiq,output = <1>;
86 };
87 pcie-rst {
88 lantiq,pins = "io38";
89 lantiq,pull = <0>;
90 lantiq,output = <1>;
91 };
92 };
93 };
94
95 eth@E108000 {
96 #address-cells = <1>;
97 #size-cells = <0>;
98 compatible = "lantiq,xrx200-net";
99 reg = < 0xE108000 0x3000 /* switch */
100 0xE10B100 0x70 /* mdio */
101 0xE10B1D8 0x30 /* mii */
102 0xE10B308 0x30 /* pmac */
103 >;
104 interrupt-parent = <&icu0>;
105 interrupts = <73 72>;
106
107 lan: interface@0 {
108 compatible = "lantiq,xrx200-pdi";
109 #address-cells = <1>;
110 #size-cells = <0>;
111 reg = <0>;
112 mac-address = [ 00 11 22 33 44 55 ];
113 lantiq,switch;
114
115 ethernet@0 {
116 compatible = "lantiq,xrx200-pdi-port";
117 reg = <0>;
118 phy-mode = "rgmii";
119 phy-handle = <&phy0>;
120 gpios = <&gpio 37 0>;
121 };
122 ethernet@1 {
123 compatible = "lantiq,xrx200-pdi-port";
124 reg = <1>;
125 phy-mode = "rgmii";
126 phy-handle = <&phy1>;
127 gpios = <&gpio 44 0>;
128 };
129 ethernet@2 {
130 compatible = "lantiq,xrx200-pdi-port";
131 reg = <2>;
132 phy-mode = "gmii";
133 phy-handle = <&phy11>;
134 };
135 ethernet@3 {
136 compatible = "lantiq,xrx200-pdi-port";
137 reg = <4>;
138 phy-mode = "gmii";
139 phy-handle = <&phy13>;
140 };
141 };
142
143 mdio@0 {
144 #address-cells = <1>;
145 #size-cells = <0>;
146 compatible = "lantiq,xrx200-mdio";
147 phy0: ethernet-phy@0 {
148 reg = <0x0>;
149 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
150 };
151 phy1: ethernet-phy@1 {
152 reg = <0x1>;
153 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
154 };
155 phy11: ethernet-phy@11 {
156 reg = <0x11>;
157 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
158 };
159 phy13: ethernet-phy@13 {
160 reg = <0x13>;
161 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
162 };
163 };
164 };
165
166 ifxhcd@E101000 {
167 status = "okay";
168 gpios = <&gpio 5 0
169 &gpio 14 0>;
170 lantiq,portmask = <0x3>;
171 };
172 };
173
174 spi {
175 #address-cells = <1>;
176 #size-cells = <1>;
177
178 compatible = "spi-gpio";
179
180 gpio-miso = <&gpio 16 0>;
181 gpio-mosi = <&gpio 17 0>;
182 gpio-sck = <&gpio 18 0>;
183 num-chipselects = <1>;
184 cs-gpios = <&gpio 10 1>;
185
186 m25p80@0 {
187 #address-cells = <1>;
188 #size-cells = <1>;
189 compatible = "jedec,spi-nor";
190 reg = <0 0>;
191 spi-max-frequency = <1000000>;
192
193 ath9k_cal: partition@0 {
194 reg = <0x0 0x20000>;
195 label = "urlader";
196 read-only;
197 };
198
199 partition@20000 {
200 reg = <0x20000 0x10000>;
201 label = "tffs (1)";
202 read-only;
203 };
204
205 partition@30000 {
206 reg = <0x30000 0x10000>;
207 label = "tffs (2)";
208 read-only;
209 };
210 };
211 };
212
213 ath9k_eep {
214 compatible = "ath9k,eeprom";
215 ath,eep-flash = <&ath9k_cal 0x985>;
216 ath,eep-endian;
217 ath,eep-swap;
218 };
219
220 gphy-xrx200 {
221 compatible = "lantiq,phy-xrx200";
222 firmware = "lantiq/vr9_phy11g_a1x.bin";
223 phys = [ 00 01 ];
224 };
225
226 gpio-keys-polled {
227 compatible = "gpio-keys-polled";
228 #address-cells = <1>;
229 #size-cells = <0>;
230 poll-interval = <100>;
231 power {
232 label = "power";
233 gpios = <&gpio 1 0>;
234 linux,code = <0x100>;
235 };
236 /* wifi {
237 label = "wifi";
238 gpios = <&gpio 29 0>;
239 linux,code = <0x101>;
240 };*/
241 };
242
243 gpio-leds {
244 compatible = "gpio-leds";
245
246 power: power {
247 label = "power";
248 gpios = <&gpio 32 1>;
249 };
250 power2: power2 {
251 label = "power2";
252 gpios = <&gpio 33 1>;
253 };
254 info_red {
255 label = "info_red";
256 gpios = <&gpio 34 1>;
257 };
258 wifi: wifi {
259 label = "wifi";
260 gpios = <&gpio 35 1>;
261 };
262 dsl: dsl {
263 label = "dsl";
264 gpios = <&gpio 36 1>;
265 };
266 lan {
267 label = "lan";
268 gpios = <&gpio 38 1>;
269 };
270 info_green: info_green {
271 label = "info_green";
272 gpios = <&gpio 47 1>;
273 };
274 };
275 };