a033d7f665350b79a6fd389ac1c0320f7c744886
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_iptime_a6004ns-m.dtsi
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 aliases {
10 led-boot = &led_cpu;
11 led-failsafe = &led_cpu;
12 led-running = &led_cpu;
13 led-upgrade = &led_cpu;
14 label-mac-device = &gmac0;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 usb {
21 label = "blue:usb";
22 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
23 trigger-sources = <&xhci_ehci_port1>;
24 linux,default-trigger = "usbport";
25 };
26
27 wlan5g {
28 label = "blue:wlan5g";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 linux,default-trigger = "phy0radio";
31 };
32
33 wlan2g {
34 label = "blue:wlan2g";
35 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy1radio";
37 };
38
39 led_cpu: cpu {
40 label = "blue:cpu";
41 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 wps {
49 label = "wps";
50 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_WPS_BUTTON>;
52 };
53
54 reset {
55 label = "reset";
56 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
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 = <80000000>;
69 m25p,fast-read;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 uboot: partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x20000>;
79 read-only;
80 };
81
82 partition@20000 {
83 label = "config";
84 reg = <0x20000 0x10000>;
85 read-only;
86 };
87
88 factory: partition@30000 {
89 label = "factory";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 partition@40000 {
95 compatible = "denx,uimage";
96 label = "firmware";
97 reg = <0x40000 0xfc0000>;
98 };
99 };
100 };
101 };
102
103 &state_default {
104 gpio {
105 groups = "i2c", "uart3", "jtag", "wdt";
106 function = "gpio";
107 };
108 };
109
110 &gmac0 {
111 nvmem-cells = <&macaddr_uboot_1fc20>;
112 nvmem-cell-names = "mac-address";
113 };
114
115 &switch0 {
116 ports {
117 port@0 {
118 status = "okay";
119 label = "wan";
120 nvmem-cells = <&macaddr_uboot_1fc40>;
121 nvmem-cell-names = "mac-address";
122 };
123
124 port@1 {
125 status = "okay";
126 label = "lan1";
127 };
128
129 port@2 {
130 status = "okay";
131 label = "lan2";
132 };
133
134 port@3 {
135 status = "okay";
136 label = "lan3";
137 };
138
139 port@4 {
140 status = "okay";
141 label = "lan4";
142 };
143 };
144 };
145
146 &pcie {
147 status = "okay";
148 };
149
150 &pcie0 {
151 wifi@0,0 {
152 compatible = "mediatek,mt76";
153 reg = <0x0000 0 0 0 0>;
154 mediatek,mtd-eeprom = <&factory 0x0>;
155 ieee80211-freq-limit = <5000000 6000000>;
156 };
157 };
158
159 &pcie1 {
160 wifi@0,0 {
161 compatible = "mediatek,mt76";
162 reg = <0x0000 0 0 0 0>;
163 mediatek,mtd-eeprom = <&factory 0x8000>;
164 ieee80211-freq-limit = <2400000 2500000>;
165 };
166 };
167
168 &uboot {
169 compatible = "nvmem-cells";
170 #address-cells = <1>;
171 #size-cells = <1>;
172
173 macaddr_uboot_1fc20: macaddr@1fc20 {
174 reg = <0x1fc20 0x6>;
175 };
176
177 macaddr_uboot_1fc40: macaddr@1fc40 {
178 reg = <0x1fc40 0x6>;
179 };
180 };