6423b69ebdab22e340280117f939bd58ced5852a
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-wg2626.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zbtlink,zbt-wg2626", "mediatek,mt7621-soc";
8 model = "Zbtlink ZBT-WG2626";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_status: status {
35 label = "green:status";
36 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
37 };
38 };
39 };
40
41 &i2c {
42 status = "okay";
43 };
44
45 &sdhci {
46 status = "okay";
47 };
48
49 &spi0 {
50 status = "okay";
51
52 flash@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <10000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "u-boot";
64 reg = <0x0 0x30000>;
65 read-only;
66 };
67
68 partition@30000 {
69 label = "u-boot-env";
70 reg = <0x30000 0x10000>;
71 read-only;
72 };
73
74 factory: partition@40000 {
75 label = "factory";
76 reg = <0x40000 0x10000>;
77 read-only;
78
79 nvmem-layout {
80 compatible = "fixed-layout";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 eeprom_factory_0: eeprom@0 {
85 reg = <0x0 0x200>;
86 };
87
88 eeprom_factory_8000: eeprom@8000 {
89 reg = <0x8000 0x200>;
90 };
91
92 macaddr_factory_e000: macaddr@e000 {
93 reg = <0xe000 0x6>;
94 };
95 };
96 };
97
98 partition@50000 {
99 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x50000 0xfb0000>;
102 };
103 };
104 };
105 };
106
107 &pcie {
108 status = "okay";
109
110 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
111 <&gpio 8 GPIO_ACTIVE_LOW>;
112 };
113
114 &pcie0 {
115 mt76@0,0 {
116 reg = <0x0000 0 0 0 0>;
117 nvmem-cells = <&eeprom_factory_8000>;
118 nvmem-cell-names = "eeprom";
119 ieee80211-freq-limit = <5000000 6000000>;
120 };
121 };
122
123 &pcie1 {
124 mt76@0,0 {
125 reg = <0x0000 0 0 0 0>;
126 nvmem-cells = <&eeprom_factory_0>;
127 nvmem-cell-names = "eeprom";
128 ieee80211-freq-limit = <2400000 2500000>;
129 };
130 };
131
132 &ethernet {
133 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
134 };
135
136 &gmac0 {
137 nvmem-cells = <&macaddr_factory_e000>;
138 nvmem-cell-names = "mac-address";
139 };
140
141 &switch0 {
142 ports {
143 port@0 {
144 status = "okay";
145 label = "lan4";
146 };
147
148 port@1 {
149 status = "okay";
150 label = "lan3";
151 };
152
153 port@2 {
154 status = "okay";
155 label = "lan2";
156 };
157
158 port@3 {
159 status = "okay";
160 label = "lan1";
161 };
162
163 port@4 {
164 status = "okay";
165 label = "wan";
166 nvmem-cells = <&macaddr_factory_e000>;
167 nvmem-cell-names = "mac-address";
168 mac-address-increment = <1>;
169 };
170 };
171 };
172
173 &state_default {
174 gpio {
175 groups = "wdt", "rgmii2";
176 function = "gpio";
177 };
178 };