ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_dlink_dwr-960.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "dlink,dwr-960", "ralink,mt7620a-soc";
10 model = "D-Link DWR-960";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27
28 wps {
29 label = "wps";
30 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_WPS_BUTTON>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_status: status {
39 label = "green:status";
40 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
41 };
42
43 wan {
44 label = "green:wan";
45 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
46 };
47
48 lan {
49 label = "green:lan";
50 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
51 };
52
53 sms {
54 label = "green:sms";
55 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
56 };
57
58 signal_green {
59 label = "green:signal";
60 gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
61 };
62
63 signal_red {
64 label = "red:signal";
65 gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
66 };
67
68 4g {
69 label = "green:4g";
70 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
71 };
72
73 3g {
74 label = "green:3g";
75 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
76 };
77
78 wlan5g {
79 label = "green:wlan5g";
80 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
81 linux,default-trigger = "phy0tpt";
82 };
83
84 wlan2g {
85 label = "green:wlan2g";
86 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
87 linux,default-trigger = "phy1tpt";
88 };
89 };
90 };
91
92 &ethernet {
93 pinctrl-names = "default";
94 pinctrl-0 = <&rgmii2_pins &mdio_pins>;
95
96 mediatek,portmap = "wllll";
97
98 port@5 {
99 status = "okay";
100 phy-mode = "rgmii-txid";
101 phy-handle = <&phy7>;
102 };
103
104 mdio-bus {
105 status = "okay";
106
107 phy7: ethernet-phy@7 {
108 reg = <7>;
109 phy-mode = "rgmii-id";
110 };
111 };
112 };
113
114 &gpio1 {
115 status = "okay";
116 };
117
118 &gpio2 {
119 status = "okay";
120 };
121
122 &gpio3 {
123 status = "okay";
124 };
125
126 &spi0 {
127 status = "okay";
128
129 flash@0 {
130 compatible = "jedec,spi-nor";
131 reg = <0>;
132 spi-max-frequency = <50000000>;
133
134 partitions {
135 compatible = "fixed-partitions";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 partition@0 {
140 label = "jboot";
141 reg = <0x0 0x10000>;
142 read-only;
143 };
144
145 partition@10000 {
146 compatible = "amit,jimage";
147 label = "firmware";
148 reg = <0x10000 0xfe0000>;
149 };
150
151 config: partition@ff0000 {
152 label = "config";
153 reg = <0xff0000 0x10000>;
154 read-only;
155 };
156 };
157 };
158 };
159
160 &ehci {
161 status = "okay";
162 };
163
164 &ohci {
165 status = "okay";
166 };
167
168 &pcie {
169 status = "okay";
170 };
171
172 &pcie0 {
173 wifi@0,0 {
174 compatible = "mediatek,mt76";
175 reg = <0x0000 0 0 0 0>;
176 ieee80211-freq-limit = <5000000 6000000>;
177 mediatek,mtd-eeprom = <&config 0xe08e>;
178 mtd-mac-address = <&config 0xe50e>;
179 mtd-mac-address-increment = <2>;
180 };
181 };
182
183 &state_default {
184 default {
185 groups = "i2c", "wled", "spi refclk", "uartf", "ephy";
186 function = "gpio";
187 };
188 };