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