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