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