a25a56c0dd5de42c26e911d21c7e6120059292c4
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7621_buffalo_wsr-600dhp.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "buffalo,wsr-600dhp", "mediatek,mt7621-soc";
8 model = "Buffalo WSR-600DHP";
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 leds {
18 compatible = "gpio-leds";
19
20 led_power: power {
21 label = "wsr-600:green:power";
22 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
23 };
24
25 wifi_o {
26 label = "wsr-600:orange:wifi";
27 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
28 };
29
30 diag {
31 label = "wsr-600:orange:diag";
32 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
33 };
34
35 wifi_g {
36 label = "wsr-600:green:wifi";
37 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
38 };
39
40 router_o {
41 label = "wsr-600:orange:router";
42 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
43 };
44
45 router_g {
46 label = "wsr-600:green:router";
47 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
48 };
49
50 internet_o {
51 label = "wsr-600:orange:internet";
52 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
53 };
54
55 internet_g {
56 label = "wsr-600:green:internet";
57 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 keys {
62 compatible = "gpio-keys";
63
64 power {
65 label = "power";
66 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_POWER>;
68 };
69
70 reset {
71 label = "reset";
72 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75
76 aoss {
77 label = "aoss";
78 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_WPS_BUTTON>;
80 };
81
82 auto {
83 label = "mode";
84 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
85 linux,code = <BTN_0>;
86 linux,input-type = <EV_SW>;
87 };
88
89 ap {
90 label = "ap";
91 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
92 linux,code = <BTN_0>;
93 linux,input-type = <EV_SW>;
94 };
95
96 router {
97 label = "router";
98 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
99 linux,code = <BTN_0>;
100 linux,input-type = <EV_SW>;
101 };
102 };
103
104 gpio_poweroff {
105 compatible = "gpio-poweroff";
106 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
107 };
108 };
109
110 &spi0 {
111 status = "okay";
112
113 flash@0 {
114 compatible = "jedec,spi-nor";
115 reg = <0>;
116 spi-max-frequency = <10000000>;
117
118 partitions {
119 compatible = "fixed-partitions";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 partition@0 {
124 label = "u-boot";
125 reg = <0x0 0x30000>;
126 read-only;
127 };
128
129 partition@30000 {
130 label = "u-boot-env";
131 reg = <0x30000 0x10000>;
132 read-only;
133 };
134
135 factory: partition@40000 {
136 label = "factory";
137 reg = <0x40000 0x10000>;
138 read-only;
139 };
140
141 partition@50000 {
142 compatible = "denx,uimage";
143 label = "firmware";
144 reg = <0x50000 0xfb0000>;
145 };
146 };
147 };
148 };
149
150 &state_default {
151 gpio {
152 groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
153 function = "gpio";
154 };
155 };
156
157 &pcie {
158 status = "okay";
159 };
160
161 &pcie0 {
162 rt5592@0,0 {
163 reg = <0x0000 0 0 0 0>;
164 ralink,mtd-eeprom = <&factory 0x8000>;
165 };
166 };
167
168 &pcie1 {
169 mt76@0,0 {
170 reg = <0x0000 0 0 0 0>;
171 mediatek,mtd-eeprom = <&factory 0x0000>;
172 };
173 };
174
175 &gmac0 {
176 mtd-mac-address = <&factory 0x4>;
177 };
178
179 &switch0 {
180 ports {
181 port@0 {
182 status = "okay";
183 label = "lan1";
184 };
185
186 port@1 {
187 status = "okay";
188 label = "lan2";
189 };
190
191 port@2 {
192 status = "okay";
193 label = "lan3";
194 };
195
196 port@3 {
197 status = "okay";
198 label = "lan4";
199 };
200
201 port@4 {
202 status = "okay";
203 label = "wan";
204 };
205 };
206 };
207
208 &xhci {
209 status = "disabled";
210 };