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