ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iptime_t5004.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 = "iptime,t5004", "mediatek,mt7621-soc";
11 model = "ipTIME T5004";
12
13 aliases {
14 led-boot = &led_cpu;
15 led-failsafe = &led_cpu;
16 led-running = &led_cpu;
17 led-upgrade = &led_cpu;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_cpu: led-0 {
24 label = "blue:cpu";
25 color = <LED_COLOR_ID_BLUE>;
26 function = LED_FUNCTION_CPU;
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 };
29 };
30
31 keys {
32 compatible = "gpio-keys";
33
34 reset {
35 label = "reset";
36 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39 };
40 };
41
42 &nand {
43 status = "okay";
44
45 partitions {
46 compatible = "fixed-partitions";
47 #address-cells = <1>;
48 #size-cells = <1>;
49
50 partition@0 {
51 label = "u-boot";
52 reg = <0x0 0x80000>;
53 read-only;
54 };
55
56 partition@80000 {
57 label = "config";
58 reg = <0x80000 0xc0000>;
59 read-only;
60 };
61
62 partition@140000 {
63 label = "firmware";
64 reg = <0x140000 0x7e40000>;
65
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "kernel";
72 reg = <0x0 0x400000>;
73 };
74
75 partition@400000 {
76 label = "ubi";
77 reg = <0x400000 0x7a40000>;
78 };
79 };
80 };
81 };
82
83 &state_default {
84 gpio {
85 groups = "i2c", "wdt";
86 function = "gpio";
87 };
88 };
89
90 &gmac1 {
91 status = "okay";
92 label = "wan";
93 phy-handle = <&ethphy0>;
94 };
95
96 &mdio {
97 ethphy0: ethernet-phy@0 {
98 reg = <0>;
99 };
100 };
101
102 &switch0 {
103 ports {
104 port@1 {
105 status = "okay";
106 label = "lan4";
107 };
108
109 port@2 {
110 status = "okay";
111 label = "lan3";
112 };
113
114 port@3 {
115 status = "okay";
116 label = "lan2";
117 };
118
119 port@4 {
120 status = "okay";
121 label = "lan1";
122 };
123 };
124 };
125
126 &xhci {
127 status = "disabled";
128 };