ramips: add support for ZyXEL LTE5398-M904
[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 compatible = "nvmem-cells";
67 label = "factory";
68 reg = <0x40000 0x10000>;
69 #address-cells = <1>;
70 #size-cells = <1>;
71 read-only;
72
73 eeprom_factory_0: eeprom@0 {
74 reg = <0x0 0x4da8>;
75 };
76
77 eeprom_factory_8000: eeprom@8000 {
78 reg = <0x8000 0x4da8>;
79 };
80
81 macaddr_factory_e000: macaddr@e000 {
82 reg = <0xe000 0x6>;
83 };
84 };
85
86 partition@50000 {
87 compatible = "denx,uimage";
88 label = "firmware";
89 reg = <0x50000 0xfb0000>;
90 };
91 };
92 };
93 };
94
95 &pcie {
96 status = "okay";
97 };
98
99 &pcie0 {
100 wifi@0,0 {
101 compatible = "mediatek,mt76";
102 reg = <0x0000 0 0 0 0>;
103 nvmem-cells = <&eeprom_factory_0>;
104 nvmem-cell-names = "eeprom";
105 ieee80211-freq-limit = <2400000 2500000>;
106 };
107 };
108
109 &pcie1 {
110 wifi@0,0 {
111 compatible = "mediatek,mt76";
112 reg = <0x0000 0 0 0 0>;
113 nvmem-cells = <&eeprom_factory_8000>;
114 nvmem-cell-names = "eeprom";
115 ieee80211-freq-limit = <5000000 6000000>;
116 };
117 };
118
119 &gmac0 {
120 nvmem-cells = <&macaddr_factory_e000>;
121 nvmem-cell-names = "mac-address";
122 };
123
124 &gmac1 {
125 status = "okay";
126 label = "wan";
127 phy-handle = <&ethphy4>;
128
129 nvmem-cells = <&macaddr_factory_e000>;
130 nvmem-cell-names = "mac-address";
131 mac-address-increment = <1>;
132 };
133
134 &mdio {
135 ethphy4: ethernet-phy@4 {
136 reg = <4>;
137 };
138 };
139
140 &switch0 {
141 ports {
142 port@0 {
143 status = "okay";
144 label = "lan1";
145 };
146
147 port@1 {
148 status = "okay";
149 label = "lan2";
150 };
151
152 port@2 {
153 status = "okay";
154 label = "lan3";
155 };
156
157 port@3 {
158 status = "okay";
159 label = "lan4";
160 };
161 };
162 };
163
164 &state_default {
165 gpio {
166 groups = "i2c", "wdt";
167 function = "gpio";
168 };
169 };