ramips: add support for Z-ROUTER ZR-2660
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_buffalo_whr-1166d.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "buffalo,whr-1166d", "ralink,mt7620a-soc";
9 model = "Buffalo WHR-1166D";
10
11 aliases {
12 led-boot = &led_power_green;
13 led-failsafe = &led_power_green;
14 led-running = &led_power_green;
15 led-upgrade = &led_power_green;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 power {
22 function = LED_FUNCTION_POWER;
23 color = <LED_COLOR_ID_RED>;
24 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25 };
26
27 wifi {
28 label = "green:wifi";
29 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
30 };
31
32 led_power_green: power2 {
33 function = LED_FUNCTION_POWER;
34 color = <LED_COLOR_ID_GREEN>;
35 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
36 };
37
38 wifi2 {
39 label = "orange:wifi";
40 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
41 };
42
43 internet {
44 label = "green:internet";
45 gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
46 };
47
48 router {
49 label = "orange:router";
50 gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
51 };
52
53 router2 {
54 label = "green:router";
55 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART>;
66 };
67
68 aoss {
69 label = "aoss";
70 gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_WPS_BUTTON>;
72 };
73
74 ap {
75 label = "ap";
76 gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
77 linux,code = <BTN_0>;
78 linux,input-type = <EV_SW>;
79 };
80
81 bridge {
82 label = "bridge";
83 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
84 linux,code = <BTN_0>;
85 linux,input-type = <EV_SW>;
86 };
87 };
88 };
89
90 &gpio2 {
91 status = "okay";
92 };
93
94 &spi0 {
95 status = "okay";
96
97 flash@0 {
98 compatible = "jedec,spi-nor";
99 reg = <0>;
100 spi-max-frequency = <10000000>;
101
102 partitions {
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 partition@0 {
108 label = "u-boot";
109 reg = <0x0 0x30000>;
110 read-only;
111 };
112
113 partition@30000 {
114 label = "u-boot-env";
115 reg = <0x30000 0x10000>;
116 read-only;
117 };
118
119 partition@40000 {
120 label = "factory";
121 reg = <0x40000 0x10000>;
122 read-only;
123
124 nvmem-layout {
125 compatible = "fixed-layout";
126 #address-cells = <1>;
127 #size-cells = <1>;
128
129 eeprom_factory_0: eeprom@0 {
130 reg = <0x0 0x200>;
131 };
132
133 eeprom_factory_8000: eeprom@8000 {
134 reg = <0x8000 0x200>;
135 };
136
137 macaddr_factory_4: macaddr@4 {
138 reg = <0x4 0x6>;
139 };
140 };
141 };
142
143 partition@50000 {
144 compatible = "denx,uimage";
145 label = "firmware";
146 reg = <0x50000 0xfb0000>;
147 };
148 };
149 };
150 };
151
152 &state_default {
153 gpio {
154 groups = "i2c", "uartf", "wled", "nd_sd";
155 function = "gpio";
156 };
157 };
158
159 &ethernet {
160 pinctrl-names = "default";
161 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
162
163 nvmem-cells = <&macaddr_factory_4>;
164 nvmem-cell-names = "mac-address";
165
166 port@5 {
167 status = "okay";
168 phy-handle = <&phy5>;
169 phy-mode = "rgmii";
170 };
171
172 mdio-bus {
173 status = "okay";
174
175 phy5: ethernet-phy@5 {
176 reg = <5>;
177 phy-mode = "rgmii-rxid";
178 };
179 };
180 };
181
182 &wmac {
183 nvmem-cells = <&eeprom_factory_0>;
184 nvmem-cell-names = "eeprom";
185 };
186
187 &pcie {
188 status = "okay";
189 };
190
191 &pcie0 {
192 wifi@0,0 {
193 compatible = "pci0,0";
194 reg = <0x0000 0 0 0 0>;
195 nvmem-cells = <&eeprom_factory_8000>;
196 nvmem-cell-names = "eeprom";
197 ieee80211-freq-limit = <5000000 6000000>;
198 };
199 };