ramips: add support for SNR SNR-CPE-ME2-Lite
[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 label = "factory";
78 reg = <0x40000 0x10000>;
79 read-only;
80 };
81
82 partition@50000 {
83 compatible = "denx,uimage";
84 label = "firmware";
85 reg = <0x50000 0xfb0000>;
86 };
87 };
88 };
89 };
90
91 &sdhci {
92 status = "okay";
93 };
94
95 &mdio {
96 ethphy0: ethernet-phy@0 {
97 reg = <0>;
98 };
99 };
100
101 &gmac0 {
102 nvmem-cells = <&macaddr_factory_e000>;
103 nvmem-cell-names = "mac-address";
104 };
105
106 &gmac1 {
107 status = "okay";
108 label = "wan";
109 phy-handle = <&ethphy0>;
110
111 nvmem-cells = <&macaddr_factory_e006>;
112 nvmem-cell-names = "mac-address";
113 };
114
115 &switch0 {
116 ports {
117 port@1 {
118 status = "okay";
119 label = "lan1";
120 };
121
122 port@2 {
123 status = "okay";
124 label = "lan2";
125 };
126
127 port@3 {
128 status = "okay";
129 label = "lan3";
130 };
131
132 port@4 {
133 status = "okay";
134 label = "lan4";
135 };
136 };
137 };
138
139 &pcie {
140 status = "okay";
141 };
142
143 &pcie0 {
144 wifi@0,0 {
145 compatible = "mediatek,mt76";
146 reg = <0x0000 0 0 0 0>;
147 mediatek,mtd-eeprom = <&factory 0x0000>;
148 ieee80211-freq-limit = <2400000 2500000>;
149 };
150 };
151
152 &pcie1 {
153 wifi@0,0 {
154 compatible = "mediatek,mt76";
155 reg = <0x0000 0 0 0 0>;
156 mediatek,mtd-eeprom = <&factory 0x8000>;
157 ieee80211-freq-limit = <5000000 6000000>;
158 };
159 };
160
161 &factory {
162 compatible = "nvmem-cells";
163 #address-cells = <1>;
164 #size-cells = <1>;
165
166 macaddr_factory_e000: macaddr@e000 {
167 reg = <0xe000 0x6>;
168 };
169
170 macaddr_factory_e006: macaddr@e006 {
171 reg = <0xe006 0x6>;
172 };
173 };