ramips: mt76x8: add support for TP-Link RE365 v1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_mqmaker_witi.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "mqmaker,witi", "mediatek,mt7621-soc";
8 model = "MQmaker WiTi";
9
10 keys {
11 compatible = "gpio-keys";
12
13 reset {
14 label = "reset";
15 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
16 linux,code = <KEY_RESTART>;
17 };
18 };
19 };
20
21 &i2c {
22 status = "okay";
23
24 rtc@51 {
25 status = "okay";
26 compatible = "nxp,pcf8563";
27 reg = <0x51>;
28 };
29 };
30
31 &sdhci {
32 status = "okay";
33 };
34
35 &spi0 {
36 status = "okay";
37
38 flash@0 {
39 compatible = "jedec,spi-nor";
40 reg = <0>;
41 spi-max-frequency = <10000000>;
42
43 partitions {
44 compatible = "fixed-partitions";
45 #address-cells = <1>;
46 #size-cells = <1>;
47
48 partition@0 {
49 label = "u-boot";
50 reg = <0x0 0x30000>;
51 read-only;
52 };
53
54 partition@30000 {
55 label = "u-boot-env";
56 reg = <0x30000 0x10000>;
57 read-only;
58 };
59
60 factory: partition@40000 {
61 label = "factory";
62 reg = <0x40000 0x10000>;
63
64 nvmem-layout {
65 compatible = "fixed-layout";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 eeprom_factory_0: eeprom@0 {
70 reg = <0x0 0x200>;
71 };
72
73 eeprom_factory_8000: eeprom@8000 {
74 reg = <0x8000 0x200>;
75 };
76
77 macaddr_factory_e000: macaddr@e000 {
78 compatible = "mac-base";
79 reg = <0xe000 0x6>;
80 #nvmem-cell-cells = <1>;
81 };
82 };
83 };
84
85 partition@50000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0x50000 0xfb0000>;
89 };
90 };
91 };
92 };
93
94 &pcie {
95 status = "okay";
96 };
97
98 &pcie0 {
99 mt76@0,0 {
100 reg = <0x0000 0 0 0 0>;
101 ieee80211-freq-limit = <5000000 6000000>;
102 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 0>;
103 nvmem-cell-names = "eeprom", "mac-address";
104 };
105 };
106
107 &pcie1 {
108 mt76@0,0 {
109 reg = <0x0000 0 0 0 0>;
110 ieee80211-freq-limit = <2400000 2500000>;
111 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 0>;
112 nvmem-cell-names = "eeprom", "mac-address";
113 };
114 };
115
116 &gmac0 {
117 nvmem-cells = <&macaddr_factory_e000 0>;
118 nvmem-cell-names = "mac-address";
119 };
120
121 &gmac1 {
122 status = "okay";
123 label = "wan2";
124 phy-mode = "rgmii-rxid";
125 phy-handle = <&ethphy5>;
126
127 nvmem-cells = <&macaddr_factory_e000 1>;
128 nvmem-cell-names = "mac-address";
129 };
130
131 &mdio {
132 ethphy5: ethernet-phy@5 {
133 reg = <5>;
134 };
135 };
136
137 &switch0 {
138 ports {
139 port@0 {
140 status = "okay";
141 label = "lan1";
142 };
143
144 port@1 {
145 status = "okay";
146 label = "lan2";
147 };
148
149 port@2 {
150 status = "okay";
151 label = "lan3";
152 };
153
154 port@3 {
155 status = "okay";
156 label = "lan4";
157 };
158
159 port@4 {
160 status = "okay";
161 label = "wan1";
162
163 nvmem-cells = <&macaddr_factory_e000 1>;
164 nvmem-cell-names = "mac-address";
165 };
166 };
167 };
168
169 &state_default {
170 gpio {
171 groups = "wdt";
172 function = "gpio";
173 };
174 };