ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_linksys_e7350.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "linksys,e7350", "mediatek,mt7621-soc";
11 model = "Linksys E7350";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led-wps {
44 color = <LED_COLOR_ID_AMBER>;
45 function = LED_FUNCTION_WPS;
46 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
47 };
48
49 led_power: led-power {
50 label = "blue:power";
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 default-state = "on";
53 };
54
55 led-wan {
56 color = <LED_COLOR_ID_AMBER>;
57 function = LED_FUNCTION_WAN;
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 };
60 };
61 };
62
63 &nand {
64 status = "okay";
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "Boot";
73 reg = <0x0 0x80000>;
74 read-only;
75 };
76
77 partition@80000 {
78 label = "Config";
79 reg = <0x80000 0x80000>;
80 };
81
82 factory: partition@100000 {
83 label = "Factory";
84 reg = <0x100000 0x80000>;
85 read-only;
86 };
87
88 partition@180000 {
89 label = "firmware";
90 reg = <0x180000 0x3000000>;
91
92 compatible = "fixed-partitions";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 partition@0 {
97 label = "kernel";
98 reg = <0x0 0x400000>;
99 };
100
101 partition@400000 {
102 label = "ubi";
103 reg = <0x400000 0x2c00000>;
104 };
105 };
106
107 partition@3180000 {
108 label = "alt_firmware";
109 reg = <0x3180000 0x3000000>;
110 read-only;
111 };
112
113 partition@6180000 {
114 label = "cbtinfo";
115 reg = <0x6180000 0x80000>;
116 read-only;
117 };
118 /* seems to be the end here. Can't read past 0x6200000 */
119 };
120 };
121
122 &pcie {
123 status = "okay";
124 };
125
126 &pcie1 {
127 wifi@0,0 {
128 compatible = "mediatek,mt76";
129 reg = <0x0000 0 0 0 0>;
130 mediatek,mtd-eeprom = <&factory 0x0000>;
131 };
132 };
133
134 &state_default {
135 gpio {
136 groups = "i2c", "uart3", "jtag", "wdt";
137 function = "gpio";
138 };
139 };
140
141 &gmac1 {
142 status = "okay";
143 label = "wan";
144 phy-handle = <&ethphy0>;
145 };
146
147 &mdio {
148 ethphy0: ethernet-phy@0 {
149 reg = <0>;
150 };
151 };
152
153 &switch0 {
154 ports {
155 port@1 {
156 status = "okay";
157 label = "lan4";
158 };
159
160 port@2 {
161 status = "okay";
162 label = "lan3";
163 };
164
165 port@3 {
166 status = "okay";
167 label = "lan2";
168 };
169
170 port@4 {
171 status = "okay";
172 label = "lan1";
173 };
174 };
175 };