Revert "ramips: convert MT7915 EEPROM to NVMEM format"
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_snr_snr-cpe-me2-lite.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 #include "mt7621.dtsi"
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7
8 / {
9 compatible = "snr,snr-cpe-me2-lite", "mediatek,mt7621-soc";
10 model = "SNR-CPE-ME2-Lite";
11
12 leds {
13 compatible = "gpio-leds";
14
15 led_sys: led-0 {
16 label = "green:sys";
17 color = <LED_COLOR_ID_GREEN>;
18 function = LED_FUNCTION_STATUS;
19 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
20 };
21
22 led_vpn: led-1 {
23 label = "green:vpn";
24 color = <LED_COLOR_ID_GREEN>;
25 function = LED_FUNCTION_STATUS;
26 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39 };
40
41 &state_default {
42 gpio {
43 groups = "jtag", "wdt";
44 function = "gpio";
45 };
46 };
47
48 &gdma {
49 status = "okay";
50 };
51
52 &spi0 {
53 status = "okay";
54
55 flash@0 {
56 compatible = "jedec,spi-nor";
57 reg = <0>;
58 spi-max-frequency = <104000000>;
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "config";
73 reg = <0x30000 0x10000>;
74 };
75
76 factory: partition@40000 {
77 compatible = "nvmem-cells";
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 #address-cells = <1>;
81 #size-cells = <1>;
82 read-only;
83
84 eeprom_factory_0: eeprom@0 {
85 reg = <0x0 0x400>;
86 };
87
88 eeprom_factory_8000: eeprom@8000 {
89 reg = <0x8000 0x4da8>;
90 };
91
92 macaddr_factory_e000: macaddr@e000 {
93 reg = <0xe000 0x6>;
94 };
95
96 macaddr_factory_e006: macaddr@e006 {
97 reg = <0xe006 0x6>;
98 };
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x50000 0xfb0000>;
105 };
106 };
107 };
108 };
109
110 &sdhci {
111 status = "okay";
112 };
113
114 &mdio {
115 ethphy0: ethernet-phy@0 {
116 reg = <0>;
117 };
118 };
119
120 &gmac0 {
121 nvmem-cells = <&macaddr_factory_e000>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &gmac1 {
126 status = "okay";
127 label = "wan";
128 phy-handle = <&ethphy0>;
129
130 nvmem-cells = <&macaddr_factory_e006>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &switch0 {
135 ports {
136 port@1 {
137 status = "okay";
138 label = "lan1";
139 };
140
141 port@2 {
142 status = "okay";
143 label = "lan2";
144 };
145
146 port@3 {
147 status = "okay";
148 label = "lan3";
149 };
150
151 port@4 {
152 status = "okay";
153 label = "lan4";
154 };
155 };
156 };
157
158 &pcie {
159 status = "okay";
160 };
161
162 &pcie0 {
163 wifi@0,0 {
164 compatible = "mediatek,mt76";
165 reg = <0x0000 0 0 0 0>;
166 nvmem-cells = <&eeprom_factory_0>;
167 nvmem-cell-names = "eeprom";
168 ieee80211-freq-limit = <2400000 2500000>;
169 };
170 };
171
172 &pcie1 {
173 wifi@0,0 {
174 compatible = "mediatek,mt76";
175 reg = <0x0000 0 0 0 0>;
176 nvmem-cells = <&eeprom_factory_8000>;
177 nvmem-cell-names = "eeprom";
178 ieee80211-freq-limit = <5000000 6000000>;
179 };
180 };