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