ramips: add support for Netgear R6020
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7628an_netgear_r6020.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "netgear,r6020", "mediatek,mt7628an-soc";
11 model = "Netgear R6020";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 lan {
34 label = "r6020:green:lan";
35 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
36 };
37
38 led_power: power {
39 label = "r6020:green:power";
40 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
41 };
42
43 wlan2g_green {
44 label = "r6020:green:wlan2g";
45 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
46 linux,default-trigger = "phy0tpt";
47 };
48
49 wlan2g_orange {
50 label = "r6020:orange:wlan2g";
51 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
52 };
53
54 wan_green {
55 label = "r6020:green:wan";
56 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
57 };
58
59 wan_orange {
60 label = "r6020:orange:wan";
61 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
62 };
63 };
64 };
65
66 &state_default {
67 gpio {
68 groups = "p0led_an", "p1led_an", "p2led_an",
69 "p3led_an", "p4led_an", "wdt",
70 "wled_an";
71 function = "gpio";
72 };
73 };
74
75 &spi0 {
76 status = "okay";
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <86000000>;
82 m25p,fast-read;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x40000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x20000>;
98 read-only;
99 };
100
101 partition@60000 {
102 label = "nvram";
103 reg = <0x60000 0x30000>;
104 read-only;
105 };
106
107 partition@90000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x90000 0x6f0000>;
111 };
112
113 partition@780000 {
114 label = "ML";
115 reg = <0x780000 0x20000>;
116 read-only;
117 };
118
119 partition@7a0000 {
120 label = "ML1";
121 reg = <0x7a0000 0x20000>;
122 read-only;
123 };
124
125 partition@7c0000 {
126 label = "ML2";
127 reg = <0x7c0000 0x20000>;
128 read-only;
129 };
130
131 partition@7e0000 {
132 label = "POT";
133 reg = <0x7e0000 0x10000>;
134 read-only;
135 };
136
137 partition@7f0000 {
138 label = "reserved";
139 reg = <0x7f0000 0x10000>;
140 read-only;
141 };
142 };
143 };
144 };
145
146 &wmac {
147 status = "okay";
148 };
149
150 &ethernet {
151 mtd-mac-address = <&factory 0x4>;
152 };
153
154 &pcie {
155 status = "okay";
156 };
157
158 &pcie0 {
159 wifi@0,0 {
160 reg = <0x0000 0 0 0 0>;
161 mediatek,mtd-eeprom = <&factory 0x8000>;
162 ieee80211-freq-limit = <5000000 6000000>;
163 };
164 };
165
166 &ehci {
167 status = "disabled";
168 };
169
170 &ohci {
171 status = "disabled";
172 };