ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / AR725W.dts
1 /dts-v1/;
2
3 #include "rt2880.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "airlink101,ar725w", "ralink,rt2880-soc";
10         model = "Airlink101 AR725W";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         cfi@bdc00000 {
20                 compatible = "cfi-flash";
21                 reg = <0xbc400000 0x800000>;
22                 bank-width = <2>;
23
24                 partitions {
25                         compatible = "fixed-partitions";
26                         #address-cells = <1>;
27                         #size-cells = <1>;
28
29                         partition@0 {
30                                 reg = <0x0 0x30000>;
31                                 label = "u-boot";
32                                 read-only;
33                         };
34
35                         partition@30000 {
36                                 reg = <0x30000 0x10000>;
37                                 label = "u-boot-env";
38                         };
39
40                         factory: partition@40000 {
41                                 reg = <0x40000 0x10000>;
42                                 label = "factory";
43                                 read-only;
44                         };
45
46                         partition@50000 {
47                                 reg = <0x50000 0x3B0000>;
48                                 label = "firmware";
49                         };
50                 };
51         };
52
53         gpio-leds {
54                 compatible = "gpio-leds";
55
56                 led_power: power {
57                         label = "ar725w:green:power";
58                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
59                 };
60
61                 wpsred {
62                         label = "ar725w:red:wps";
63                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
64                 };
65
66                 wpsblue {
67                         label = "ar725w:blue:wps";
68                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
69                 };
70         };
71
72         gpio-keys-polled {
73                 compatible = "gpio-keys-polled";
74                 poll-interval = <100>;
75
76                 wps {
77                         label = "wps";
78                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
79                         linux,code = <KEY_WPS_BUTTON>;
80                 };
81
82                 reset {
83                         label = "reset";
84                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
85                         linux,code = <KEY_RESTART>;
86                 };
87         };
88 };
89
90 &gpio0 {
91         status = "okay";
92 };
93
94 &pinctrl {
95         state_default: pinctrl0 {
96                 gpio {
97                         ralink,group = "i2c", "spi", "uartlite";
98                         ralink,function = "gpio";
99                 };
100         };
101 };
102
103 &ethernet {
104         status = "okay";
105         mtd-mac-address = <&factory 0x4>;
106
107         port@0 {
108                 phy-handle = <&phy0>;
109                 phy-mode = "mii";
110         };
111
112         mdio-bus {
113                 status = "okay";
114
115                 phy0: ethernet-phy@0 {
116                         phy-mode = "mii";
117                         reg = <0>;
118                 };
119         };
120 };
121
122 &wmac {
123         status = "okay";
124         ralink,mtd-eeprom = <&factory 0>;
125 };