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