0e808f6894103c28bb737635a7791cc0562a9b09
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7621_iodata_wnpr2600g.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 = "iodata,wnpr2600g", "mediatek,mt7621-soc";
10 model = "I-O DATA WNPR2600G";
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 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
25 default-state = "on";
26 };
27
28 notification {
29 label = "green:notification";
30 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
31 };
32
33 wlan2g {
34 label = "green:wlan2g";
35 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
36 linux,default-trigger = "phy0radio";
37 };
38
39 wlan5g {
40 label = "green:wlan5g";
41 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
42 linux,default-trigger = "phy1radio";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 auto {
50 label = "auto";
51 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
52 linux,code = <BTN_0>;
53 linux,input-type = <EV_SW>;
54 };
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 wps {
63 label = "wps";
64 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <40000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x000000 0x030000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x030000 0x010000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x040000 0x010000>;
98 read-only;
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x050000 0xda0000>;
105 };
106
107 partition@df0000 {
108 label = "manufacture";
109 reg = <0xdf0000 0x190000>;
110 read-only;
111 };
112
113 partition@f80000 {
114 label = "storage";
115 reg = <0xf80000 0x080000>;
116 read-only;
117 };
118 };
119 };
120 };
121
122 &gmac0 {
123 mtd-mac-address = <&factory 0x4>;
124 };
125
126 &switch0 {
127 ports {
128 port@0 {
129 status = "okay";
130 label = "wan";
131 };
132
133 port@1 {
134 status = "okay";
135 label = "lan4";
136 };
137
138 port@2 {
139 status = "okay";
140 label = "lan3";
141 };
142
143 port@3 {
144 status = "okay";
145 label = "lan2";
146 };
147
148 port@4 {
149 status = "okay";
150 label = "lan1";
151 };
152 };
153 };
154
155 &state_default {
156 gpio {
157 groups = "uart2", "uart3", "jtag", "wdt";
158 function = "gpio";
159 };
160 };
161
162 &pcie {
163 status = "okay";
164 };
165
166 &pcie0 {
167 wifi@0,0 {
168 compatible = "mediatek,mt76";
169 reg = <0x0000 0 0 0 0>;
170 mediatek,mtd-eeprom = <&factory 0x0>;
171 ieee80211-freq-limit = <2400000 2500000>;
172 };
173 };
174
175 &pcie1 {
176 wifi@0,0 {
177 compatible = "mediatek,mt76";
178 reg = <0x0000 0 0 0 0>;
179 mediatek,mtd-eeprom = <&factory 0x8000>;
180 ieee80211-freq-limit = <5000000 6000000>;
181 };
182 };
183
184 &xhci {
185 status = "disabled";
186 };