ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WN3000RPV3.dts
1 /* This file is released into the public domain */
2
3 /dts-v1/;
4
5 #include "mt7620a.dtsi"
6
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/gpio/gpio.h>
9
10 / {
11 compatible = "netgear,wn3000rp-v3", "ralink,mt7620a-soc";
12 model = "Netgear WN3000RPv3";
13
14 aliases {
15 led-status = &led_power_green;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,57600";
20 };
21
22 gpio-leds {
23 compatible = "gpio-leds";
24
25 led_power_green: power_g {
26 label = "wn3000rpv3:green:power";
27 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
28 default-state = "on";
29 };
30
31 power_r {
32 label = "wn3000rpv3:red:power";
33 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
34 };
35
36 client_g {
37 label = "wn3000rpv3:green:client";
38 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
39 };
40
41 client_r {
42 label = "wn3000rpv3:red:client";
43 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
44 };
45
46 router_g {
47 label = "wn3000rpv3:green:router";
48 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
49 };
50
51 router_r {
52 label = "wn3000rpv3:red:router";
53 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
54 };
55
56 wps {
57 label = "wn3000rpv3:green:wps";
58 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
59 };
60
61 l_arrow {
62 label = "wn3000rpv3:blue:leftarrow";
63 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
64 };
65
66 r_arrow {
67 label = "wn3000rpv3:blue:rightarrow";
68 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
69 };
70 };
71
72 gpio-keys-polled {
73 compatible = "gpio-keys-polled";
74 #address-cells = <1>;
75 #size-cells = <0>;
76 poll-interval = <20>;
77
78 reset {
79 label = "reset";
80 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 };
83
84 wps {
85 label = "wps";
86 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_WPS_BUTTON>;
88 };
89 };
90 };
91
92 &gpio1 {
93 status = "okay";
94 };
95
96 &spi0 {
97 status = "okay";
98
99 m25p80@0 {
100 #address-cells = <1>;
101 #size-cells = <1>;
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <10000000>;
105
106 partition@0 {
107 label = "u-boot";
108 reg = <0x0 0x30000>;
109 read-only;
110 };
111
112 partition@30000 {
113 label = "u-boot-env";
114 reg = <0x30000 0x10000>;
115 read-only;
116 };
117
118 partition@40000 {
119 label = "firmware";
120 reg = <0x40000 0x7b0000>;
121 };
122
123 art: partition@7f0000 {
124 label = "art";
125 reg = <0x7f0000 0x10000>;
126 read-only;
127 };
128 };
129 };
130
131 &ethernet {
132 mtd-mac-address = <&art 0x0>;
133 };
134
135 &wmac {
136 mtd-mac-address = <&art 0x6>;
137 ralink,mtd-eeprom = <&art 0x1000>;
138 };
139
140 &pinctrl {
141 state_default: pinctrl0 {
142 default {
143 ralink,group = "i2c", "uartf", "spi refclk";
144 ralink,function = "gpio";
145 };
146 };
147 };