ramips: add support for Netgear PR2000
[openwrt/staging/jow.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 label = "board_data";
114 reg = <0xf70000 0x10000>;
115 read-only;
116 };
117
118 partition@f80000 {
119 label = "POT";
120 reg = <0xf80000 0x10000>;
121 read-only;
122 };
123
124 partition@f90000 {
125 label = "Traffic Meter";
126 reg = <0xf90000 0x10000>;
127 read-only;
128 };
129
130 partition@fa0000 {
131 label = "Traffic Meter2";
132 reg = <0xfa0000 0x10000>;
133 read-only;
134 };
135
136 partition@fb0000 {
137 label = "nvram";
138 reg = <0xfb0000 0x10000>;
139 };
140
141 partition@fc0000 {
142 label = "DPF";
143 reg = <0xfc0000 0x10000>;
144 read-only;
145 };
146
147 partition@fd0000 {
148 label = "ralink_nvram";
149 reg = <0xfd0000 0x10000>;
150 read-only;
151 };
152
153 partition@fe0000 {
154 label = "reserved1";
155 reg = <0xfe0000 0x10000>;
156 read-only;
157 };
158
159 partition@ff0000 {
160 label = "reserved2";
161 reg = <0xff0000 0x10000>;
162 read-only;
163 };
164 };
165 };
166 };
167
168 &ethernet {
169 mtd-mac-address = <&board_data 0xb0>;
170 mediatek,portmap = "wllll";
171 };
172
173 &ehci {
174 status = "okay";
175 };
176
177 &ohci {
178 status = "okay";
179 };
180
181 &wmac {
182 ralink,mtd-eeprom = <&factory 0x0>;
183 mtd-mac-address = <&board_data 0xb0>;
184 };
185
186 &state_default {
187 default {
188 groups = "ephy", "wled", "pa", "i2c";
189 function = "gpio";
190 };
191 };