Revert "ramips: convert MT7915 EEPROM to NVMEM format"
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_domywifi.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_system_amber;
11 led-failsafe = &led_system_amber;
12 led-running = &led_system_green;
13 led-upgrade = &led_system_amber;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RESTART>;
23 };
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_system_green: system_green {
30 label = "green:system";
31 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
32 };
33
34 led_system_amber: system_amber {
35 label = "amber:system";
36 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
37 };
38
39 internet_green {
40 label = "green:internet";
41 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
42 };
43
44 internet_amber {
45 label = "amber:internet";
46 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
47 };
48
49 lan1 {
50 label = "amber:lan1";
51 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
52 };
53
54 lan2 {
55 label = "amber:lan2";
56 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
57 };
58
59 lan3 {
60 label = "amber:lan3";
61 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
62 };
63
64 lan4 {
65 label = "amber:lan4";
66 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
67 };
68
69 wan {
70 label = "amber:wan";
71 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
72 };
73
74 wlan2g {
75 label = "green:wlan2g";
76 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
77 linux,default-trigger = "phy1tpt";
78 };
79 };
80 };
81
82 &gpio1 {
83 status = "okay";
84 };
85
86 &gpio3 {
87 status = "okay";
88 };
89
90 &spi0 {
91 status = "okay";
92
93 flash@0 {
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 spi-max-frequency = <80000000>;
97 m25p,fast-read;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "bootloader";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "config";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 compatible = "nvmem-cells";
118 label = "factory";
119 reg = <0x40000 0x10000>;
120 #address-cells = <1>;
121 #size-cells = <1>;
122 read-only;
123
124 eeprom_factory_0: eeprom@0 {
125 reg = <0x0 0x200>;
126 };
127
128 eeprom_factory_8000: eeprom@8000 {
129 reg = <0x8000 0x200>;
130 };
131
132 macaddr_factory_28: macaddr@28 {
133 reg = <0x28 0x6>;
134 };
135 };
136
137 partition@50000 {
138 compatible = "denx,uimage";
139 label = "firmware";
140 reg = <0x50000 0xfb0000>;
141 };
142 };
143 };
144 };
145
146 &state_default {
147 gpio {
148 groups = "uartf", "rgmii1", "wled";
149 function = "gpio";
150 };
151 };
152
153 &ethernet {
154 pinctrl-names = "default";
155 pinctrl-0 = <&ephy_pins>;
156
157 mediatek,portmap = "wllll";
158
159 nvmem-cells = <&macaddr_factory_28>;
160 nvmem-cell-names = "mac-address";
161 };
162
163 &sdhci {
164 status = "okay";
165 };
166
167 &ehci {
168 status = "okay";
169 };
170
171 &ohci {
172 status = "okay";
173 };
174
175 &pcie {
176 status = "okay";
177 };
178
179 &pcie0 {
180 wifi@0,0 {
181 reg = <0x0000 0 0 0 0>;
182 nvmem-cells = <&eeprom_factory_8000>;
183 nvmem-cell-names = "eeprom";
184 ieee80211-freq-limit = <5000000 6000000>;
185
186 led {
187 led-sources = <0>;
188 led-active-low;
189 };
190 };
191 };
192
193 &wmac {
194 nvmem-cells = <&eeprom_factory_0>;
195 nvmem-cell-names = "eeprom";
196 };