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