Revert "ramips: convert MT7915 EEPROM to NVMEM format"
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_yuncore_fap690.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,fap690", "mediatek,mt7621-soc";
10 model = "YunCore FAP690";
11
12 aliases {
13 led-boot = &led_status_green;
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
43 watchdog {
44 compatible = "linux,wdt-gpio";
45 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
46 hw_algo = "toggle";
47 hw_margin_ms = <200>;
48 always-running;
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <80000000>;
69 m25p,fast-read;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "Bootloader";
78 reg = <0x0 0x30000>;
79 read-only;
80 };
81
82 partition@30000 {
83 label = "Config";
84 reg = <0x30000 0x10000>;
85 read-only;
86 };
87
88 /* range 0x40000 to 0x50000 is empty in vendor
89 * firmware, so we do not use it either
90 */
91
92 factory: partition@50000 {
93 label = "Factory";
94 reg = <0x50000 0x40000>;
95 read-only;
96 };
97
98 partition@90000 {
99 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x90000 0xf70000>;
102 };
103 };
104 };
105 };
106
107 &pcie {
108 status = "okay";
109 };
110
111 &pcie1 {
112 wifi@0,0 {
113 compatible = "mediatek,mt76";
114 reg = <0x0000 0 0 0 0>;
115 mediatek,mtd-eeprom = <&factory 0x0>;
116 mediatek,disable-radar-background;
117 };
118 };
119
120 &gmac0 {
121 nvmem-cells = <&macaddr_factory_0004>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &switch0 {
126 ports {
127 port@4 {
128 status = "okay";
129 label = "lan";
130 };
131 };
132 };
133
134 &state_default {
135 gpio {
136 groups = "jtag", "wdt";
137 function = "gpio";
138 };
139 };
140
141 &factory {
142 compatible = "nvmem-cells";
143 #address-cells = <1>;
144 #size-cells = <1>;
145
146 macaddr_factory_0004: macaddr@0004 {
147 reg = <0x0004 0x6>;
148 };
149 };