b538805851db25091af89bb06def34de01a485e3
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_mercusys_mr70x-v1.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 = "mercusys,mr70x-v1", "mediatek,mt7621-soc";
10 model = "MERCUSYS MR70X v1";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_orange;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_orange;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_power_green: power-green {
38 label = "green:power";
39 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
40 };
41
42 led_power_orange: power-orange {
43 label = "orange:power";
44 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
45 };
46 };
47 };
48
49 &spi0 {
50 status = "okay";
51
52 flash@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <25000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "u-boot";
64 reg = <0x000000 0x040000>;
65 read-only;
66 };
67
68 partition@40000 {
69 compatible = "denx,uimage";
70 label = "firmware";
71 reg = <0x040000 0xf60000>;
72 };
73
74 config: partition@fa0000 {
75 label = "config";
76 reg = <0xfa0000 0x010000>;
77 read-only;
78
79 nvmem-layout {
80 compatible = "fixed-layout";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 macaddr_config_8: macaddr@8 {
85 reg = <0x8 0x6>;
86 };
87 };
88 };
89
90 partition@fb0000 {
91 label = "tplink";
92 reg = <0xfb0000 0x040000>;
93 read-only;
94 };
95
96 radio: partition@ff0000 {
97 label = "radio";
98 reg = <0xff0000 0x010000>;
99 read-only;
100 };
101 };
102 };
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie1 {
110 wifi@0,0 {
111 compatible = "mediatek,mt76";
112 reg = <0x0000 0 0 0 0>;
113 mediatek,mtd-eeprom = <&radio 0x0>;
114 nvmem-cells = <&macaddr_config_8>;
115 nvmem-cell-names = "mac-address";
116 mediatek,disable-radar-background;
117 };
118 };
119
120 &gmac0 {
121 nvmem-cells = <&macaddr_config_8>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &gmac1 {
126 status = "okay";
127 label = "wan";
128 phy-handle = <&ethphy0>;
129
130 nvmem-cells = <&macaddr_config_8>;
131 nvmem-cell-names = "mac-address";
132 mac-address-increment = <1>;
133 };
134
135 &mdio {
136 ethphy0: ethernet-phy@0 {
137 reg = <0>;
138 };
139 };
140
141 &switch0 {
142 ports {
143 port@1 {
144 status = "okay";
145 label = "lan1";
146 };
147
148 port@2 {
149 status = "okay";
150 label = "lan2";
151 };
152
153 port@3 {
154 status = "okay";
155 label = "lan3";
156 };
157 };
158 };
159
160 &state_default {
161 gpio {
162 groups = "i2c", "uart3";
163 function = "gpio";
164 };
165 };