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