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