mediatek: filogic: add Qihoo 360T7 support
[openwrt/staging/jow.git] / target / linux / mediatek / dts / mt7981b-qihoo-360t7.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "mt7981.dtsi"
8
9 / {
10 model = "Qihoo 360T7";
11 compatible = "qihoo,360t7", "mediatek,mt7981";
12
13 aliases {
14 serial0 = &uart0;
15 led-boot = &led_status_red;
16 led-failsafe = &led_status_red;
17 led-running = &led_status_green;
18 led-upgrade = &led_status_green;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24
25 memory {
26 reg = <0 0x40000000 0 0x10000000>;
27 };
28
29 gpio-keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 linux,code = <KEY_RESTART>;
35 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
36 };
37
38 wps {
39 label = "wps";
40 linux,code = <KEY_WPS_BUTTON>;
41 gpios = <&pio 0 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_status_red: red {
49 label = "red:status";
50 gpios = <&pio 3 GPIO_ACTIVE_LOW>;
51 };
52
53 led_status_green: green {
54 label = "green:status";
55 gpios = <&pio 7 GPIO_ACTIVE_LOW>;
56 };
57 };
58 };
59
60 &eth {
61 status = "okay";
62
63 gmac0: mac@0 {
64 compatible = "mediatek,eth-mac";
65 reg = <0>;
66 phy-mode = "2500base-x";
67
68 fixed-link {
69 speed = <2500>;
70 full-duplex;
71 pause;
72 };
73 };
74 };
75
76 &mdio_bus {
77 switch: switch@0 {
78 compatible = "mediatek,mt7531";
79 reg = <31>;
80 reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
81 interrupt-controller;
82 #interrupt-cells = <1>;
83 interrupt-parent = <&pio>;
84 interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
85 };
86 };
87
88 &spi0 {
89 pinctrl-names = "default";
90 pinctrl-0 = <&spi0_flash_pins>;
91 status = "okay";
92
93 spi_nand@0 {
94 compatible = "spi-nand";
95 #address-cells = <1>;
96 #size-cells = <1>;
97 reg = <0>;
98
99 spi-max-frequency = <52000000>;
100 spi-tx-buswidth = <4>;
101 spi-rx-buswidth = <4>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "bl2";
110 reg = <0x0000000 0x0100000>;
111 read-only;
112 };
113
114 partition@100000 {
115 label = "u-boot-env";
116 reg = <0x0100000 0x0080000>;
117 };
118
119 factory: partition@180000 {
120 label = "Factory";
121 reg = <0x0180000 0x0200000>;
122 read-only;
123 };
124
125 partition@380000 {
126 label = "fip";
127 reg = <0x0380000 0x0200000>;
128 read-only;
129 };
130
131 partition@580000 {
132 label = "ubi";
133 reg = <0x0580000 0x6c00000>;
134 };
135
136 partition@7180000 {
137 label = "config";
138 reg = <0x7180000 0x0100000>;
139 read-only;
140 };
141
142 partition@7280000 {
143 label = "factory";
144 reg = <0x7280000 0x0080000>;
145 read-only;
146 };
147
148 partition@7300000 {
149 label = "log";
150 reg = <0x7300000 0x0700000>;
151 read-only;
152 };
153 };
154 };
155 };
156
157 &switch {
158 ports {
159 #address-cells = <1>;
160 #size-cells = <0>;
161
162 port@0 {
163 reg = <0>;
164 label = "lan3";
165 };
166
167 port@1 {
168 reg = <1>;
169 label = "lan2";
170 };
171
172 port@2 {
173 reg = <2>;
174 label = "lan1";
175 };
176
177 port@3 {
178 reg = <3>;
179 label = "wan";
180 };
181
182 port@6 {
183 reg = <6>;
184 ethernet = <&gmac0>;
185 phy-mode = "2500base-x";
186
187 fixed-link {
188 speed = <2500>;
189 full-duplex;
190 pause;
191 };
192 };
193 };
194 };
195
196 &pio {
197 spi0_flash_pins: spi0-pins {
198 mux {
199 function = "spi";
200 groups = "spi0", "spi0_wp_hold";
201 };
202
203 conf-pu {
204 pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
205 drive-strength = <8>;
206 mediatek,pull-up-adv = <0>; /* bias-disable */
207 };
208
209 conf-pd {
210 pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
211 drive-strength = <8>;
212 mediatek,pull-up-adv = <0>; /* bias-disable */
213 };
214 };
215 };
216
217 &uart0 {
218 status = "okay";
219 };
220
221 &watchdog {
222 status = "okay";
223 };
224
225 &wifi {
226 status = "okay";
227
228 mediatek,mtd-eeprom = <&factory 0x0>;
229 };