ramips: convert MT7610 and MT7612 EEPROM to NVMEM format for MT7621
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_netgear_ex3x00_ex61xx.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 led-boot = &led_power_amber;
9 led-failsafe = &led_power_amber;
10 led-running = &led_power_green;
11 led-upgrade = &led_power_green;
12 };
13
14 keys {
15 compatible = "gpio-keys";
16
17 reset {
18 label = "reset";
19 gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
20 linux,code = <KEY_RESTART>;
21 };
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 led_power_green: power_green {
34 label = "green:power";
35 gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
36 default-state = "on";
37 };
38
39 led_power_amber: power_amber {
40 label = "amber:power";
41 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
42 };
43
44 router_green {
45 label = "green:router";
46 gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
47 };
48
49 router_red {
50 label = "red:router";
51 gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
52 };
53
54 device_green {
55 label = "green:device";
56 gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
57 };
58
59 device_red {
60 label = "red:device";
61 gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
62 };
63
64 wps {
65 label = "green:wps";
66 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
67 };
68 };
69 };
70
71 &gpio2 {
72 status = "okay";
73 };
74
75 &spi0 {
76 status = "okay";
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <50000000>;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x0 0x30000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "config";
96 reg = <0x30000 0x10000>;
97 read-only;
98 };
99
100 factory: partition@40000 {
101 label = "factory";
102 reg = <0x40000 0x10000>;
103 read-only;
104 };
105
106 partition@50000 {
107 compatible = "denx,uimage";
108 label = "firmware";
109 reg = <0x50000 0x790000>;
110 };
111
112 partition@7e0000 {
113 label = "board_data";
114 reg = <0x7e0000 0x10000>;
115 read-only;
116 };
117
118 partition@7f0000 {
119 label = "nvram";
120 reg = <0x7f0000 0x10000>;
121 read-only;
122 };
123 };
124 };
125 };
126
127 &pcie {
128 status = "okay";
129 };
130
131 &pcie0 {
132 mt76@0,0 {
133 reg = <0x0000 0 0 0 0>;
134 mediatek,mtd-eeprom = <&factory 0x8000>;
135 ieee80211-freq-limit = <5000000 6000000>;
136 };
137 };
138
139 &ethernet {
140 nvmem-cells = <&macaddr_factory_28>;
141 nvmem-cell-names = "mac-address";
142 };
143
144 &wmac {
145 ralink,mtd-eeprom = <&factory 0x0>;
146 };
147
148 &state_default {
149 default {
150 groups = "i2c", "rgmii2", "spi refclk";
151 function = "gpio";
152 };
153 };
154
155 &factory {
156 compatible = "nvmem-cells";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 macaddr_factory_28: macaddr@28 {
161 reg = <0x28 0x6>;
162 };
163 };