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