ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_er605-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
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 model = "TP-Link ER605 v2";
11 compatible = "tplink,er605-v2", "mediatek,mt7621-soc";
12
13 chosen {
14 bootargs = "console=ttyS0,115200 noinitrd";
15 // Override bootargs because u-boot passes wrong root parameter.
16 // Instead allow kernel determine root automatically by looking for rootfs volume
17 bootargs-override = "console=ttyS0,115200 noinitrd ubi.mtd=3,2048";
18 };
19
20 aliases {
21 led-boot = &led_system;
22 led-failsafe = &led_system;
23 led-running = &led_system;
24 led-upgrade = &led_system;
25 label-mac-device = &gmac0;
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_usb: usb {
32 label = "green:usb";
33 color = <LED_COLOR_ID_GREEN>;
34 function = LED_FUNCTION_STATUS;
35 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
36 };
37
38 led_power: power {
39 label = "green:power";
40 color = <LED_COLOR_ID_GREEN>;
41 function = LED_FUNCTION_STATUS;
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 default-state = "on";
44 };
45
46 led_system: system {
47 label = "green:system";
48 color = <LED_COLOR_ID_GREEN>;
49 function = LED_FUNCTION_STATUS;
50 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
51 default-state = "keep";
52 };
53 };
54
55 keys {
56 compatible = "gpio-keys";
57
58 reset {
59 label = "reset button";
60 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
61 linux,code = <KEY_RESTART>;
62 };
63 };
64
65 reg_usb_vbus: regulator-usb {
66 compatible = "regulator-fixed";
67 regulator-name = "usb_vbus";
68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>;
70 gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
71 enable-active-high;
72 };
73
74 reg_3p3v: regulator-3p3v {
75 compatible = "regulator-fixed";
76 regulator-name = "fixed-3.3V";
77 regulator-min-microvolt = <3300000>;
78 regulator-max-microvolt = <3300000>;
79 regulator-boot-on;
80 regulator-always-on;
81 };
82 };
83
84 &gmac0 {
85 label = "dsa";
86 };
87
88 &gmac1 {
89 status = "okay";
90 label = "eth0";
91 phy-handle = <&ethphy0>;
92 };
93
94
95 &switch0 {
96 ports {
97 port@0 {
98 status = "disabled";
99 };
100
101 port@1 {
102 status = "okay";
103 label = "eth1";
104 };
105
106 port@2 {
107 status = "okay";
108 label = "eth2";
109 };
110
111 port@3 {
112 status = "okay";
113 label = "eth3";
114 };
115
116 port@4 {
117 status = "okay";
118 label = "eth4";
119 };
120 };
121 };
122
123 &nand {
124 status = "okay";
125
126 partitions {
127 compatible = "fixed-partitions";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 partition@0 {
132 label = "u-boot";
133 reg = <0x0 0x80000>;
134 read-only;
135 };
136
137 partition@80000 {
138 label = "u-boot-env";
139 reg = <0x80000 0x80000>;
140 read-only;
141 };
142
143 factory: partition@100000 {
144 label = "factory";
145 reg = <0x100000 0x40000>;
146 read-only;
147 };
148
149 partition@140000 {
150 label = "firmware";
151 reg = <0x140000 0x7cc0000>;
152 };
153
154 partition@7e00000 {
155 label = "panic-ops";
156 reg = <0x7e00000 0x200000>;
157 };
158 };
159 };
160
161
162 &mdio {
163 ethphy0: ethernet-phy@0 {
164 reg = <0>;
165 };
166 };
167
168 &state_default {
169 gpio {
170 groups = "uart2", "uart3", "pcie", "jtag";
171 function = "gpio";
172 };
173 };
174
175 &spi0 {
176 status = "disabled";
177 };
178
179 &xhci {
180 vusb33-supply = <&reg_3p3v>;
181 vbus-supply = <&reg_usb_vbus>;
182 };
183