290638f7355f1f18db604e36b5cd4a95a17febf3
[openwrt/staging/hauke.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 /* 5 GHz (phy1) does not take the address from calibration data,
99 but setting it manually here works */
100 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
101 nvmem-cell-names = "eeprom", "mac-address";
102 };
103 };
104
105 &gmac0 {
106 nvmem-cells = <&macaddr_factory_4>;
107 nvmem-cell-names = "mac-address";
108 mac-address-increment = <(-1)>;
109 };
110
111 &gmac1 {
112 status = "okay";
113 label = "wan";
114 phy-handle = <&ethphy4>;
115
116 nvmem-cells = <&macaddr_factory_4>;
117 nvmem-cell-names = "mac-address";
118 mac-address-increment = <(-2)>;
119 };
120
121 &mdio {
122 ethphy4: ethernet-phy@4 {
123 reg = <4>;
124 };
125 };
126
127 &switch0 {
128 ports {
129 port@0 {
130 status = "okay";
131 label = "lan4";
132 };
133
134 port@1 {
135 status = "okay";
136 label = "lan3";
137 };
138
139 port@2 {
140 status = "okay";
141 label = "lan2";
142 };
143
144 port@3 {
145 status = "okay";
146 label = "lan1";
147 };
148 };
149 };
150
151 &state_default {
152 gpio {
153 groups = "i2c", "uart3", "uart2", "jtag", "wdt";
154 function = "gpio";
155 };
156 };