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