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