ramips: mt7621: add support for Zbtlink ZBT-WG1608 (32M)
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-wg1608.dtsi
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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "zbtlink,zbt-wg1608", "mediatek,mt7621-soc";
11
12 aliases {
13 led-boot = &led_internet;
14 led-failsafe = &led_internet;
15 led-running = &led_internet;
16 led-upgrade = &led_internet;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_internet: internet {
38 label = "green:internet";
39 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
40 };
41
42 wwan {
43 label = "green:wwan";
44 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "usbport";
46 trigger-sources = <&hub_port2>;
47 };
48
49 wifi5g {
50 label = "green:wifi5g";
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 linux,default-trigger = "phy1tpt";
53 };
54 };
55 };
56
57 &sdhci {
58 status = "okay";
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash0: flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <50000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x0 0x30000>;
77 read-only;
78 };
79
80 partition@30000 {
81 label = "u-boot-env";
82 reg = <0x30000 0x10000>;
83 read-only;
84 };
85
86 factory: partition@40000 {
87 label = "factory";
88 reg = <0x40000 0x10000>;
89 read-only;
90
91 compatible = "nvmem-cells";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 macaddr_factory_e000: macaddr@e000 {
96 reg = <0xe000 0x6>;
97 };
98
99 macaddr_factory_e006: macaddr@e006 {
100 reg = <0xe006 0x6>;
101 };
102
103 };
104
105 firmware: partition@50000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 };
109 };
110 };
111 };
112
113 &pcie {
114 status = "okay";
115 };
116
117 &pcie0 {
118 wifi@0,0 {
119 compatible = "mediatek,mt76";
120 reg = <0x0000 0 0 0 0>;
121 mediatek,mtd-eeprom = <&factory 0x0000>;
122 };
123 };
124
125 &pcie1 {
126 wifi@0,0 {
127 compatible = "mediatek,mt76";
128 reg = <0x0000 0 0 0 0>;
129 mediatek,mtd-eeprom = <&factory 0x8000>;
130 ieee80211-freq-limit = <5000000 6000000>;
131 };
132 };
133
134 &gmac0 {
135 nvmem-cells = <&macaddr_factory_e000>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &gmac1 {
140 status = "okay";
141 label = "wan";
142 phy-handle = <&ethphy4>;
143
144 nvmem-cells = <&macaddr_factory_e006>;
145 nvmem-cell-names = "mac-address";
146 };
147
148 &mdio {
149 ethphy4: ethernet-phy@4 {
150 reg = <4>;
151 };
152 };
153
154 &switch0 {
155 ports {
156 port@0 {
157 status = "okay";
158 label = "lan1";
159 };
160
161 port@1 {
162 status = "okay";
163 label = "lan2";
164 };
165
166 port@2 {
167 status = "okay";
168 label = "lan3";
169 };
170
171 port@3 {
172 status = "okay";
173 label = "lan4";
174 };
175 };
176 };
177
178 &state_default {
179 gpio {
180 groups = "wdt", "uart2", "jtag";
181 function = "gpio";
182 };
183 };
184
185 &xhci_ehci_port1 {
186 #address-cells = <1>;
187 #size-cells = <0>;
188
189 hub_port2: port@2 {
190 reg = <2>;
191 #trigger-source-cells = <0>;
192 };
193
194 port@4 {
195 reg = <4>;
196 #trigger-source-cells = <0>;
197 };
198 };
199