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