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