e96a5d660e66800bd0227ac5b864c94e1f7381b5
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iptime_a8004t.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "iptime,a8004t", "mediatek,mt7621-soc";
11 model = "ipTIME A8004T";
12
13 chosen {
14 bootargs = "console=ttyS0,57600";
15 };
16
17 aliases {
18 led-boot = &led_cpu;
19 led-failsafe = &led_cpu;
20 led-running = &led_cpu;
21 led-upgrade = &led_cpu;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_cpu: cpu {
28 label = "a8004t:orange:cpu";
29 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
30 };
31
32 wlan2g {
33 label = "a8004t:orange:wlan2g";
34 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
35 linux,default-trigger = "phy0radio";
36 };
37
38 wlan5g {
39 label = "a8004t:orange:wlan5g";
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "phy1radio";
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 reset {
49 label = "reset";
50 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53
54 wps {
55 label = "wps";
56 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_WPS_BUTTON>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <50000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 uboot: partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x20000>;
78 read-only;
79 };
80
81 partition@20000 {
82 label = "config";
83 reg = <0x20000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@30000 {
88 label = "factory";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 partition@40000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x40000 0xfc0000>;
97 };
98 };
99 };
100 };
101
102 &gmac0 {
103 mtd-mac-address = <&uboot 0x1fc20>;
104 };
105
106 &switch0 {
107 ports {
108 port@0 {
109 status = "okay";
110 label = "wan";
111 mtd-mac-address = <&uboot 0x1fc40>;
112 };
113
114 port@1 {
115 status = "okay";
116 label = "lan4";
117 };
118
119 port@2 {
120 status = "okay";
121 label = "lan3";
122 };
123
124 port@3 {
125 status = "okay";
126 label = "lan2";
127 };
128
129 port@4 {
130 status = "okay";
131 label = "lan1";
132 };
133 };
134 };
135
136 &pcie {
137 status = "okay";
138 };
139
140 &pcie0 {
141 wifi@0,0 {
142 compatible = "mediatek,mt76";
143 reg = <0x0000 0 0 0 0>;
144 mediatek,mtd-eeprom = <&factory 0x0000>;
145 ieee80211-freq-limit = <2400000 2500000>;
146 };
147 };
148
149 &pcie1 {
150 wifi@0,0 {
151 compatible = "mediatek,mt76";
152 reg = <0x0000 0 0 0 0>;
153 mediatek,mtd-eeprom = <&factory 0x8000>;
154 ieee80211-freq-limit = <5000000 6000000>;
155 };
156 };
157
158 &state_default {
159 gpio {
160 groups = "wdt", "jtag", "i2c";
161 function = "gpio";
162 };
163 };