652a6aef896e6f46e880f224d7a467e4798ffd03
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / 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-status = &led_power_green;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 power {
20 label = "whr-1166d:red:power";
21 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
22 };
23
24 wifi {
25 label = "whr-1166d:green:wifi";
26 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
27 };
28
29 led_power_green: power2 {
30 label = "whr-1166d:green:power";
31 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
32 };
33
34 wifi2 {
35 label = "whr-1166d:orange:wifi";
36 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
37 };
38
39 internet {
40 label = "whr-1166d:green:internet";
41 gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
42 };
43
44 router {
45 label = "whr-1166d:orange:router";
46 gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
47 };
48
49 router2 {
50 label = "whr-1166d:green:router";
51 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
52 };
53 };
54
55 gpio-keys-polled {
56 compatible = "gpio-keys-polled";
57 #address-cells = <1>;
58 #size-cells = <0>;
59 poll-interval = <20>;
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 #address-cells = <1>;
98 #size-cells = <1>;
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <10000000>;
102
103 partition@0 {
104 label = "u-boot";
105 reg = <0x0 0x30000>;
106 read-only;
107 };
108
109 partition@30000 {
110 label = "u-boot-env";
111 reg = <0x30000 0x10000>;
112 read-only;
113 };
114
115 factory: partition@40000 {
116 label = "factory";
117 reg = <0x40000 0x10000>;
118 read-only;
119 };
120
121 partition@50000 {
122 label = "firmware";
123 reg = <0x50000 0xfb0000>;
124 };
125 };
126 };
127
128 &pinctrl {
129 state_default: pinctrl0 {
130 gpio {
131 ralink,group = "i2c", "uartf", "wled", "nd_sd";
132 ralink,function = "gpio";
133 };
134 };
135 };
136
137 &ethernet {
138 pinctrl-names = "default";
139 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
140
141 port@5 {
142 status = "okay";
143 phy-handle = <&phy5>;
144 phy-mode = "rgmii";
145 };
146
147 mdio-bus {
148 status = "okay";
149
150 phy5: ethernet-phy@5 {
151 reg = <5>;
152 phy-mode = "rgmii-rxid";
153 };
154 };
155 };
156
157 &gsw {
158 mediatek,port4 = "ephy";
159 };
160
161 &wmac {
162 ralink,mtd-eeprom = <&factory 0>;
163 };
164
165 &pcie {
166 status = "okay";
167
168 pcie-bridge {
169 wifi@0,0 {
170 compatible = "pci0,0";
171 reg = <0x0000 0 0 0 0>;
172 mediatek,mtd-eeprom = <&factory 0x8000>;
173 ieee80211-freq-limit = <5000000 6000000>;
174 };
175 };
176 };