ramips: convert MT7915 EEPROM to NVMEM format
[openwrt/staging/jow.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 compatible = "nvmem-cells";
94 label = "Factory";
95 reg = <0x50000 0x40000>;
96 #address-cells = <1>;
97 #size-cells = <1>;
98 read-only;
99
100 eeprom_factory_0: eeprom@0 {
101 reg = <0x0 0xe00>;
102 };
103
104 macaddr_factory_0004: macaddr@0004 {
105 reg = <0x0004 0x6>;
106 };
107 };
108
109 partition@90000 {
110 compatible = "denx,uimage";
111 label = "firmware";
112 reg = <0x90000 0xf70000>;
113 };
114 };
115 };
116 };
117
118 &pcie {
119 status = "okay";
120 };
121
122 &pcie1 {
123 wifi@0,0 {
124 compatible = "mediatek,mt76";
125 reg = <0x0000 0 0 0 0>;
126 nvmem-cells = <&eeprom_factory_0>;
127 nvmem-cell-names = "eeprom";
128 mediatek,disable-radar-background;
129 };
130 };
131
132 &gmac0 {
133 nvmem-cells = <&macaddr_factory_0004>;
134 nvmem-cell-names = "mac-address";
135 };
136
137 &switch0 {
138 ports {
139 port@4 {
140 status = "okay";
141 label = "lan";
142 };
143 };
144 };
145
146 &state_default {
147 gpio {
148 groups = "jtag", "wdt";
149 function = "gpio";
150 };
151 };