ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_gnubee_gb-pc2.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
8 model = "GB-PC2";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 system {
31 label = "green:system";
32 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
33 };
34
35 led_status: status {
36 label = "green:status";
37 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
38 };
39
40 lan1 {
41 label = "green:lan1";
42 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
43 };
44
45 lan2 {
46 label = "green:lan2";
47 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
48 };
49
50 lan3-yellow {
51 label = "yellow:lan3";
52 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
53 };
54
55 lan3-green {
56 label = "green:lan3";
57 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
58 };
59 };
60 };
61
62 &sdhci {
63 status = "okay";
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <80000000>;
73 broken-flash-reset;
74 m25p,fast-read;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "u-boot-env";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x10000>;
96 read-only;
97 };
98
99 partition@50000 {
100 compatible = "denx,uimage";
101 label = "firmware";
102 reg = <0x50000 0x1fb0000>;
103 };
104 };
105 };
106 };
107
108 &pcie {
109 status = "okay";
110 };
111
112 &gmac0 {
113 mtd-mac-address = <&factory 0xe000>;
114 };
115
116 &switch0 {
117 ports {
118 port@0 {
119 status = "okay";
120 label = "lan1";
121 };
122
123 port@4 {
124 status = "okay";
125 label = "lan2";
126 };
127 };
128 };
129
130 &state_default {
131 gpio {
132 groups = "jtag", "rgmii2", "uart3", "wdt";
133 function = "gpio";
134 };
135 };