ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_glinet_gl-mt300n-v2.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 /{
7 compatible = "glinet,gl-mt300n-v2", "mediatek,mt7628an-soc";
8 model = "GL-MT300N-V2";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 label-mac-device = &ethernet;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_power: power {
26 label = "green:power";
27 default-state = "on";
28 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
29 };
30
31 wan {
32 label = "green:wan";
33 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
34 };
35
36 wlan {
37 label = "red:wlan";
38 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 BTN_0 {
52 label = "BTN_0";
53 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
54 linux,code = <BTN_0>;
55 };
56
57 BTN_1 {
58 label = "BTN_1";
59 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_1>;
61 };
62 };
63
64 gpio_export {
65 compatible = "gpio-export";
66 #size-cells = <0>;
67
68 usb {
69 gpio-export,name = "usb";
70 gpio-export,output = <1>;
71 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
72 };
73 };
74 };
75
76 &state_default {
77 gpio {
78 groups = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
79 function = "gpio";
80 };
81 };
82
83 &ethernet {
84 mtd-mac-address = <&factory 0x4>;
85 };
86
87 &wmac {
88 status = "okay";
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <10000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0xfb0000>;
126 };
127 };
128 };
129 };
130
131 &uart1 {
132 status = "okay";
133 };