ramips: Add support for TP-Link Archer C50 v6 (CA/EU/RU)
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iptime_a3002mesh.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,a3002mesh", "mediatek,mt7621-soc";
11 model = "ipTIME A3002MESH";
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 = "amber:cpu";
25 color = <LED_COLOR_ID_AMBER>;
26 function = LED_FUNCTION_CPU;
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 };
29
30 led-1 {
31 color = <LED_COLOR_ID_AMBER>;
32 function = LED_FUNCTION_WLAN;
33 function-enumerator = <0>;
34 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
35 linux,default-trigger = "phy0radio";
36 };
37
38 led-2 {
39 color = <LED_COLOR_ID_AMBER>;
40 function = LED_FUNCTION_WLAN;
41 function-enumerator = <1>;
42 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1radio";
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 reset {
51 label = "reset";
52 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RESTART>;
54 };
55 };
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <50000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x20000>;
74 read-only;
75
76 compatible = "nvmem-cells";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 macaddr_uboot_1fc40: macaddr@1fc40 {
81 reg = <0x1fc40 0x6>;
82 };
83 };
84
85 partition@20000 {
86 label = "config";
87 reg = <0x20000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@30000 {
92 compatible = "nvmem-cells";
93 label = "factory";
94 reg = <0x30000 0x10000>;
95 #address-cells = <1>;
96 #size-cells = <1>;
97 read-only;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x4da8>;
101 };
102 };
103
104 partition@40000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x40000 0xfc0000>;
108 };
109 };
110 };
111 };
112
113 &gmac0 {
114 nvmem-cells = <&macaddr_uboot_1fc40>;
115 nvmem-cell-names = "mac-address";
116 mac-address-increment = <(2)>;
117 };
118
119 &gmac1 {
120 status = "okay";
121 label = "wan";
122 phy-handle = <&ethphy0>;
123
124 nvmem-cells = <&macaddr_uboot_1fc40>;
125 nvmem-cell-names = "mac-address";
126 };
127
128 &mdio {
129 ethphy0: ethernet-phy@0 {
130 reg = <0>;
131 };
132 };
133
134 &switch0 {
135 ports {
136 port@3 {
137 status = "okay";
138 label = "lan1";
139 };
140
141 port@4 {
142 status = "okay";
143 label = "lan2";
144 };
145 };
146 };
147
148 &pcie {
149 status = "okay";
150 };
151
152 &pcie0 {
153 wifi@0,0 {
154 compatible = "mediatek,mt76";
155 reg = <0x0000 0 0 0 0>;
156 nvmem-cells = <&eeprom_factory_0>;
157 nvmem-cell-names = "eeprom";
158 };
159 };
160
161 &state_default {
162 gpio {
163 groups = "i2c", "jtag", "wdt";
164 function = "gpio";
165 };
166 };