ramips: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-860l-b1.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dir-860l-b1", "mediatek,mt7621-soc";
8 model = "D-Link DIR-860L B1";
9
10 aliases {
11 led-boot = &led_power_green;
12 led-failsafe = &led_power_green;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_green;
15 label-mac-device = &gmac0;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 power {
22 label = "orange:power";
23 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
24 };
25
26 led_power_green: power2 {
27 label = "green:power";
28 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
29 };
30
31 net {
32 label = "orange:net";
33 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
34 };
35
36 net2 {
37 label = "green:net";
38 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56 };
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <10000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x0 0x30000>;
75 read-only;
76 };
77
78 partition@30000 {
79 label = "u-boot-env";
80 reg = <0x30000 0x4000>;
81 read-only;
82 };
83
84 radio: partition@34000 {
85 label = "radio";
86 reg = <0x34000 0x4000>;
87 read-only;
88 };
89
90 factory: partition@38000 {
91 label = "factory";
92 reg = <0x38000 0x8000>;
93 read-only;
94 };
95
96 partition@40000 {
97 label = "defaults";
98 reg = <0x40000 0x10000>;
99 read-only;
100 };
101
102 partition@50000 {
103 compatible = "seama";
104 label = "firmware";
105 reg = <0x50000 0xfb0000>;
106 };
107 };
108 };
109 };
110
111 &gmac0 {
112 nvmem-cells = <&macaddr_radio_4>;
113 nvmem-cell-names = "mac-address";
114 };
115
116 &switch0 {
117 ports {
118 port@0 {
119 status = "okay";
120 label = "wan";
121 };
122
123 port@1 {
124 status = "okay";
125 label = "lan4";
126 };
127
128 port@2 {
129 status = "okay";
130 label = "lan3";
131 };
132
133 port@3 {
134 status = "okay";
135 label = "lan2";
136 };
137
138 port@4 {
139 status = "okay";
140 label = "lan1";
141 };
142 };
143 };
144
145 &pcie {
146 status = "okay";
147
148 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
149 <&gpio 8 GPIO_ACTIVE_LOW>;
150 };
151
152 &pcie0 {
153 wifi0: mt76@0,0 {
154 reg = <0x0000 0 0 0 0>;
155 mediatek,mtd-eeprom = <&radio 0x2000>;
156 ieee80211-freq-limit = <5000000 6000000>;
157 };
158 };
159
160 &pcie1 {
161 wifi1: mt76@0,0 {
162 reg = <0x0000 0 0 0 0>;
163 mediatek,mtd-eeprom = <&radio 0x0>;
164 ieee80211-freq-limit = <2400000 2500000>;
165 };
166 };
167
168 &state_default {
169 gpio {
170 groups = "uart3", "jtag", "wdt";
171 function = "gpio";
172 };
173 };
174
175 &radio {
176 compatible = "nvmem-cells";
177 #address-cells = <1>;
178 #size-cells = <1>;
179
180 macaddr_radio_4: macaddr@4 {
181 reg = <0x4 0x6>;
182 };
183 };