2c35a8839cb6372343eb22cab14a16a1884482a4
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_dual-q_h721.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 = "dual-q,h721", "mediatek,mt7621-soc";
10 model = "Dual-Q H721";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 gpio-export {
24 compatible = "gpio-export";
25 #size-cells = <0>;
26
27 usb-30-power {
28 gpio-export,name = "usb-30-power";
29 gpio-export,output = <0>;
30 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
31 };
32
33 usb-20-power {
34 gpio-export,name = "usb-20-power";
35 gpio-export,output = <0>;
36 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 usb1 {
54 label = "green:usb1";
55 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
56 };
57
58 sig1 {
59 label = "green:sig1";
60 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
61 };
62
63 usb2 {
64 label = "green:usb2";
65 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
66 };
67
68 sig2 {
69 label = "green:sig2";
70 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
71 };
72
73 tf {
74 label = "green:tf";
75 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
76 };
77
78 wifi1 {
79 label = "green:wifi1";
80 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
81 };
82
83 wifi2 {
84 label = "green:wifi2";
85 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
86 };
87
88 led_status: status {
89 label = "green:status";
90 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
91 };
92 };
93 };
94
95 &spi0 {
96 status = "okay";
97
98 flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <40000000>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "bootloader";
110 reg = <0x0 0x30000>;
111 read-only;
112 };
113
114 partition@30000 {
115 label = "config";
116 reg = <0x30000 0x10000>;
117 read-only;
118 };
119
120 partition@40000 {
121 label = "factory";
122 reg = <0x40000 0x10000>;
123 read-only;
124
125 nvmem-layout {
126 compatible = "fixed-layout";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 macaddr_factory_e000: macaddr@e000 {
131 compatible = "mac-base";
132 reg = <0xe000 0x6>;
133 #nvmem-cell-cells = <1>;
134 };
135 };
136 };
137
138 partition@50000 {
139 compatible = "denx,uimage";
140 label = "firmware";
141 reg = <0x50000 0xfb0000>;
142 };
143 };
144 };
145 };
146
147 &sdhci {
148 status = "okay";
149 };
150
151 &pcie {
152 status = "okay";
153 };
154
155 &switch0 {
156 ports {
157 port@0 {
158 status = "okay";
159 label = "lan1";
160 };
161
162 port@1 {
163 status = "okay";
164 label = "lan2";
165 };
166
167 port@2 {
168 status = "okay";
169 label = "lan3";
170 };
171
172 port@3 {
173 status = "okay";
174 label = "lan4";
175 };
176
177 port@4 {
178 status = "okay";
179 label = "wan";
180
181 nvmem-cells = <&macaddr_factory_e000 1>;
182 nvmem-cell-names = "mac-address";
183 };
184 };
185 };
186
187 &ethernet {
188 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
189 };
190
191 &gmac0 {
192 nvmem-cells = <&macaddr_factory_e000 0>;
193 nvmem-cell-names = "mac-address";
194 };
195
196 &state_default {
197 gpio {
198 groups = "jtag", "wdt", "rgmii2";
199 function = "gpio";
200 };
201 };