c8e67537a94971ae8cab34fafb26b48948f77e0d
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / ar9_avm_fritz7312.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,fritz7312", "lantiq,xway", "lantiq,ar9";
8 model = "AVM FRITZ!Box 7312";
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 wlan {
34 label = "wlan";
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
48 power: power {
49 label = "green:power";
50 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
51 default-state = "keep";
52 };
53 voice {
54 label = "green:fon";
55 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
56 };
57 dect {
58 label = "green:dect";
59 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
60 };
61 wlan: wlan {
62 label = "green:wlan";
63 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
64 };
65 info_green: info_green {
66 label = "green:info";
67 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
68 };
69 };
70 };
71
72 &gpio {
73 pinctrl-names = "default";
74 pinctrl-0 = <&state_default>;
75
76 state_default: pinmux {
77 ar8030-intr {
78 lantiq,groups = "exin3";
79 lantiq,function = "exin";
80 lantiq,pull = <2>;
81 lantiq,output = <0>;
82 };
83 ar8030-clk {
84 lantiq,groups = "clkout2";
85 lantiq,output = <1>;
86 lantiq,open-drain;
87 };
88 ar8030-rst {
89 lantiq,pins = "io34";
90 lantiq,output = <1>;
91 lantiq,pull = <2>;
92 lantiq,open-drain;
93 };
94 };
95 };
96
97 &gsw {
98 phy-mode = "rmii";
99 phy-handle = <&phy0>;
100 nvmem-cells = <&macaddr_ath9k_cal_a91>;
101 nvmem-cell-names = "mac-address";
102 mac-address-increment = <(-2)>;
103
104 mdio-bus {
105 #address-cells = <1>;
106 #size-cells = <0>;
107
108 phy0: ethernet-phy@0 {
109 reg = <0>;
110 reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
111 max-speed = <100>;
112 };
113 };
114 };
115
116 &localbus {
117 flash@0 {
118 compatible = "lantiq,nor";
119 bank-width = <2>;
120 reg = <0 0x0 0x1000000>;
121
122 partitions {
123 compatible = "fixed-partitions";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 ath9k_cal: partition@0 {
128 label = "urlader";
129 reg = <0x00000 0x20000>;
130 read-only;
131 };
132
133 partition@20000 {
134 label = "firmware";
135 compatible = "openwrt,uimage", "denx,uimage";
136 reg = <0x20000 0xf60000>;
137 openwrt,ih-magic = <IH_MAGIC_OKLI>;
138 openwrt,offset = <0x11000>;
139 };
140
141 partition@f80000 {
142 label = "tffs (1)";
143 reg = <0xf80000 0x40000>;
144 read-only;
145 };
146
147 partition@fc0000 {
148 label = "tffs (2)";
149 reg = <0xfc0000 0x40000>;
150 read-only;
151 };
152 };
153 };
154 };
155
156 &pci0 {
157 status = "okay";
158
159 pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>,
160 <&pci_gnt3_pins>, <&pci_gnt4_pins>,
161 <&pci_req1_pins>, <&pci_req2_pins>,
162 <&pci_req4_pins>;
163 pinctrl-names = "default";
164
165 req-mask = <0xf>;
166 gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>;
167
168 wifi@0,0 {
169 compatible = "pci0,0";
170 reg = <0x7000 0 0 0 0>;
171 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
172 };
173 };
174
175 &ath9k_cal {
176 compatible = "nvmem-cells";
177 #address-cells = <1>;
178 #size-cells = <1>;
179
180 macaddr_ath9k_cal_a91: macaddr@a91 {
181 reg = <0xa91 0x6>;
182 };
183 };