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