ramips: add support for WAVLINK WL-WN573HX1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_totolink_a7000r.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 = "totolink,a7000r", "mediatek,mt7621-soc";
10 model = "TOTOLINK A7000R";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_sys: sys {
23 label = "blue:sys";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 };
26 };
27
28 keys {
29 compatible = "gpio-keys";
30
31 reset {
32 label = "reset";
33 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
34 debounce-interval = <60>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38 };
39
40 &spi0 {
41 status = "okay";
42
43 flash@0 {
44 compatible = "jedec,spi-nor";
45 reg = <0>;
46 spi-max-frequency = <40000000>;
47
48 partitions {
49 compatible = "fixed-partitions";
50 #address-cells = <1>;
51 #size-cells = <1>;
52
53 partition@0 {
54 label = "u-boot";
55 reg = <0x0 0x30000>;
56 read-only;
57 };
58
59 partition@30000 {
60 label = "u-boot-env";
61 reg = <0x30000 0x10000>;
62 read-only;
63 };
64
65 factory: partition@40000 {
66 label = "factory";
67 reg = <0x40000 0x10000>;
68 read-only;
69 };
70
71 partition@50000 {
72 compatible = "denx,uimage";
73 label = "firmware";
74 reg = <0x50000 0xfb0000>;
75 };
76 };
77 };
78 };
79
80 &pcie {
81 status = "okay";
82 };
83
84 &pcie0 {
85 wifi@0,0 {
86 compatible = "mediatek,mt76";
87 reg = <0x0000 0 0 0 0>;
88 mediatek,mtd-eeprom = <&factory 0x0000>;
89 ieee80211-freq-limit = <2400000 2500000>;
90 };
91 };
92
93 &pcie1 {
94 wifi@0,0 {
95 compatible = "mediatek,mt76";
96 reg = <0x0000 0 0 0 0>;
97 mediatek,mtd-eeprom = <&factory 0x8000>;
98 ieee80211-freq-limit = <5000000 6000000>;
99 };
100 };
101
102 &gmac0 {
103 nvmem-cells = <&macaddr_factory_e000>;
104 nvmem-cell-names = "mac-address";
105 };
106
107 &gmac1 {
108 status = "okay";
109 label = "wan";
110 phy-handle = <&ethphy4>;
111
112 nvmem-cells = <&macaddr_factory_e000>;
113 nvmem-cell-names = "mac-address";
114 mac-address-increment = <1>;
115 };
116
117 &mdio {
118 ethphy4: ethernet-phy@4 {
119 reg = <4>;
120 };
121 };
122
123 &switch0 {
124 ports {
125 port@0 {
126 status = "okay";
127 label = "lan1";
128 };
129
130 port@1 {
131 status = "okay";
132 label = "lan2";
133 };
134
135 port@2 {
136 status = "okay";
137 label = "lan3";
138 };
139
140 port@3 {
141 status = "okay";
142 label = "lan4";
143 };
144 };
145 };
146
147 &state_default {
148 gpio {
149 groups = "i2c", "wdt";
150 function = "gpio";
151 };
152 };
153
154 &factory {
155 compatible = "nvmem-cells";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 macaddr_factory_e000: macaddr@e000 {
160 reg = <0xe000 0x6>;
161 };
162 };