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