ramips: add support for D-Link COVR-X1860 A1
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_dlink_covr-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,covr-x1860-a1", "mediatek,mt7621-soc";
10 model = "D-Link COVR-X1860 A1";
11
12 aliases {
13 led-boot = &status_orange;
14 led-failsafe = &status_red;
15 led-running = &status_white;
16 led-upgrade = &status_red;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 linux,code = <KEY_RESTART>;
29 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
30 };
31
32 wps {
33 label = "wps";
34 linux,code = <KEY_WPS_BUTTON>;
35 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 status_white: power {
43 label = "white:status";
44 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
45 };
46
47 status_orange: status_orange {
48 label = "orange:status";
49 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
50 default-state = "on";
51 };
52
53 status_red: status_red {
54 label = "red:status";
55 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 virtual_flash {
60 compatible = "mtd-concat";
61
62 devices = <&fwconcat0 &fwconcat1>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "ubi";
71 reg = <0x0 0x0>;
72 };
73 };
74 };
75 };
76
77 &nand {
78 status = "okay";
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "bootloader";
87 reg = <0x0 0x80000>;
88 read-only;
89 };
90
91 partition@80000 {
92 label = "config";
93 reg = <0x80000 0x80000>;
94 read-only;
95 };
96
97 factory: partition@100000 {
98 label = "factory";
99 reg = <0x100000 0x80000>;
100 read-only;
101 };
102
103 partition@180000 {
104 label = "config2";
105 reg = <0x180000 0x40000>;
106 read-only;
107 };
108
109 partition@1c0000 {
110 label = "kernel";
111 reg = <0x1c0000 0x800000>;
112 };
113
114 fwconcat0: partition@9c0000 {
115 label = "fwconcat0";
116 reg = <0x9c0000 0x2000000>;
117 };
118
119 partition@29c0000 {
120 label = "kernel2";
121 reg = <0x29c0000 0x800000>;
122 read-only;
123 };
124
125 fwconcat1: partition@31c0000 {
126 label = "fwconcat1";
127 reg = <0x31c0000 0x2a00000>;
128 };
129
130 partition@5bc0000 {
131 label = "private";
132 reg = <0x5bc0000 0x1400000>;
133 read-only;
134 };
135
136 partition@6fc0000 {
137 label = "mydlink";
138 reg = <0x6fc0000 0x600000>;
139 read-only;
140 };
141
142 partition@75c0000 {
143 label = "myconfig";
144 reg = <0x75c0000 0xa00000>;
145 read-only;
146 };
147 };
148 };
149
150 &pcie {
151 status = "okay";
152 };
153
154 &pcie1 {
155 wifi@0,0 {
156 compatible = "mediatek,mt76";
157 reg = <0x0000 0 0 0 0>;
158 mediatek,mtd-eeprom = <&factory 0x0>;
159 mediatek,disable-radar-background;
160 };
161 };
162
163 &gmac1 {
164 status = "okay";
165 phy-handle = <&ethphy4>;
166 };
167
168 &mdio {
169 ethphy4: ethernet-phy@4 {
170 reg = <4>;
171 };
172 };
173
174 &switch0 {
175 ports {
176 port@0 {
177 status = "okay";
178 label = "internet";
179 };
180
181 port@2 {
182 status = "okay";
183 label = "ethernet";
184 };
185 };
186 };