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