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