eaf1a1d66a6a87893f2f812e0119e27852caec6b
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_iodata_wn-gx300gr.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "iodata,wn-gx300gr", "mediatek,mt7621-soc";
9 model = "I-O DATA WN-GX300GR";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_power: power {
26 function = LED_FUNCTION_POWER;
27 color = <LED_COLOR_ID_GREEN>;
28 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
29 };
30
31 wps {
32 function = LED_FUNCTION_WPS;
33 color = <LED_COLOR_ID_GREEN>;
34 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 wps {
48 label = "wps";
49 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52
53 auto {
54 label = "auto";
55 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
56 linux,code = <BTN_0>;
57 linux,input-type = <EV_SW>;
58 };
59
60 custom {
61 label = "custom";
62 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
63 linux,code = <BTN_0>;
64 linux,input-type = <EV_SW>;
65 };
66 };
67 };
68
69 &spi0 {
70 status = "okay";
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <10000000>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "Bootloader";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "Config";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 factory: partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98
99 nvmem-layout {
100 compatible = "fixed-layout";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 eeprom_factory_0: eeprom@0 {
105 reg = <0x0 0x400>;
106 };
107
108 macaddr_factory_4: macaddr@4 {
109 compatible = "mac-base";
110 reg = <0x4 0x6>;
111 #nvmem-cell-cells = <1>;
112 };
113 };
114 };
115
116 partition@50000 {
117 label = "iNIC_rf";
118 reg = <0x50000 0x10000>;
119 read-only;
120 };
121
122 partition@60000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x60000 0x770000>;
126 };
127
128 partition@7d0000 {
129 label = "Key";
130 reg = <0x7d0000 0x10000>;
131 read-only;
132 };
133
134 partition@7e0000 {
135 label = "backup";
136 reg = <0x7e0000 0x10000>;
137 read-only;
138 };
139
140 partition@7f0000 {
141 label = "storage";
142 reg = <0x7f0000 0x10000>;
143 read-only;
144 };
145 };
146 };
147 };
148
149 &gmac0 {
150 nvmem-cells = <&macaddr_factory_4 0>;
151 nvmem-cell-names = "mac-address";
152 };
153
154 &gmac1 {
155 status = "okay";
156 label = "wan";
157 phy-handle = <&ethphy0>;
158
159 nvmem-cells = <&macaddr_factory_4 1>;
160 nvmem-cell-names = "mac-address";
161 };
162
163 &mdio {
164 ethphy0: ethernet-phy@0 {
165 reg = <0>;
166 };
167 };
168
169 &switch0 {
170 ports {
171 port@1 {
172 status = "okay";
173 label = "lan4";
174 };
175
176 port@2 {
177 status = "okay";
178 label = "lan3";
179 };
180
181 port@3 {
182 status = "okay";
183 label = "lan2";
184 };
185
186 port@4 {
187 status = "okay";
188 label = "lan1";
189 };
190 };
191 };
192
193 &state_default {
194 gpio {
195 groups = "uart2", "uart3", "jtag";
196 function = "gpio";
197 };
198 };
199
200 &pcie {
201 status = "okay";
202 };
203
204 &pcie0 {
205 mt76@0,0 {
206 reg = <0x0000 0 0 0 0>;
207 nvmem-cells = <&eeprom_factory_0>;
208 nvmem-cell-names = "eeprom";
209 };
210 };
211
212 &xhci {
213 status = "disabled";
214 };