eb437b55285b1c3b15dc63d82f3b146338dc6512
[openwrt/staging/rmilecki.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 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 label = "a8004t:orange:cpu";
25 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
26 };
27
28 wlan2g {
29 label = "a8004t:orange:wlan2g";
30 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
31 linux,default-trigger = "phy0radio";
32 };
33
34 wlan5g {
35 label = "a8004t:orange:wlan5g";
36 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy1radio";
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "reset";
46 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
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 uboot: partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x20000>;
74 read-only;
75 };
76
77 partition@20000 {
78 label = "config";
79 reg = <0x20000 0x10000>;
80 read-only;
81 };
82
83 factory: partition@30000 {
84 label = "factory";
85 reg = <0x30000 0x10000>;
86 read-only;
87 };
88
89 partition@40000 {
90 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x40000 0xfc0000>;
93 };
94 };
95 };
96 };
97
98 &gmac0 {
99 mtd-mac-address = <&uboot 0x1fc20>;
100 };
101
102 &switch0 {
103 ports {
104 port@0 {
105 status = "okay";
106 label = "wan";
107 mtd-mac-address = <&uboot 0x1fc40>;
108 };
109
110 port@1 {
111 status = "okay";
112 label = "lan4";
113 };
114
115 port@2 {
116 status = "okay";
117 label = "lan3";
118 };
119
120 port@3 {
121 status = "okay";
122 label = "lan2";
123 };
124
125 port@4 {
126 status = "okay";
127 label = "lan1";
128 };
129 };
130 };
131
132 &pcie {
133 status = "okay";
134 };
135
136 &pcie0 {
137 wifi@0,0 {
138 compatible = "mediatek,mt76";
139 reg = <0x0000 0 0 0 0>;
140 mediatek,mtd-eeprom = <&factory 0x0000>;
141 ieee80211-freq-limit = <2400000 2500000>;
142 };
143 };
144
145 &pcie1 {
146 wifi@0,0 {
147 compatible = "mediatek,mt76";
148 reg = <0x0000 0 0 0 0>;
149 mediatek,mtd-eeprom = <&factory 0x8000>;
150 ieee80211-freq-limit = <5000000 6000000>;
151 };
152 };
153
154 &state_default {
155 gpio {
156 groups = "wdt", "jtag", "i2c";
157 function = "gpio";
158 };
159 };