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