ramips: removing unnecessary compatibility for TP-Link Archer C2 v1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_xiaomi_miwifi-mini.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
9 model = "Xiaomi MiWiFi Mini";
10
11 aliases {
12 led-boot = &led_yellow;
13 led-failsafe = &led_red;
14 led-running = &led_blue;
15 led-upgrade = &led_blue;
16 label-mac-device = &ethernet;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_blue: blue {
27 function = LED_FUNCTION_STATUS;
28 color = <LED_COLOR_ID_BLUE>;
29 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
30 };
31
32 led_yellow: yellow {
33 function = LED_FUNCTION_STATUS;
34 color = <LED_COLOR_ID_YELLOW>;
35 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
36 };
37
38 led_red: red {
39 function = LED_FUNCTION_STATUS;
40 color = <LED_COLOR_ID_RED>;
41 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
42 };
43
44 wan {
45 function = LED_FUNCTION_WAN;
46 color = <LED_COLOR_ID_GREEN>;
47 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
48 };
49
50 lan1 {
51 label = "green:lan1";
52 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
53 };
54
55 lan2 {
56 label = "green:lan2";
57 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 reset {
65 label = "reset";
66 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
67 linux,code = <KEY_RESTART>;
68 };
69 };
70 };
71
72 &gpio1 {
73 status = "okay";
74 };
75
76 &gpio2 {
77 status = "okay";
78 };
79
80 &spi0 {
81 status = "okay";
82
83 flash@0 {
84 compatible = "jedec,spi-nor";
85 reg = <0>;
86 spi-max-frequency = <70000000>;
87 m25p,fast-read;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x0 0x30000>;
97 read-only;
98 };
99
100 partition@30000 {
101 label = "u-boot-env";
102 reg = <0x30000 0x10000>;
103 };
104
105 partition@40000 {
106 label = "factory";
107 reg = <0x40000 0x10000>;
108 read-only;
109
110 nvmem-layout {
111 compatible = "fixed-layout";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 eeprom_factory_0: eeprom@0 {
116 reg = <0x0 0x200>;
117 };
118
119 eeprom_factory_8000: eeprom@8000 {
120 reg = <0x8000 0x200>;
121 };
122
123 macaddr_factory_28: macaddr@28 {
124 reg = <0x28 0x6>;
125 };
126 };
127 };
128
129 partition@50000 {
130 compatible = "denx,uimage";
131 label = "firmware";
132 reg = <0x50000 0xf80000>;
133 };
134
135 partition@fd0000 {
136 label = "crash";
137 reg = <0xfd0000 0x10000>;
138 };
139
140 partition@fe0000 {
141 label = "reserved";
142 reg = <0xfe0000 0x10000>;
143 read-only;
144 };
145
146 partition@ff0000 {
147 label = "Bdata";
148 reg = <0xff0000 0x10000>;
149 };
150 };
151 };
152 };
153
154 &ehci {
155 status = "okay";
156 };
157
158 &ohci {
159 status = "okay";
160 };
161
162 &ethernet {
163 nvmem-cells = <&macaddr_factory_28>;
164 nvmem-cell-names = "mac-address";
165
166 mediatek,portmap = "llllw";
167 };
168
169 &wmac {
170 pinctrl-names = "default", "pa_gpio";
171 pinctrl-0 = <&pa_pins>;
172 pinctrl-1 = <&pa_gpio_pins>;
173 nvmem-cells = <&eeprom_factory_0>;
174 nvmem-cell-names = "eeprom";
175 };
176
177 &pcie {
178 status = "okay";
179 };
180
181 &pcie0 {
182 mt76@0,0 {
183 reg = <0x0000 0 0 0 0>;
184 nvmem-cells = <&eeprom_factory_8000>;
185 nvmem-cell-names = "eeprom";
186 ieee80211-freq-limit = <5000000 6000000>;
187 };
188 };
189
190 &state_default {
191 gpio {
192 groups = "ephy", "i2c", "rgmii1";
193 function = "gpio";
194 };
195 };