ramips: fix dtc warnings
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_yuncore_fap640.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "yuncore,fap640", "mediatek,mt7621-soc";
10 model = "YunCore FAP640";
11
12 aliases {
13 led-boot = &led_status_blue;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_green;
16 led-upgrade = &led_status_red;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_green: status_green {
28 label = "green:status";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 };
31
32 led_status_red: status_red {
33 label = "red:status";
34 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
35 };
36
37 led_status_blue: status_blue {
38 label = "blue:status";
39 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
40 };
41
42 wan {
43 label = "green:wan";
44 gpios = <&switch0 12 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "mt7530-0:04:link";
46 };
47
48 lan1 {
49 label = "green:lan1";
50 gpios = <&switch0 9 GPIO_ACTIVE_HIGH>;
51 linux,default-trigger = "mt7530-0:03:link";
52 };
53
54 lan2 {
55 label = "green:lan2";
56 gpios = <&switch0 6 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "mt7530-0:02:link";
58 };
59
60 lan3 {
61 label = "green:lan3";
62 gpios = <&switch0 3 GPIO_ACTIVE_LOW>;
63 linux,default-trigger = "mt7530-0:01:link";
64 };
65
66 lan4 {
67 label = "green:lan4";
68 gpios = <&switch0 0 GPIO_ACTIVE_LOW>;
69 linux,default-trigger = "mt7530-0:00:link";
70 };
71 };
72
73 watchdog {
74 compatible = "linux,wdt-gpio";
75 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
76 hw_algo = "toggle";
77 hw_margin_ms = <200>;
78 always-running;
79 };
80
81 keys {
82 compatible = "gpio-keys";
83
84 reset {
85 label = "reset";
86 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_RESTART>;
88 };
89 };
90 };
91
92 &spi0 {
93 status = "okay";
94
95 flash@0 {
96 compatible = "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <80000000>;
99 m25p,fast-read;
100
101 partitions {
102 compatible = "fixed-partitions";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 partition@0 {
107 label = "Bootloader";
108 reg = <0x0 0x30000>;
109 read-only;
110 };
111
112 partition@30000 {
113 label = "Config";
114 reg = <0x30000 0x10000>;
115 read-only;
116 };
117
118 /* range 0x40000 to 0x50000 is empty in vendor
119 * firmware, so we do not use it either
120 */
121
122 factory: partition@50000 {
123 label = "Factory";
124 reg = <0x50000 0x40000>;
125 read-only;
126
127 nvmem-layout {
128 compatible = "fixed-layout";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 macaddr_factory_4: macaddr@4 {
133 reg = <0x4 0x6>;
134 };
135
136 macaddr_factory_e006: macaddr@e006 {
137 reg = <0xe006 0x6>;
138 };
139 };
140 };
141
142 partition@90000 {
143 compatible = "denx,uimage";
144 label = "firmware";
145 reg = <0x90000 0xf70000>;
146 };
147 };
148 };
149 };
150
151 &pcie {
152 status = "okay";
153 };
154
155 &pcie1 {
156 wifi@0,0 {
157 compatible = "mediatek,mt76";
158 reg = <0x0000 0 0 0 0>;
159 mediatek,mtd-eeprom = <&factory 0x0>;
160 mediatek,disable-radar-background;
161 };
162 };
163
164 &gmac0 {
165 nvmem-cells = <&macaddr_factory_e006>;
166 nvmem-cell-names = "mac-address";
167 };
168
169 &gmac1 {
170 status = "okay";
171 label = "wan";
172 phy-handle = <&ethphy4>;
173
174 nvmem-cells = <&macaddr_factory_4>;
175 nvmem-cell-names = "mac-address";
176 };
177
178 &mdio {
179 ethphy4: ethernet-phy@4 {
180 reg = <4>;
181 };
182 };
183
184
185 &switch0 {
186 gpio-controller;
187 #gpio-cells = <2>;
188
189 ports {
190 port@0 {
191 status = "okay";
192 label = "lan4";
193 };
194
195 port@1 {
196 status = "okay";
197 label = "lan3";
198 };
199
200 port@2 {
201 status = "okay";
202 label = "lan2";
203 };
204
205 port@3 {
206 status = "okay";
207 label = "lan1";
208 };
209 };
210 };
211
212 &state_default {
213 gpio {
214 groups = "jtag", "wdt";
215 function = "gpio";
216 };
217 };