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