ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / AR670W.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,ar670w", "ralink,rt2880-soc";
10 model = "Airlink101 AR670W";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 cfi@bdc00000 {
17 compatible = "cfi-flash";
18 reg = <0xbc400000 0x800000>;
19 bank-width = <2>;
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 u-boot@0 {
24 reg = <0x0 0x30000>;
25 label = "u-boot";
26 read-only;
27 };
28
29 factory: factory@30000 {
30 reg = <0x30000 0x10000>;
31 label = "factory";
32 read-only;
33 };
34
35 firmware@40000 {
36 reg = <0x40000 0x3c0000>;
37 label = "firmware";
38 };
39 };
40
41 gpio-leds {
42 compatible = "gpio-leds";
43
44 led_power: power {
45 label = "ar670w:green:power";
46 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
47 };
48
49 wpsblue {
50 label = "ar670w:blue:wps";
51 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
52 };
53 };
54
55 gpio-keys-polled {
56 compatible = "gpio-keys-polled";
57 #address-cells = <1>;
58 #size-cells = <0>;
59 poll-interval = <100>;
60
61 wps {
62 label = "wps";
63 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_WPS_BUTTON>;
65 };
66
67 reset {
68 label = "reset";
69 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_RESTART>;
71 };
72 };
73 };
74
75 &gpio0 {
76 status = "okay";
77 };
78
79 &pinctrl {
80 state_default: pinctrl0 {
81 gpio {
82 ralink,group = "i2c", "spi", "uartlite";
83 ralink,function = "gpio";
84 };
85 };
86 };
87
88 &ethernet {
89 status = "okay";
90 mtd-mac-address = <&factory 0x2004>;
91
92 port@0 {
93 phy-handle = <&phy0>;
94 phy-mode = "mii";
95 };
96
97 mdio-bus {
98 status = "okay";
99
100 phy0: ethernet-phy@0 {
101 phy-mode = "mii";
102 reg = <0>;
103 };
104 };
105 };
106
107 &wmac {
108 status = "okay";
109 ralink,mtd-eeprom = <&factory 0x2000>;
110 };