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