ramips: add support for indicating the boot state using multiple leds
[openwrt/staging/mkresin.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-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 factory: partition@30000 {
36 reg = <0x30000 0x10000>;
37 label = "factory";
38 read-only;
39 };
40
41 partition@40000 {
42 reg = <0x40000 0x3c0000>;
43 label = "firmware";
44 };
45 };
46 };
47
48 gpio-leds {
49 compatible = "gpio-leds";
50
51 led_power: power {
52 label = "ar670w:green:power";
53 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
54 };
55
56 wpsblue {
57 label = "ar670w:blue:wps";
58 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
59 };
60 };
61
62 gpio-keys-polled {
63 compatible = "gpio-keys-polled";
64 poll-interval = <100>;
65
66 wps {
67 label = "wps";
68 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_WPS_BUTTON>;
70 };
71
72 reset {
73 label = "reset";
74 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RESTART>;
76 };
77 };
78 };
79
80 &gpio0 {
81 status = "okay";
82 };
83
84 &pinctrl {
85 state_default: pinctrl0 {
86 gpio {
87 ralink,group = "i2c", "spi", "uartlite";
88 ralink,function = "gpio";
89 };
90 };
91 };
92
93 &ethernet {
94 status = "okay";
95 mtd-mac-address = <&factory 0x2004>;
96
97 port@0 {
98 phy-handle = <&phy0>;
99 phy-mode = "mii";
100 };
101
102 mdio-bus {
103 status = "okay";
104
105 phy0: ethernet-phy@0 {
106 phy-mode = "mii";
107 reg = <0>;
108 };
109 };
110 };
111
112 &wmac {
113 status = "okay";
114 ralink,mtd-eeprom = <&factory 0x2000>;
115 };