ramips: fix DTS EEPROM property for some MT7628 devices
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_netgear_pr2000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "netgear,pr2000", "ralink,mt7620n-soc";
10 model = "Netgear PR2000";
11
12 aliases {
13 label-mac-device = &ethernet;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 internet {
20 label = "green:internet";
21 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
22 };
23
24 wifi {
25 label = "green:wifi";
26 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
27 linux,default-trigger = "phy0tpt";
28 };
29
30 usb {
31 label = "green:usb";
32 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
33 trigger-sources = <&ohci_port1>, <&ehci_port1>;
34 linux,default-trigger = "usbport";
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 wireless {
48 label = "wireless";
49 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
50 linux,code = <BTN_0>;
51 linux,input-type = <EV_SW>;
52 };
53
54 wired {
55 label = "wired";
56 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
57 linux,code = <BTN_0>;
58 linux,input-type = <EV_SW>;
59 };
60 };
61 };
62
63 &gpio2 {
64 status = "okay";
65 };
66
67 &gpio3 {
68 status = "okay";
69 };
70
71 &spi0 {
72 status = "okay";
73
74 flash@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <50000000>;
78 m25p,fast-read;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "u-boot";
87 reg = <0x0 0x30000>;
88 read-only;
89 };
90
91 partition@30000 {
92 label = "u-boot-env";
93 reg = <0x30000 0x10000>;
94 };
95
96 /* sercomm header for kernel starts at 0x3ffba
97 * can be safely ignored since not used by OpenWRT
98 */
99
100 partition@40000 {
101 compatible = "denx,uimage";
102 label = "firmware";
103 reg = <0x40000 0xf20000>;
104 };
105
106 factory: partition@f60000 {
107 label = "factory";
108 reg = <0xf60000 0x10000>;
109 read-only;
110 };
111
112 board_data: partition@f70000 {
113 compatible = "nvmem-cells";
114 label = "board_data";
115 reg = <0xf70000 0x10000>;
116 #address-cells = <1>;
117 #size-cells = <1>;
118 read-only;
119
120 macaddr_board_data_b0: macaddr@b0 {
121 reg = <0xb0 0x6>;
122 };
123 };
124
125 partition@f80000 {
126 label = "POT";
127 reg = <0xf80000 0x10000>;
128 read-only;
129 };
130
131 partition@f90000 {
132 label = "Traffic Meter";
133 reg = <0xf90000 0x10000>;
134 read-only;
135 };
136
137 partition@fa0000 {
138 label = "Traffic Meter2";
139 reg = <0xfa0000 0x10000>;
140 read-only;
141 };
142
143 partition@fb0000 {
144 label = "nvram";
145 reg = <0xfb0000 0x10000>;
146 };
147
148 partition@fc0000 {
149 label = "DPF";
150 reg = <0xfc0000 0x10000>;
151 read-only;
152 };
153
154 partition@fd0000 {
155 label = "ralink_nvram";
156 reg = <0xfd0000 0x10000>;
157 read-only;
158 };
159
160 partition@fe0000 {
161 label = "reserved1";
162 reg = <0xfe0000 0x10000>;
163 read-only;
164 };
165
166 partition@ff0000 {
167 label = "reserved2";
168 reg = <0xff0000 0x10000>;
169 read-only;
170 };
171 };
172 };
173 };
174
175 &ethernet {
176 mediatek,portmap = "wllll";
177 nvmem-cells = <&macaddr_board_data_b0>;
178 nvmem-cell-names = "mac-address";
179 };
180
181 &ehci {
182 status = "okay";
183 };
184
185 &ohci {
186 status = "okay";
187 };
188
189 &wmac {
190 ralink,mtd-eeprom = <&factory 0x0>;
191 nvmem-cells = <&macaddr_board_data_b0>;
192 nvmem-cell-names = "mac-address";
193 };
194
195 &state_default {
196 default {
197 groups = "ephy", "wled", "pa", "i2c";
198 function = "gpio";
199 };
200 };