9e15485d3fd135c818bf3bac50e7df504b20bd50
[openwrt/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 = "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 0 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 modem3g_enable {
65 gpio-export,name = "modem3g_enable";
66 gpio-export,output = <1>;
67 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
68 };
69 };
70 };
71
72 &spi0 {
73 status = "okay";
74
75 mx25l6405d@0 {
76 #address-cells = <1>;
77 #size-cells = <1>;
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <30000000>;
81 m25p,fast-read;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x0 0x30000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x30000 0x20000>;
92 read-only;
93 };
94
95 partition@50000 {
96 label = "firmware";
97 reg = <0x50000 0x7a0000>;
98 };
99
100 config: partition@7f0000 {
101 label = "config";
102 reg = <0x7f0000 0x10000>;
103 };
104 };
105 };
106
107 &spi1 {
108 status = "okay";
109
110 spidev@1 {
111 #address-cells = <1>;
112 #size-cells = <1>;
113 compatible = "siliconlabs,si3210";
114
115 reg = <0>;
116 spi-max-frequency = <1000000>;
117 };
118 };
119
120 &pinctrl {
121 state_default: pinctrl0 {
122 gpio {
123 ralink,group = "i2c", "jtag", "uartf";
124 ralink,function = "gpio";
125 };
126 };
127 };
128
129 &esw {
130 mediatek,portmap = <0x2f>;
131 };
132
133 &ethernet {
134 mtd-mac-address = <&config 0xe07e>;
135 };
136
137 &wmac {
138 ralink,mtd-eeprom = <&config 0xe08a>;
139 ralink,led-polarity = <1>;
140 mtd-mac-address = <&config 0xe07e>;
141 };