ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_adslr_g7.dts
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 compatible = "adslr,g7", "mediatek,mt7621-soc";
10 model = "ADSLR G7";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_sys: sys {
24 label = "blue:sys";
25 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
26 };
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39 };
40
41 &spi0 {
42 status = "okay";
43
44 flash@0 {
45 compatible = "jedec,spi-nor";
46 reg = <0>;
47 spi-max-frequency = <40000000>;
48
49 partitions {
50 compatible = "fixed-partitions";
51 #address-cells = <1>;
52 #size-cells = <1>;
53
54 partition@0 {
55 label = "u-boot";
56 reg = <0x0 0x30000>;
57 read-only;
58 };
59
60 partition@30000 {
61 label = "u-boot-env";
62 reg = <0x30000 0x10000>;
63 read-only;
64 };
65
66 factory: partition@40000 {
67 label = "factory";
68 reg = <0x40000 0x10000>;
69 read-only;
70 };
71
72 partition@50000 {
73 compatible = "denx,uimage";
74 label = "firmware";
75 reg = <0x50000 0xfb0000>;
76 };
77 };
78 };
79 };
80
81 &pcie {
82 status = "okay";
83 };
84
85 &pcie0 {
86 wifi@0,0 {
87 compatible = "mediatek,mt76";
88 reg = <0x0000 0 0 0 0>;
89 mediatek,mtd-eeprom = <&factory 0x0000>;
90 ieee80211-freq-limit = <2400000 2500000>;
91 };
92 };
93
94 &pcie1 {
95 wifi@0,0 {
96 compatible = "mediatek,mt76";
97 reg = <0x0000 0 0 0 0>;
98 mediatek,mtd-eeprom = <&factory 0x8000>;
99 ieee80211-freq-limit = <5000000 6000000>;
100 };
101 };
102
103 &gmac0 {
104 mtd-mac-address = <&factory 0xe00c>;
105 };
106
107 &switch0 {
108 ports {
109 port@0 {
110 status = "okay";
111 label = "lan1";
112 };
113
114 port@1 {
115 status = "okay";
116 label = "lan2";
117 };
118
119 port@2 {
120 status = "okay";
121 label = "lan3";
122 };
123
124 port@3 {
125 status = "okay";
126 label = "lan4";
127 };
128
129 port@4 {
130 status = "okay";
131 label = "wan";
132 mtd-mac-address = <&factory 0xe00c>;
133 mtd-mac-address-increment = <1>;
134 };
135 };
136 };
137
138 &state_default {
139 gpio {
140 groups = "i2c", "uart3", "wdt";
141 function = "gpio";
142 };
143 };