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