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