ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wn-xx-xr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 label-mac-device = &wan;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 wps {
21 label = "green:wps";
22 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
23 };
24
25 led_power: power {
26 label = "green:power";
27 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
28 };
29 };
30
31 keys {
32 compatible = "gpio-keys";
33
34 reset {
35 label = "reset";
36 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39
40 repeater {
41 label = "repeater";
42 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
43 linux,code = <BTN_0>;
44 linux,input-type = <EV_SW>;
45 };
46
47 wps {
48 label = "wps";
49 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53 };
54
55 &nand {
56 status = "okay";
57
58 partitions: partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 label = "u-boot";
65 reg = <0x0 0x0100000>;
66 read-only;
67 };
68
69 partition@100000 {
70 label = "u-boot-env";
71 reg = <0x0100000 0x0100000>;
72 read-only;
73 };
74
75 factory: partition@200000 {
76 label = "factory";
77 reg = <0x0200000 0x0100000>;
78 };
79
80 partition@300000 {
81 label = "SecondBoot";
82 reg = <0x0300000 0x0100000>;
83 read-only;
84 };
85
86 partition@400000 {
87 label = "kernel";
88 reg = <0x0400000 0x0400000>;
89 };
90
91 partition@800000 {
92 label = "ubi";
93 reg = <0x0800000 0x2e00000>;
94 };
95
96 partition@3600000 {
97 label = "Config";
98 reg = <0x3600000 0x0100000>;
99 read-only;
100 };
101
102 partition@3700000 {
103 label = "firmware_2";
104 reg = <0x3700000 0x3200000>;
105 };
106
107 partition@6900000 {
108 label = "Config_2";
109 reg = <0x6900000 0x0100000>;
110 read-only;
111 };
112
113 partition@6a00000 {
114 label = "persist";
115 reg = <0x6a00000 0x0100000>;
116 };
117 };
118 };
119
120 &gmac0 {
121 mtd-mac-address = <&factory 0xe000>;
122 };
123
124 &switch0 {
125 ports {
126 wan: port@0 {
127 status = "okay";
128 label = "wan";
129 mtd-mac-address = <&factory 0xe006>;
130 };
131
132 port@1 {
133 status = "okay";
134 label = "lan4";
135 };
136
137 port@2 {
138 status = "okay";
139 label = "lan3";
140 };
141
142 port@3 {
143 status = "okay";
144 label = "lan2";
145 };
146
147 port@4 {
148 status = "okay";
149 label = "lan1";
150 };
151 };
152 };
153
154 &pcie {
155 status = "okay";
156 };
157
158 &state_default {
159 gpio {
160 groups = "uart2", "uart3", "wdt";
161 function = "gpio";
162 };
163 };
164
165 &xhci {
166 status = "disabled";
167 };