cd7b29ca6d1d604ad1bdfdf633a3148c3d327cf9
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / ar9_avm_fritz7320.dts
1 #include "ar9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/mtd/partitions/uimage.h>
5
6 / {
7 compatible = "avm,fritz7320", "lantiq,xway", "lantiq,ar9";
8 model = "AVM FRITZ!Box 7320";
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power;
16 led-failsafe = &power;
17 led-running = &power;
18 led-upgrade = &power;
19
20 led-dsl = &info_green;
21 led-wifi = &wlan;
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x4000000>;
27 };
28
29 keys {
30 compatible = "gpio-keys-polled";
31 poll-interval = <100>;
32
33 rfkill {
34 label = "rfkill";
35 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RFKILL>;
37 };
38 dect {
39 label = "dect";
40 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_PHONE>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47 power: power {
48 label = "green:power";
49 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
50 default-state = "keep";
51 };
52 voice {
53 label = "green:fon";
54 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
55 };
56 dect {
57 label = "green:dect";
58 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
59 };
60 wlan: wlan {
61 label = "green:wlan";
62 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
63 };
64 info_green: info_green {
65 label = "green:info";
66 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
67 };
68 info_red {
69 label = "red:info";
70 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
71 };
72 };
73
74 usb0_vbus: regulator-usb0-vbus {
75 compatible = "regulator-fixed";
76
77 regulator-name = "USB0_VBUS";
78
79 regulator-min-microvolt = <5000000>;
80 regulator-max-microvolt = <5000000>;
81
82 gpio = <&gpio 50 GPIO_ACTIVE_HIGH>;
83 enable-active-high;
84 };
85
86 usb1_vbus: regulator-usb1-vbus {
87 compatible = "regulator-fixed";
88
89 regulator-name = "USB1_VBUS";
90
91 regulator-min-microvolt = <5000000>;
92 regulator-max-microvolt = <5000000>;
93
94 gpio = <&gpio 51 GPIO_ACTIVE_HIGH>;
95 enable-active-high;
96 };
97 };
98
99 &gsw {
100 phy-mode = "mii";
101 phy-handle = <&phy0>;
102 nvmem-cells = <&macaddr_ath9k_cal_a91>;
103 nvmem-cell-names = "mac-address";
104 mac-address-increment = <(-2)>;
105
106 mdio-bus {
107 #address-cells = <1>;
108 #size-cells = <0>;
109
110 phy0: ethernet-phy@0 {
111 reg = <0>;
112 reset-gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
113 };
114 };
115 };
116
117 &gpio {
118 pinctrl-names = "default";
119 pinctrl-0 = <&state_default>;
120
121 state_default: pinmux {
122 phy-rst {
123 lantiq,pins = "io36";
124 lantiq,pull = <0>;
125 lantiq,open-drain;
126 lantiq,output = <1>;
127 };
128 usb0_vbus {
129 lantiq,pins = "io50";
130 lantiq,pull = <0>;
131 lantiq,open-drain = <0>;
132 lantiq,output = <1>;
133 };
134 usb1_vbus {
135 lantiq,pins = "io51";
136 lantiq,pull = <0>;
137 lantiq,open-drain = <0>;
138 lantiq,output = <1>;
139 };
140 };
141 };
142
143 &localbus {
144 flash@0 {
145 compatible = "lantiq,nor";
146 bank-width = <2>;
147 reg = <0 0x0 0x1000000>;
148
149 partitions {
150 compatible = "fixed-partitions";
151 #address-cells = <1>;
152 #size-cells = <1>;
153
154 ath9k_cal: partition@0 {
155 label = "urlader";
156 reg = <0x00000 0x20000>;
157 read-only;
158 };
159
160 partition@20000 {
161 compatible = "openwrt,uimage", "denx,uimage";
162 label = "firmware";
163 reg = <0x20000 0xf60000>;
164 openwrt,ih-magic = <IH_MAGIC_OKLI>;
165 openwrt,offset = <0x11000>;
166 };
167
168 partition@f80000 {
169 label = "tffs (1)";
170 reg = <0xf80000 0x40000>;
171 read-only;
172 };
173
174 partition@fc0000 {
175 label = "tffs (2)";
176 reg = <0xfc0000 0x40000>;
177 read-only;
178 };
179 };
180 };
181 };
182
183 &pci0 {
184 status = "okay";
185
186 pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>,
187 <&pci_gnt3_pins>, <&pci_gnt4_pins>,
188 <&pci_req1_pins>, <&pci_req2_pins>,
189 <&pci_req3_pins>, <&pci_req4_pins>;
190
191 req-mask = <0xf>;
192 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
193
194 wifi@0,0 {
195 compatible = "pci0,0";
196 reg = <0x7000 0 0 0 0>;
197 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
198 };
199 };
200
201 &usb_phy0 {
202 status = "okay";
203 };
204
205 &usb_phy1 {
206 status = "okay";
207 };
208
209 &usb0 {
210 status = "okay";
211 vbus-supply = <&usb0_vbus>;
212 };
213
214 &usb1 {
215 status = "okay";
216 vbus-supply = <&usb1_vbus>;
217 };
218
219 &ath9k_cal {
220 compatible = "nvmem-cells";
221 #address-cells = <1>;
222 #size-cells = <1>;
223
224 macaddr_ath9k_cal_a91: macaddr@a91 {
225 reg = <0xa91 0x6>;
226 };
227 };