94b211ab7a7126454b9f3c3439a4aa739b5e3160
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_hanyang_hyc-g920.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 = "hanyang,hyc-g920", "mediatek,mt7621-soc";
10 model = "CJ-Hello HYC-G920";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 bootargs-override = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_power: power {
28 label = "red:power";
29 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
30 };
31
32 usb {
33 label = "green:usb";
34 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
35 trigger-sources = <&ehci_port2>;
36 linux,default-trigger = "usbport";
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 debounce-interval = <60>;
48 };
49 };
50 };
51
52 &spi0 {
53 status = "okay";
54
55 flash@0 {
56 compatible = "jedec,spi-nor";
57 reg = <0>;
58 spi-max-frequency = <40000000>;
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "bootloader";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "mac";
73 reg = <0x30000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@40000 {
78 compatible = "nvmem-cells";
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 #address-cells = <1>;
82 #size-cells = <1>;
83 read-only;
84
85 eeprom_factory_0: eeprom@0 {
86 reg = <0x0 0x200>;
87 };
88
89 eeprom_factory_8000: eeprom@8000 {
90 reg = <0x8000 0x200>;
91 };
92
93 macaddr_factory_4: macaddr@4 {
94 reg = <0x4 0x6>;
95 };
96
97 macaddr_factory_8004: macaddr@8004 {
98 reg = <0x8004 0x6>;
99 };
100 };
101
102 partition@50000 {
103 compatible = "denx,uimage";
104 label = "firmware";
105 reg = <0x50000 0xfb0000>;
106 };
107
108 partition@fb0000 {
109 label = "config ";
110 reg = <0xfb0000 0x20000>;
111 read-only;
112 };
113
114 partition@fd0000 {
115 label = "config_bak ";
116 reg = <0xfd0000 0x20000>;
117 read-only;
118 };
119
120 partition@ff0000 {
121 label = "mac_bak ";
122 reg = <0xff0000 0x10000>;
123 read-only;
124 };
125 };
126 };
127 };
128
129 &pcie {
130 status = "okay";
131 };
132
133 &pcie0 {
134 wifi@0,0 {
135 compatible = "mediatek,mt76";
136 reg = <0x0000 0 0 0 0>;
137 nvmem-cells = <&eeprom_factory_8000>;
138 nvmem-cell-names = "eeprom";
139 ieee80211-freq-limit = <5000000 6000000>;
140
141 led {
142 led-sources = <2>;
143 led-active-low;
144 };
145 };
146 };
147
148 &pcie1 {
149 wifi@0,0 {
150 compatible = "mediatek,mt76";
151 reg = <0x0000 0 0 0 0>;
152 nvmem-cells = <&eeprom_factory_0>;
153 nvmem-cell-names = "eeprom";
154 ieee80211-freq-limit = <2400000 2500000>;
155
156 led {
157 led-sources = <2>;
158 led-active-low;
159 };
160 };
161 };
162
163 &gmac0 {
164 nvmem-cells = <&macaddr_factory_4>;
165 nvmem-cell-names = "mac-address";
166 };
167
168 &switch0 {
169 ports {
170 port@0 {
171 status = "okay";
172 label = "wan";
173 nvmem-cells = <&macaddr_factory_4>;
174 nvmem-cell-names = "mac-address";
175 mac-address-increment = <1>;
176 };
177
178 port@1 {
179 status = "okay";
180 label = "lan1";
181 };
182
183 port@2 {
184 status = "okay";
185 label = "lan2";
186 };
187
188 port@3 {
189 status = "okay";
190 label = "lan3";
191 };
192
193 port@4 {
194 status = "okay";
195 label = "lan4";
196 };
197 };
198 };
199
200 &state_default {
201 gpio {
202 groups = "sdhci";
203 function = "gpio";
204 };
205 };