ramips: add support for D-Link DIR-1960 A1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-xx60-a1.dtsi
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 aliases {
10 label-mac-device = &gmac0;
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21
22 wps {
23 label = "wps";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27 };
28 };
29
30 &nand {
31 status = "okay";
32
33 partitions {
34 compatible = "fixed-partitions";
35 #address-cells = <1>;
36 #size-cells = <1>;
37
38 partition@0 {
39 label = "Bootloader";
40 reg = <0x0 0x80000>;
41 read-only;
42 };
43
44 partition@80000 {
45 label = "config";
46 reg = <0x80000 0x80000>;
47 read-only;
48 };
49
50 factory: partition@100000 {
51 label = "factory";
52 reg = <0x100000 0x40000>;
53 read-only;
54 };
55
56 partition@140000 {
57 label = "config2";
58 reg = <0x140000 0x40000>;
59 read-only;
60 };
61
62 partition@180000 {
63 label = "firmware";
64 compatible = "sge,uimage";
65 reg = <0x180000 0x2800000>;
66 };
67
68 partition@2980000 {
69 label = "private";
70 reg = <0x2980000 0x2000000>;
71 read-only;
72 };
73
74 partition@4980000 {
75 label = "firmware2";
76 compatible = "sge,uimage";
77 reg = <0x4980000 0x2800000>;
78 };
79
80 partition@7180000 {
81 label = "mydlink";
82 reg = <0x7180000 0x600000>;
83 read-only;
84 };
85
86 partition@7780000 {
87 label = "reserved";
88 reg = <0x7780000 0x880000>;
89 read-only;
90 };
91 };
92 };
93
94 &pcie {
95 status = "okay";
96 };
97
98 &pcie0 {
99 wifi0: wifi@0,0 {
100 compatible = "mediatek,mt76";
101 reg = <0x0000 0 0 0 0>;
102 mediatek,mtd-eeprom = <&factory 0x0000>;
103 ieee80211-freq-limit = <2400000 2500000>;
104
105 led {
106 led-active-low;
107 };
108 };
109 };
110
111 &pcie1 {
112 wifi1: wifi@0,0 {
113 compatible = "mediatek,mt76";
114 reg = <0x0000 0 0 0 0>;
115 mediatek,mtd-eeprom = <&factory 0x8000>;
116 ieee80211-freq-limit = <5000000 6000000>;
117
118 led {
119 led-active-low;
120 };
121 };
122 };
123
124 &gmac0 {
125 mtd-mac-address = <&factory 0xe000>;
126 };
127
128 &switch0 {
129 ports {
130 port@0 {
131 status = "okay";
132 label = "lan4";
133 };
134
135 port@1 {
136 status = "okay";
137 label = "lan3";
138 };
139
140 port@2 {
141 status = "okay";
142 label = "lan2";
143 };
144
145 port@3 {
146 status = "okay";
147 label = "lan1";
148 };
149
150 port@4 {
151 status = "okay";
152 label = "wan";
153 mtd-mac-address = <&factory 0xe006>;
154 };
155 };
156 };
157
158 &state_default {
159 gpio {
160 groups = "i2c", "uart3", "jtag", "wdt";
161 function = "gpio";
162 };
163 };