tools/patchelf: update to 0.18.0
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7621_dlink_dir-853-r1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include "mt7621_dlink_flash-16m-r1.dtsi"
6
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9
10 / {
11 compatible = "dlink,dir-853-r1", "mediatek,mt7621-soc";
12 model = "D-Link DIR-853 R1";
13
14 aliases {
15 label-mac-device = &gmac1;
16
17 led-boot = &led_power_orange;
18 led-failsafe = &led_power_blue;
19 led-running = &led_power_blue;
20 led-upgrade = &led_net_orange;
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power_orange: power_orange {
27 label = "orange:power";
28 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
29 };
30
31 led_power_blue: power_blue {
32 label = "blue:power";
33 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
34 };
35
36 led_net_orange: net_orange {
37 label = "orange:net";
38 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
39 };
40
41 net_blue {
42 label = "blue:net";
43 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
44 };
45
46 usb_blue {
47 label = "blue:usb";
48 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
49 trigger-sources = <&xhci_ehci_port1>;
50 linux,default-trigger = "usbport";
51 };
52
53 wlan2g {
54 label = "blue:wlan2g";
55 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
56 linux,default-trigger = "phy0radio";
57 };
58
59 wlan5g {
60 label = "blue:wlan5g";
61 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
62 linux,default-trigger = "phy1radio";
63 };
64 };
65
66 keys {
67 compatible = "gpio-keys";
68
69 reset {
70 label = "reset";
71 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
72 linux,code = <KEY_RESTART>;
73 };
74
75 wps {
76 label = "wps";
77 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_WPS_BUTTON>;
79 };
80
81 wifi {
82 label = "wifi";
83 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
84 linux,code = <KEY_RFKILL>;
85 };
86 };
87 };
88
89 &pcie {
90 status = "okay";
91 };
92
93 &pcie0 {
94 wifi@0,0 {
95 compatible = "mediatek,mt76";
96 reg = <0x0000 0 0 0 0>;
97
98 mediatek,mtd-eeprom = <&factory 0x0>;
99
100 /* 5 GHz (phy1) does not take the address from calibration data,
101 but setting it manually here works */
102 nvmem-cells = <&macaddr_factory_4>;
103 nvmem-cell-names = "mac-address";
104 };
105 };
106
107 &gmac0 {
108 nvmem-cells = <&macaddr_factory_4>;
109 nvmem-cell-names = "mac-address";
110 mac-address-increment = <(-1)>;
111 };
112
113 &gmac1 {
114 status = "okay";
115 label = "wan";
116 phy-handle = <&ethphy4>;
117
118 nvmem-cells = <&macaddr_factory_4>;
119 nvmem-cell-names = "mac-address";
120 mac-address-increment = <(-2)>;
121 };
122
123 &mdio {
124 ethphy4: ethernet-phy@4 {
125 reg = <4>;
126 };
127 };
128
129 &switch0 {
130 ports {
131 port@0 {
132 status = "okay";
133 label = "lan4";
134 };
135
136 port@1 {
137 status = "okay";
138 label = "lan3";
139 };
140
141 port@2 {
142 status = "okay";
143 label = "lan2";
144 };
145
146 port@3 {
147 status = "okay";
148 label = "lan1";
149 };
150 };
151 };
152
153 &state_default {
154 gpio {
155 groups = "i2c", "uart3", "uart2", "jtag", "wdt";
156 function = "gpio";
157 };
158 };
159
160 &factory {
161 compatible = "nvmem-cells";
162 #address-cells = <1>;
163 #size-cells = <1>;
164
165 macaddr_factory_4: macaddr@4 {
166 reg = <0x4 0x6>;
167 };
168 };