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