lantiq: convert mtd-mac-address to nvmem implementation
[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
5 / {
6 compatible = "avm,fritz7312", "lantiq,xway", "lantiq,ar9";
7 model = "AVM FRITZ!Box 7312";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
11 };
12
13 aliases {
14 led-boot = &power;
15 led-failsafe = &power;
16 led-running = &power;
17 led-upgrade = &power;
18
19 led-dsl = &info_green;
20 led-wifi = &wlan;
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x4000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <100>;
31
32 wlan {
33 label = "wlan";
34 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RFKILL>;
36 };
37 dect {
38 label = "dect";
39 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_PHONE>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46
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 };
69 };
70
71 &gpio {
72 pinctrl-names = "default";
73 pinctrl-0 = <&state_default>;
74
75 state_default: pinmux {
76 ar8030-intr {
77 lantiq,groups = "exin3";
78 lantiq,function = "exin";
79 lantiq,pull = <2>;
80 lantiq,output = <0>;
81 };
82 ar8030-clk {
83 lantiq,groups = "clkout2";
84 lantiq,output = <1>;
85 lantiq,open-drain;
86 };
87 ar8030-rst {
88 lantiq,pins = "io34";
89 lantiq,output = <1>;
90 lantiq,pull = <2>;
91 lantiq,open-drain;
92 };
93 };
94 };
95
96 &gsw {
97 phy-mode = "rmii";
98 phy-handle = <&phy0>;
99 nvmem-cells = <&macaddr_ath9k_cal_a91>;
100 nvmem-cell-names = "mac-address";
101 mac-address-increment = <(-2)>;
102
103 mdio-bus {
104 #address-cells = <1>;
105 #size-cells = <0>;
106
107 phy0: ethernet-phy@0 {
108 reg = <0>;
109 reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
110 max-speed = <100>;
111 };
112 };
113 };
114
115 &localbus {
116 flash@0 {
117 compatible = "lantiq,nor";
118 bank-width = <2>;
119 reg = <0 0x0 0x1000000>;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 ath9k_cal: partition@0 {
127 label = "urlader";
128 reg = <0x00000 0x20000>;
129 read-only;
130 };
131
132 partition@20000 {
133 label = "firmware";
134 reg = <0x20000 0xf60000>;
135 };
136
137 partition@f80000 {
138 label = "tffs (1)";
139 reg = <0xf80000 0x40000>;
140 read-only;
141 };
142
143 partition@fc0000 {
144 label = "tffs (2)";
145 reg = <0xfc0000 0x40000>;
146 read-only;
147 };
148 };
149 };
150 };
151
152 &pci0 {
153 status = "okay";
154
155 pinctrl-0 = <&pci_gnt1_pins>, <&pci_gnt2_pins>,
156 <&pci_gnt3_pins>, <&pci_gnt4_pins>,
157 <&pci_req1_pins>, <&pci_req2_pins>,
158 <&pci_req4_pins>;
159 pinctrl-names = "default";
160
161 req-mask = <0xf>;
162 gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>;
163
164 wifi@0,0 {
165 compatible = "pci0,0";
166 reg = <0x7000 0 0 0 0>;
167 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
168 };
169 };
170
171 &ath9k_cal {
172 compatible = "nvmem-cells";
173 #address-cells = <1>;
174 #size-cells = <1>;
175
176 macaddr_ath9k_cal_a91: macaddr@a91 {
177 reg = <0xa91 0x6>;
178 };
179 };