01269e1c1cf108b4c2e98d89aeeff727183d26ec
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-wg3526.dtsi
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-wg3526", "mediatek,mt7621-soc";
8
9 aliases {
10 led-boot = &led_status;
11 led-failsafe = &led_status;
12 led-running = &led_status;
13 led-upgrade = &led_status;
14 label-mac-device = &wifi0;
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 flash0: 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
80 firmware: partition@50000 {
81 compatible = "denx,uimage";
82 label = "firmware";
83 };
84 };
85 };
86 };
87
88 &pcie {
89 status = "okay";
90 };
91
92 &pcie0 {
93 wifi0: wifi@0,0 {
94 compatible = "pci14c3,7603";
95 reg = <0x0000 0 0 0 0>;
96 mediatek,mtd-eeprom = <&factory 0x0000>;
97 };
98 };
99
100 &pcie1 {
101 wifi1: wifi@0,0 {
102 compatible = "pci14c3,7662";
103 reg = <0x0000 0 0 0 0>;
104 mediatek,mtd-eeprom = <&factory 0x8000>;
105 ieee80211-freq-limit = <5000000 6000000>;
106
107 led {
108 led-sources = <2>;
109 };
110 };
111 };
112
113 &gmac0 {
114 nvmem-cells = <&macaddr_factory_e000>;
115 nvmem-cell-names = "mac-address";
116 };
117
118 &switch0 {
119 ports {
120 port@0 {
121 status = "okay";
122 label = "lan1";
123 };
124
125 port@1 {
126 status = "okay";
127 label = "lan2";
128 };
129
130 port@2 {
131 status = "okay";
132 label = "lan3";
133 };
134
135 port@3 {
136 status = "okay";
137 label = "lan4";
138 };
139
140 port@4 {
141 status = "okay";
142 label = "wan";
143 nvmem-cells = <&macaddr_factory_e000>;
144 nvmem-cell-names = "mac-address";
145 mac-address-increment = <1>;
146 };
147 };
148 };
149
150 &state_default {
151 gpio {
152 groups = "wdt", "rgmii2";
153 function = "gpio";
154 };
155 };
156
157 &factory {
158 compatible = "nvmem-cells";
159 #address-cells = <1>;
160 #size-cells = <1>;
161
162 macaddr_factory_e000: macaddr@e000 {
163 reg = <0xe000 0x6>;
164 };
165 };