ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / rt2880_dlink_dap-1522-a1.dts
1 #include "rt2880.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dap-1522-a1", "ralink,rt2880-soc";
8 model = "D-Link DAP-1522 A1";
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 flash@bc400000 {
18 compatible = "cfi-flash";
19 reg = <0xbc400000 0x800000>;
20 bank-width = <2>;
21 device-width = <2>;
22
23 partitions {
24 compatible = "fixed-partitions";
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 label = "uboot";
30 reg = <0x0 0x30000>;
31 read-only;
32 };
33
34 factory: partition@30000 {
35 label = "factory";
36 reg = <0x30000 0x10000>;
37 read-only;
38 };
39
40 partition@40000 {
41 compatible = "wrg";
42 label = "firmware";
43 reg = <0x40000 0x3a0000>;
44 };
45 };
46 };
47
48 rtl8366s {
49 compatible = "realtek,rtl8366s";
50 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
51 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
52 };
53
54 keys {
55 compatible = "gpio-keys-polled";
56 poll-interval = <100>;
57
58 reset {
59 label = "reset";
60 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_RESTART>;
62 };
63
64 wps {
65 label = "wps";
66 gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_WPS_BUTTON>;
68 };
69
70 ap {
71 label = "ap";
72 gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
73 linux,code = <BTN_0>;
74 linux,input-type = <EV_SW>;
75 };
76
77 bridge {
78 label = "bridge";
79 gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
80 linux,code = <BTN_1>;
81 linux,input-type = <EV_SW>;
82 };
83 };
84
85 leds {
86 compatible = "gpio-leds";
87
88 wps {
89 label = "blue:wps";
90 gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
91 };
92
93 ap {
94 label = "blue:ap";
95 gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
96 };
97
98 sta {
99 label = "red:sta";
100 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
101 };
102
103 led_status: status {
104 label = "blue:status";
105 gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
106 };
107 };
108 };
109
110 &gpio2 {
111 status = "okay";
112 };
113
114 &state_default {
115 gpio {
116 groups = "i2c", "uartlite", "pci";
117 function = "gpio";
118 };
119 };
120
121 &ethernet {
122 status = "okay";
123 mtd-mac-address = <&factory 0x2004>;
124
125 port@0 {
126 mediatek,fixed-link = <1000 1 1 1>;
127 };
128
129 mdio-bus {
130 status = "okay";
131
132 phy0: ethernet-phy@0 {
133 phy-mode = "mii";
134 reg = <0>;
135 };
136 };
137 };
138
139 &wmac {
140 ralink,mtd-eeprom = <&factory 0x2000>;
141 };