aa9ee8a8903a31eb69000b9c0d49da1d9d742265
[openwrt/staging/mkresin.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / FRITZ7312.dts
1 /dts-v1/;
2
3 #include "ar9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "avm,fritz7312", "lantiq,xway", "lantiq,ar9";
9 model = "AVM FRITZ!Box 7312";
10
11 chosen {
12 bootargs = "console=ttyLTQ0,115200";
13 };
14
15 aliases {
16 led-boot = &power;
17 led-failsafe = &power;
18 led-running = &power;
19 led-upgrade = &power;
20
21 led-internet = &info_green;
22 led-dsl = &power;
23 led-wifi = &wlan;
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x4000000>;
29 };
30
31 gpio-keys-polled {
32 compatible = "gpio-keys-polled";
33 #address-cells = <1>;
34 #size-cells = <0>;
35 poll-interval = <100>;
36
37 wlan {
38 label = "wlan";
39 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RFKILL>;
41 };
42 dect {
43 label = "dect";
44 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_PHONE>;
46 };
47 };
48
49 gpio-leds {
50 compatible = "gpio-leds";
51
52 power: power {
53 label = "fritz7312:green:power";
54 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
55 default-state = "keep";
56 };
57 voice {
58 label = "fritz7312:green:fon";
59 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
60 };
61 dect {
62 label = "fritz7312:green:dect";
63 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
64 };
65 wlan: wlan {
66 label = "fritz7312:green:wlan";
67 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
68 };
69 info_green: info_green {
70 label = "fritz7312:green:info";
71 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
72 };
73 };
74 };
75
76 &gpio {
77 pinctrl-names = "default";
78 pinctrl-0 = <&state_default>;
79
80 state_default: pinmux {
81 pci {
82 lantiq,groups = "gnt1", "req1", "req2", "req4", "gnt2", "gnt3", "gnt4";
83 lantiq,function = "pci";
84 };
85 pci-in {
86 lantiq,groups = "req1", "req2", "req4";
87 lantiq,output = <0>;
88 lantiq,open-drain = <1>;
89 lantiq,pull = <2>;
90 };
91 pci-out {
92 lantiq,groups = "gnt1", "gnt2", "gnt3", "gnt4";
93 lantiq,output = <1>;
94 lantiq,pull = <0>;
95 };
96 ar8030-intr {
97 lantiq,groups = "exin3";
98 lantiq,function = "exin";
99 lantiq,pull = <2>;
100 lantiq,output = <0>;
101 };
102 ar8030-clk {
103 lantiq,groups = "clkout2";
104 lantiq,output = <1>;
105 lantiq,open-drain;
106 };
107 ar8030-rst {
108 lantiq,pins = "io34";
109 lantiq,output = <1>;
110 lantiq,pull = <2>;
111 lantiq,open-drain;
112 };
113 };
114 };
115
116 &gsw {
117 phy-mode = "rmii";
118 phy-handle = <&phy0>;
119 mtd-mac-address = <&ath9k_cal 0xa91>;
120 mtd-mac-address-increment = <(-2)>;
121
122 mdio-bus {
123 #address-cells = <1>;
124 #size-cells = <0>;
125
126 phy0: ethernet-phy@0 {
127 reg = <0>;
128 reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
129 };
130 };
131 };
132
133 &localbus {
134 nor@0 {
135 compatible = "lantiq,nor";
136 bank-width = <2>;
137 reg = <0 0x0 0x1000000>;
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 partitions {
142 compatible = "fixed-partitions";
143 #address-cells = <1>;
144 #size-cells = <1>;
145
146 ath9k_cal: partition@0 {
147 label = "urlader";
148 reg = <0x00000 0x20000>;
149 read-only;
150 };
151
152 partition@20000 {
153 label = "firmware";
154 reg = <0x20000 0xf60000>;
155 };
156
157 partition@f80000 {
158 label = "tffs (1)";
159 reg = <0xf80000 0x40000>;
160 read-only;
161 };
162
163 partition@fc0000 {
164 label = "tffs (2)";
165 reg = <0xfc0000 0x40000>;
166 read-only;
167 };
168 };
169 };
170 };
171
172 &pci0 {
173 status = "okay";
174 req-mask = <0xf>;
175 gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>;
176
177 wifi@0,0 {
178 compatible = "pci0,0";
179 reg = <0x7000 0 0 0 0>;
180 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
181 };
182 };