ramips: mt7621-dts: mux phy0/4 to gmac1
[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 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 label = "radio";
87 reg = <0x34000 0x4000>;
88 read-only;
89 };
90
91 factory: partition@38000 {
92 label = "factory";
93 reg = <0x38000 0x8000>;
94 read-only;
95 };
96
97 partition@40000 {
98 label = "defaults";
99 reg = <0x40000 0x10000>;
100 read-only;
101 };
102
103 partition@50000 {
104 compatible = "seama";
105 label = "firmware";
106 reg = <0x50000 0xfb0000>;
107 };
108 };
109 };
110 };
111
112 &gmac0 {
113 nvmem-cells = <&macaddr_radio_4>;
114 nvmem-cell-names = "mac-address";
115 };
116
117 &gmac1 {
118 status = "okay";
119 label = "wan";
120 phy-handle = <&ethphy0>;
121
122 nvmem-cells = <&macaddr_radio_4>;
123 nvmem-cell-names = "mac-address";
124 };
125
126 &mdio {
127 ethphy0: ethernet-phy@0 {
128 reg = <0>;
129 };
130 };
131
132 &switch0 {
133 ports {
134 port@1 {
135 status = "okay";
136 label = "lan4";
137 };
138
139 port@2 {
140 status = "okay";
141 label = "lan3";
142 };
143
144 port@3 {
145 status = "okay";
146 label = "lan2";
147 };
148
149 port@4 {
150 status = "okay";
151 label = "lan1";
152 };
153 };
154 };
155
156 &pcie {
157 status = "okay";
158
159 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
160 <&gpio 8 GPIO_ACTIVE_LOW>;
161 };
162
163 &pcie0 {
164 wifi0: mt76@0,0 {
165 reg = <0x0000 0 0 0 0>;
166 mediatek,mtd-eeprom = <&radio 0x2000>;
167 ieee80211-freq-limit = <5000000 6000000>;
168 };
169 };
170
171 &pcie1 {
172 wifi1: mt76@0,0 {
173 reg = <0x0000 0 0 0 0>;
174 mediatek,mtd-eeprom = <&radio 0x0>;
175 ieee80211-freq-limit = <2400000 2500000>;
176 };
177 };
178
179 &state_default {
180 gpio {
181 groups = "uart3", "jtag", "wdt";
182 function = "gpio";
183 };
184 };
185
186 &radio {
187 compatible = "nvmem-cells";
188 #address-cells = <1>;
189 #size-cells = <1>;
190
191 macaddr_radio_4: macaddr@4 {
192 reg = <0x4 0x6>;
193 };
194 };