ramips: limit 5GHz channels for RAVPower RP-WD009
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_ravpower_rp-wd009.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 = "ravpower,rp-wd009", "mediatek,mt7628an-soc";
11 model = "RAVPower RP-WD009";
12
13 aliases {
14 led-boot = &led_globe;
15 led-failsafe = &led_globe;
16 led-running = &led_globe;
17 led-upgrade = &led_globe;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,57600";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_globe: globe {
28 label = "rp-wd009:white:globe";
29 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
30 };
31
32 wlan2 {
33 label = "rp-wd009:white:wlan2";
34 gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
35 linux,default-trigger = "phy0tpt";
36 };
37
38 wlan5 {
39 label = "rp-wd009:white:wlan5";
40 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "phy1tpt";
42 };
43
44 sd_white {
45 label = "rp-wd009:white:sd";
46 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
47 };
48
49 sd_red {
50 label = "rp-wd009:red:sd";
51 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
52 };
53 };
54
55 keys {
56 compatible = "gpio-keys";
57
58 reset {
59 label = "reset";
60 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_RESTART>;
62 };
63
64 /* Power interrupt on Pin 39 */
65
66 rfkill {
67 label = "rfkill";
68 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_RFKILL>;
70 };
71
72 backup {
73 label = "backup";
74 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_COPY>;
76 };
77 };
78 };
79
80 &gpio {
81 mt7610-power {
82 gpio-hog;
83 gpios = <20 GPIO_ACTIVE_HIGH>;
84 output-high;
85 line-name = "mt7610-power";
86 };
87 };
88
89 &state_default {
90 gpio {
91 groups = "uart1", "wled_an", "p0led_an", "p2led_an", "p3led_an",
92 "p4led_an", "uart2", "pwm0", "i2s";
93 function = "gpio";
94 };
95 };
96
97 &ehci {
98 status = "okay";
99 };
100
101 &ohci {
102 status = "okay";
103 };
104
105 &sdhci {
106 status = "okay";
107 };
108
109 &i2c {
110 status = "okay";
111
112 /* Custom PMIC at 0x0a */
113 };
114
115 &pcie {
116 status = "okay";
117 };
118
119 &pcie0 {
120 wifi@0,0 {
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x8000>;
123 ieee80211-freq-limit = <5470000 6000000>;
124 };
125 };
126
127 &spi0 {
128 status = "okay";
129
130 flash@0 {
131 compatible = "jedec,spi-nor";
132 reg = <0>;
133 spi-max-frequency = <40000000>;
134
135 partitions {
136 compatible = "fixed-partitions";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 partition@0 {
141 label = "bootloader";
142 reg = <0x0 0x30000>;
143 read-only;
144 };
145
146 partition@30000 {
147 label = "config";
148 reg = <0x30000 0x10000>;
149 read-only;
150 };
151
152 factory: partition@40000 {
153 label = "factory";
154 reg = <0x40000 0x10000>;
155 read-only;
156 };
157
158 partition@50000 {
159 label = "loader";
160 reg = <0x50000 0x180000>;
161 };
162
163 partition@1d0000 {
164 label = "params";
165 reg = <0x1d0000 0x10000>;
166 read-only;
167 };
168
169 partition@1e0000 {
170 label = "user_backup";
171 reg = <0x1e0000 0x10000>;
172 read-only;
173 };
174
175 partition@1f0000 {
176 label = "user";
177 reg = <0x1f0000 0x10000>;
178 read-only;
179 };
180
181 partition@200000 {
182 compatible = "denx,uimage";
183 label = "firmware";
184 reg = <0x200000 0xdf0000>;
185 };
186
187 partition@ff0000 {
188 label = "mode";
189 reg = <0xff0000 0x10000>;
190 read-only;
191 };
192 };
193 };
194 };
195
196 &wmac {
197 status = "okay";
198 };
199
200 &ethernet {
201 mtd-mac-address = <&factory 0x4>;
202 };