ramips: add support for Netgear EX6130
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_buffalo_whr-1166d.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "buffalo,whr-1166d", "ralink,mt7620a-soc";
10         model = "Buffalo WHR-1166D";
11
12         aliases {
13                 led-boot = &led_power_green;
14                 led-failsafe = &led_power_green;
15                 led-running = &led_power_green;
16                 led-upgrade = &led_power_green;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 power {
23                         label = "whr-1166d:red:power";
24                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25                 };
26
27                 wifi {
28                         label = "whr-1166d:green:wifi";
29                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
30                 };
31
32                 led_power_green: power2 {
33                         label = "whr-1166d:green:power";
34                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
35                 };
36
37                 wifi2 {
38                         label = "whr-1166d:orange:wifi";
39                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
40                 };
41
42                 internet {
43                         label = "whr-1166d:green:internet";
44                         gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
45                 };
46
47                 router {
48                         label = "whr-1166d:orange:router";
49                         gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
50                 };
51
52                 router2 {
53                         label = "whr-1166d:green:router";
54                         gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
55                 };
56         };
57
58         keys {
59                 compatible = "gpio-keys";
60
61                 reset {
62                         label = "reset";
63                         gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
64                         linux,code = <KEY_RESTART>;
65                 };
66
67                 aoss {
68                         label = "aoss";
69                         gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
70                         linux,code = <KEY_WPS_BUTTON>;
71                 };
72
73                 ap {
74                         label = "ap";
75                         gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
76                         linux,code = <BTN_0>;
77                         linux,input-type = <EV_SW>;
78                 };
79
80                 bridge {
81                         label = "bridge";
82                         gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
83                         linux,code = <BTN_0>;
84                         linux,input-type = <EV_SW>;
85                 };
86         };
87 };
88
89 &gpio2 {
90         status = "okay";
91 };
92
93 &spi0 {
94         status = "okay";
95
96         m25p80@0 {
97                 compatible = "jedec,spi-nor";
98                 reg = <0>;
99                 spi-max-frequency = <10000000>;
100
101                 partitions {
102                         compatible = "fixed-partitions";
103                         #address-cells = <1>;
104                         #size-cells = <1>;
105
106                         partition@0 {
107                                 label = "u-boot";
108                                 reg = <0x0 0x30000>;
109                                 read-only;
110                         };
111
112                         partition@30000 {
113                                 label = "u-boot-env";
114                                 reg = <0x30000 0x10000>;
115                                 read-only;
116                         };
117
118                         factory: partition@40000 {
119                                 label = "factory";
120                                 reg = <0x40000 0x10000>;
121                                 read-only;
122                         };
123
124                         partition@50000 {
125                                 compatible = "denx,uimage";
126                                 label = "firmware";
127                                 reg = <0x50000 0xfb0000>;
128                         };
129                 };
130         };
131 };
132
133 &pinctrl {
134         state_default: pinctrl0 {
135                 gpio {
136                         ralink,group = "i2c", "uartf", "wled", "nd_sd";
137                         ralink,function = "gpio";
138                 };
139         };
140 };
141
142 &ethernet {
143         pinctrl-names = "default";
144         pinctrl-0 = <&rgmii1_pins &mdio_pins>;
145
146         mtd-mac-address = <&factory 0x4>;
147
148         port@5 {
149                 status = "okay";
150                 phy-handle = <&phy5>;
151                 phy-mode = "rgmii";
152         };
153
154         mdio-bus {
155                 status = "okay";
156
157                 phy5: ethernet-phy@5 {
158                         reg = <5>;
159                         phy-mode = "rgmii-rxid";
160                 };
161         };
162 };
163
164 &gsw {
165         mediatek,port4 = "ephy";
166 };
167
168 &wmac {
169         ralink,mtd-eeprom = <&factory 0>;
170 };
171
172 &pcie {
173         status = "okay";
174 };
175
176 &pcie0 {
177         wifi@0,0 {
178                 compatible = "pci0,0";
179                 reg = <0x0000 0 0 0 0>;
180                 mediatek,mtd-eeprom = <&factory 0x8000>;
181                 ieee80211-freq-limit = <5000000 6000000>;
182         };
183 };