ramips: update device tree source files
[librecmc/librecmc.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         gpio-leds {
13                 compatible = "gpio-leds";
14
15                 power {
16                         label = "whr-1166d:red:power";
17                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
18                 };
19
20                 wifi {
21                         label = "whr-1166d:green:wifi";
22                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
23                 };
24
25                 power2 {
26                         label = "whr-1166d:green:power";
27                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
28                 };
29
30                 wifi2 {
31                         label = "whr-1166d:orange:wifi";
32                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
33                 };
34
35                 internet {
36                         label = "whr-1166d:green:internet";
37                         gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
38                 };
39
40                 router {
41                         label = "whr-1166d:orange:router";
42                         gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
43                 };
44
45                 router2 {
46                         label = "whr-1166d:green:router";
47                         gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
48                 };
49         };
50
51         gpio-keys-polled {
52                 compatible = "gpio-keys-polled";
53                 #address-cells = <1>;
54                 #size-cells = <0>;
55                 poll-interval = <20>;
56
57                 reset {
58                         label = "reset";
59                         gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
60                         linux,code = <KEY_RESTART>;
61                 };
62
63                 aoss {
64                         label = "aoss";
65                         gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
66                         linux,code = <KEY_WPS_BUTTON>;
67                 };
68
69                 ap {
70                         label = "ap";
71                         gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
72                         linux,code = <BTN_0>;
73                         linux,input-type = <EV_SW>;
74                 };
75
76                 bridge {
77                         label = "bridge";
78                         gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
79                         linux,code = <BTN_0>;
80                         linux,input-type = <EV_SW>;
81                 };
82         };
83 };
84
85 &gpio2 {
86         status = "okay";
87 };
88
89 &spi0 {
90         status = "okay";
91
92         m25p80@0 {
93                 #address-cells = <1>;
94                 #size-cells = <1>;
95                 compatible = "jedec,spi-nor";
96                 reg = <0>;
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                         ieee80211-freq-limit = <5000000 6000000>;
170                 };
171         };
172 };