ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_iptime_a8004t.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,a8004t", "mediatek,mt7621-soc";
11 model = "ipTIME A8004T";
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: cpu {
24 function = LED_FUNCTION_CPU;
25 color = <LED_COLOR_ID_ORANGE>;
26 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
27 };
28
29 wlan2g {
30 label = "orange:wlan2g";
31 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy0radio";
33 };
34
35 wlan5g {
36 label = "orange:wlan5g";
37 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "phy1radio";
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56 };
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <50000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 uboot: partition@0 {
73 label = "u-boot";
74 reg = <0x0 0x20000>;
75 read-only;
76
77 nvmem-layout {
78 compatible = "fixed-layout";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 macaddr_uboot_1fc20: macaddr@1fc20 {
83 reg = <0x1fc20 0x6>;
84 };
85
86 macaddr_uboot_1fc40: macaddr@1fc40 {
87 reg = <0x1fc40 0x6>;
88 };
89 };
90 };
91
92 partition@20000 {
93 label = "config";
94 reg = <0x20000 0x10000>;
95 read-only;
96 };
97
98 factory: partition@30000 {
99 label = "factory";
100 reg = <0x30000 0x10000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x4da8>;
110 };
111
112 eeprom_factory_8000: eeprom@8000 {
113 reg = <0x8000 0x4da8>;
114 };
115 };
116 };
117
118 partition@40000 {
119 compatible = "denx,uimage";
120 label = "firmware";
121 reg = <0x40000 0xfc0000>;
122 };
123 };
124 };
125 };
126
127 &gmac0 {
128 nvmem-cells = <&macaddr_uboot_1fc20>;
129 nvmem-cell-names = "mac-address";
130 };
131
132 &gmac1 {
133 status = "okay";
134 label = "wan";
135 phy-handle = <&ethphy0>;
136
137 nvmem-cells = <&macaddr_uboot_1fc40>;
138 nvmem-cell-names = "mac-address";
139 };
140
141 &mdio {
142 ethphy0: ethernet-phy@0 {
143 reg = <0>;
144 };
145 };
146
147 &switch0 {
148 ports {
149 port@1 {
150 status = "okay";
151 label = "lan4";
152 };
153
154 port@2 {
155 status = "okay";
156 label = "lan3";
157 };
158
159 port@3 {
160 status = "okay";
161 label = "lan2";
162 };
163
164 port@4 {
165 status = "okay";
166 label = "lan1";
167 };
168 };
169 };
170
171 &pcie {
172 status = "okay";
173 };
174
175 &pcie0 {
176 wifi@0,0 {
177 compatible = "mediatek,mt76";
178 reg = <0x0000 0 0 0 0>;
179 nvmem-cells = <&eeprom_factory_0>;
180 nvmem-cell-names = "eeprom";
181 ieee80211-freq-limit = <2400000 2500000>;
182 };
183 };
184
185 &pcie1 {
186 wifi@0,0 {
187 compatible = "mediatek,mt76";
188 reg = <0x0000 0 0 0 0>;
189 nvmem-cells = <&eeprom_factory_8000>;
190 nvmem-cell-names = "eeprom";
191 ieee80211-freq-limit = <5000000 6000000>;
192 };
193 };
194
195 &state_default {
196 gpio {
197 groups = "wdt", "jtag", "i2c";
198 function = "gpio";
199 };
200 };