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