ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dap-x1860-a1.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
8 / {
9 compatible = "dlink,dap-x1860-a1", "mediatek,mt7621-soc";
10 model = "D-Link DAP-X1860 A1";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 aliases {
17 label-mac-device = &gmac0;
18 led-boot = &led_power_orange;
19 led-failsafe = &led_power_red;
20 led-running = &led_power_orange;
21 led-upgrade = &led_power_red;
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 wps {
28 label = "wps";
29 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_WPS_BUTTON>;
31 };
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_power_red: power_red {
44 label = "red:power";
45 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
46 };
47
48 led_power_orange: power_orange {
49 label = "orange:power";
50 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
51 default-state = "on";
52 };
53
54 rssihigh {
55 label = "green:rssihigh";
56 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
57 };
58
59 rssimedium {
60 label = "green:rssimedium";
61 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
62 };
63
64 rssilow_orange {
65 label = "orange:rssilow";
66 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
67 };
68
69 rssilow_green {
70 label = "green:rssilow";
71 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
72 };
73 };
74
75 virtual_flash {
76 compatible = "mtd-concat";
77
78 devices = <&fwconcat0 &fwconcat1>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "ubi";
87 reg = <0x0 0x0>;
88 };
89 };
90 };
91 };
92
93 &nand {
94 status = "okay";
95
96 mediatek,nmbm;
97
98 partitions {
99 compatible = "fixed-partitions";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 partition@0 {
104 label = "bootloader";
105 reg = <0x0 0x80000>;
106 read-only;
107 };
108
109 partition@80000 {
110 label = "config";
111 reg = <0x80000 0x80000>;
112 read-only;
113 };
114
115 factory: partition@100000 {
116 label = "factory";
117 reg = <0x100000 0x80000>;
118 read-only;
119
120 compatible = "nvmem-cells";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 macaddr_factory_4: macaddr@4 {
125 reg = <0x4 0x6>;
126 };
127 };
128
129 partition@180000 {
130 label = "kernel";
131 reg = <0x180000 0x0800000>;
132 };
133
134 fwconcat0: partition@980000 {
135 label = "fwconcat0";
136 reg = <0x980000 0x2c00000>;
137 };
138
139 partition@3580000 {
140 label = "manufacture";
141 reg = <0x3580000 0x400000>;
142 read-only;
143 };
144
145 partition@3980000 {
146 label = "storage";
147 reg = <0x3980000 0x680000>;
148 read-only;
149 };
150
151 fwconcat1: partition@4000000 {
152 label = "fwconcat1";
153 reg = <0x4000000 0x3800000>;
154 };
155 };
156 };
157
158 &pcie {
159 status = "okay";
160 };
161
162 &pcie1 {
163 wifi@0,0 {
164 compatible = "mediatek,mt76";
165 reg = <0x0000 0 0 0 0>;
166 mediatek,mtd-eeprom = <&factory 0x0>;
167 mediatek,disable-radar-background;
168 };
169 };
170
171 &ethernet {
172 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
173 };
174
175 &gmac0 {
176 nvmem-cells = <&macaddr_factory_4>;
177 nvmem-cell-names = "mac-address";
178 };
179
180 &switch0 {
181 gpio-controller;
182 #gpio-cells = <2>;
183
184 ports {
185 port@0 {
186 status = "okay";
187 label = "lan";
188 };
189 };
190 };
191
192 &state_default {
193 gpio {
194 groups = "uart2";
195 function = "gpio";
196 };
197 };