ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_elecom_wrh-300cr.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
8 model = "ELECOM WRH-300CR";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_wps: wps {
21 label = "green:wps";
22 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
23 };
24
25 ethernet {
26 label = "green:ethernet";
27 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
28 };
29
30 wlan {
31 label = "green:wlan";
32 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44
45 wps {
46 label = "wps";
47 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 };
51 };
52
53 &gpio2 {
54 status = "okay";
55 };
56
57 &gpio3 {
58 status = "okay";
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <10000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x0 0x30000>;
77 read-only;
78 };
79
80 partition@30000 {
81 label = "u-boot-env";
82 reg = <0x30000 0x10000>;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 label = "recover";
93 reg = <0x50000 0x1c0000>;
94 read-only;
95 };
96
97 partition@210000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x210000 0xdf0000>;
101 };
102 };
103 };
104 };
105
106 &ehci {
107 status = "okay";
108 };
109
110 &ohci {
111 status = "okay";
112 };
113
114 &ethernet {
115 mtd-mac-address = <&factory 0x2e>;
116
117 mediatek,portmap = "llllw";
118 };
119
120 &wmac {
121 ralink,mtd-eeprom = <&factory 0x0>;
122 };
123
124 &state_default {
125 default {
126 groups = "i2c", "ephy", "wled";
127 function = "gpio";
128 };
129 };