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