mpc85xx: fix address config for ws-ap3825i
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_ravpower_rp-wd009.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.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 leds {
21 compatible = "gpio-leds";
22
23 led_globe: globe {
24 label = "white:globe";
25 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
26 };
27
28 wlan2 {
29 label = "white:wlan2";
30 gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
31 linux,default-trigger = "phy0tpt";
32 };
33
34 wlan5 {
35 label = "white:wlan5";
36 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy1tpt";
38 };
39
40 sd_white {
41 function = LED_FUNCTION_SD;
42 color = <LED_COLOR_ID_WHITE>;
43 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
44 };
45
46 sd_red {
47 function = LED_FUNCTION_SD;
48 color = <LED_COLOR_ID_RED>;
49 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 /* Power interrupt on Pin 39 */
63
64 rfkill {
65 label = "rfkill";
66 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_RFKILL>;
68 };
69
70 backup {
71 label = "backup";
72 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_COPY>;
74 };
75 };
76 };
77
78 &gpio {
79 mt7610-power {
80 gpio-hog;
81 gpios = <20 GPIO_ACTIVE_HIGH>;
82 output-high;
83 line-name = "mt7610-power";
84 };
85 };
86
87 &state_default {
88 gpio {
89 groups = "uart1", "wled_an", "p0led_an", "p2led_an", "p3led_an",
90 "p4led_an", "uart2", "pwm0", "i2s";
91 function = "gpio";
92 };
93 };
94
95 &sdhci {
96 status = "okay";
97 };
98
99 &i2c {
100 status = "okay";
101
102 /* Custom PMIC at 0x0a */
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie0 {
110 wifi@0,0 {
111 reg = <0x0000 0 0 0 0>;
112 nvmem-cells = <&eeprom_factory_8000>;
113 nvmem-cell-names = "eeprom";
114 ieee80211-freq-limit = <5470000 6000000>;
115 };
116 };
117
118 &spi0 {
119 status = "okay";
120
121 flash@0 {
122 compatible = "jedec,spi-nor";
123 reg = <0>;
124 spi-max-frequency = <40000000>;
125
126 partitions {
127 compatible = "fixed-partitions";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 partition@0 {
132 label = "bootloader";
133 reg = <0x0 0x30000>;
134 read-only;
135 };
136
137 partition@30000 {
138 label = "config";
139 reg = <0x30000 0x10000>;
140 read-only;
141 };
142
143 partition@40000 {
144 label = "factory";
145 reg = <0x40000 0x10000>;
146 read-only;
147
148 nvmem-layout {
149 compatible = "fixed-layout";
150 #address-cells = <1>;
151 #size-cells = <1>;
152
153 eeprom_factory_0: eeprom@0 {
154 reg = <0x0 0x400>;
155 };
156
157 eeprom_factory_8000: eeprom@8000 {
158 reg = <0x8000 0x200>;
159 };
160
161 macaddr_factory_4: macaddr@4 {
162 reg = <0x4 0x6>;
163 };
164 };
165 };
166
167 partition@50000 {
168 label = "loader";
169 reg = <0x50000 0x180000>;
170 };
171
172 partition@1d0000 {
173 label = "params";
174 reg = <0x1d0000 0x10000>;
175 read-only;
176 };
177
178 partition@1e0000 {
179 label = "user_backup";
180 reg = <0x1e0000 0x10000>;
181 read-only;
182 };
183
184 partition@1f0000 {
185 label = "user";
186 reg = <0x1f0000 0x10000>;
187 read-only;
188 };
189
190 partition@200000 {
191 compatible = "denx,uimage";
192 label = "firmware";
193 reg = <0x200000 0xdf0000>;
194 };
195
196 partition@ff0000 {
197 label = "mode";
198 reg = <0xff0000 0x10000>;
199 read-only;
200 };
201 };
202 };
203 };
204
205 &wmac {
206 status = "okay";
207
208 nvmem-cells = <&eeprom_factory_0>;
209 nvmem-cell-names = "eeprom";
210 };
211
212 &ethernet {
213 nvmem-cells = <&macaddr_factory_4>;
214 nvmem-cell-names = "mac-address";
215 };