mediatek: remove "Ralink" from the target name
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iptime_a3004t.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,a3004t", "mediatek,mt7621-soc";
11 model = "ipTIME A3004T";
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 color = <LED_COLOR_ID_AMBER>;
25 function = LED_FUNCTION_CPU;
26 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
27 };
28
29 led-1 {
30 color = <LED_COLOR_ID_AMBER>;
31 function = LED_FUNCTION_WLAN;
32 function-enumerator = <0>;
33 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
34 linux,default-trigger = "phy0radio";
35 };
36
37 led-2 {
38 color = <LED_COLOR_ID_AMBER>;
39 function = LED_FUNCTION_WLAN;
40 function-enumerator = <1>;
41 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy1radio";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "reset";
51 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54 };
55 };
56
57 &nand {
58 status = "okay";
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x80000>;
68 read-only;
69 };
70
71 partition@80000 {
72 label = "config";
73 reg = <0x80000 0x20000>;
74 read-only;
75 };
76
77 partition@a0000 {
78 label = "factory";
79 reg = <0xa0000 0x20000>;
80 read-only;
81
82 nvmem-layout {
83 compatible = "fixed-layout";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 eeprom_factory_0: eeprom@0 {
88 reg = <0x0 0x4da8>;
89 };
90
91 macaddr_factory_4: macaddr@4 {
92 compatible = "mac-base";
93 reg = <0x4 0x6>;
94 #nvmem-cell-cells = <1>;
95 };
96 };
97 };
98
99 partition@140000 {
100 label = "firmware";
101 reg = <0x140000 0x7e40000>;
102
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 partition@0 {
108 label = "kernel";
109 reg = <0x0 0x400000>;
110 };
111
112 partition@400000 {
113 label = "ubi";
114 reg = <0x400000 0x7a40000>;
115 };
116 };
117 };
118 };
119
120 &gmac0 {
121 nvmem-cells = <&macaddr_factory_4 3>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &gmac1 {
126 status = "okay";
127 label = "wan";
128 phy-handle = <&ethphy0>;
129
130 nvmem-cells = <&macaddr_factory_4 1>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &ethphy0 {
135 /delete-property/ interrupts;
136 };
137
138 &switch0 {
139 ports {
140 port@1 {
141 status = "okay";
142 label = "lan4";
143 };
144
145 port@2 {
146 status = "okay";
147 label = "lan3";
148 };
149
150 port@3 {
151 status = "okay";
152 label = "lan2";
153 };
154
155 port@4 {
156 status = "okay";
157 label = "lan1";
158 };
159 };
160 };
161
162 &pcie {
163 status = "okay";
164 };
165
166 &pcie0 {
167 wifi@0,0 {
168 compatible = "mediatek,mt76";
169 reg = <0x0000 0 0 0 0>;
170 nvmem-cells = <&eeprom_factory_0>;
171 nvmem-cell-names = "eeprom";
172 };
173 };
174
175 &state_default {
176 gpio {
177 groups = "i2c", "jtag", "wdt";
178 function = "gpio";
179 };
180 };