ramips: fix LAN LED trigger assignment for Xiaomi Router 3 Pro
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_dlink_dwr-512-b.dts
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dwr-512-b", "ralink,rt5350-soc";
8 model = "D-Link DWR-512 B";
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-polled";
19 poll-interval = <20>;
20
21 wps {
22 label = "wps";
23 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_WPS_BUTTON>;
25 };
26
27 reset {
28 label = "reset";
29 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 sms {
38 label = "green:sms";
39 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
40 };
41 led_status: status {
42 label = "green:status";
43 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
44 };
45 2g {
46 label = "green:2g";
47 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
48 };
49 3g {
50 label = "green:3g";
51 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
52 };
53 sstrengthr {
54 label = "red:sigstrength";
55 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
56 };
57 sstrengthg {
58 label = "green:sigstrength";
59 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
60 };
61 };
62
63 gpio-export {
64 compatible = "gpio-export";
65 #size-cells = <0>;
66
67 slic_int {
68 gpio-export,name = "slic_int";
69 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
70 };
71 modem3g_enable {
72 gpio-export,name = "modem3g_enable";
73 gpio-export,output = <1>;
74 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
75 };
76 };
77 };
78
79 &spi0 {
80 status = "okay";
81
82 flash@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <30000000>;
86 m25p,fast-read;
87
88 partitions {
89 compatible = "fixed-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 partition@0 {
94 label = "jboot";
95 reg = <0x0 0x10000>;
96 read-only;
97 };
98
99 partition@10000 {
100 compatible = "amit,jimage";
101 label = "firmware";
102 reg = <0x10000 0x7e0000>;
103 };
104
105 config: partition@7f0000 {
106 label = "config";
107 reg = <0x7f0000 0x10000>;
108 };
109 };
110 };
111 };
112
113 &spi1 {
114 status = "okay";
115
116 spidev@0 {
117 #address-cells = <1>;
118 #size-cells = <1>;
119 compatible = "siliconlabs,si3210";
120
121 reg = <0>;
122 spi-max-frequency = <1000000>;
123 };
124 };
125
126 &state_default {
127 gpio {
128 groups = "i2c", "jtag", "uartf";
129 function = "gpio";
130 };
131 };
132
133 &esw {
134 mediatek,portmap = <0x2f>;
135 };
136
137 &ethernet {
138 mtd-mac-address = <&config 0xe07e>;
139 };
140
141 &wmac {
142 ralink,mtd-eeprom = <&config 0xe08a>;
143 ralink,led-polarity = <1>;
144 mtd-mac-address = <&config 0xe07e>;
145 };