be44cb716197e2bc1aeace1746721c280eaa6139
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_bt_homehub-v5a.dts
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
5
6 / {
7 compatible = "bt,homehub-v5a", "lantiq,xway", "lantiq,vr9";
8 model = "BT Home Hub 5A";
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power_green;
16 led-failsafe = &power_red;
17 led-running = &power_blue;
18 led-upgrade = &power_blue;
19
20 led-dsl = &broadband_blue;
21 led-wifi = &wireless_blue;
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x8000000>;
27 };
28
29 keys {
30 compatible = "gpio-keys-polled";
31 poll-interval = <100>;
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38
39 wps {
40 label = "wps";
41 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_WPS_BUTTON>;
43 };
44
45 restart {
46 label = "restart";
47 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_POWER2>;
49 };
50 };
51
52 leds {
53 compatible = "gpio-leds";
54
55 /* broadband-* is a single RGB led */
56 broadband-red {
57 label = "red:broadband";
58 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
59 };
60 broadband-green {
61 label = "green:broadband";
62 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
63 };
64 broadband_blue: broadband-blue {
65 label = "blue:broadband";
66 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
67 };
68
69 /* wireless-* is a single RGB led */
70 wireless-red {
71 label = "red:wireless";
72 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
73 };
74 wireless-green {
75 label = "green:wireless";
76 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
77 };
78 wireless_blue: wireless-blue {
79 label = "blue:wireless";
80 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
81 };
82
83 /* power-* is a single RGB led */
84 power_red: power-red {
85 label = "red:power";
86 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
87 };
88 power_green: power-green {
89 label = "green:power";
90 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
91 default-state = "keep";
92 };
93 power_blue: power-blue {
94 label = "blue:power";
95 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
96 };
97
98 dimmed {
99 label = "dimmed";
100 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
101 };
102 };
103
104 usb_vbus: regulator-usb-vbus {
105 compatible = "regulator-fixed";
106
107 regulator-name = "USB_VBUS";
108
109 regulator-min-microvolt = <5000000>;
110 regulator-max-microvolt = <5000000>;
111
112 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
113 enable-active-high;
114 };
115 };
116
117 &gphy0 {
118 lantiq,gphy-mode = <GPHY_MODE_GE>;
119 };
120
121 &gphy1 {
122 lantiq,gphy-mode = <GPHY_MODE_GE>;
123 };
124
125 &gpio {
126 pinctrl-names = "default";
127 pinctrl-0 = <&state_default>;
128
129 state_default: pinmux {
130 pci_rst {
131 lantiq,pins = "io21";
132 lantiq,output = <1>;
133 lantiq,open-drain;
134 };
135 pcie_rst {
136 lantiq,pins = "io38";
137 lantiq,pull = <0>;
138 lantiq,output = <1>;
139 lantiq,open-drain;
140 };
141 usb_vbus {
142 lantiq,pins = "io33";
143 lantiq,pull = <0>;
144 lantiq,open-drain = <0>;
145 lantiq,output = <1>;
146 };
147 };
148 };
149
150 &gswip {
151 pinctrl-0 = <&mdio_pins>;
152 pinctrl-names = "default";
153 };
154
155 &gswip_mdio {
156 phy0: ethernet-phy@0 {
157 reg = <0x0>;
158 };
159 phy1: ethernet-phy@1 {
160 reg = <0x1>;
161 };
162 phy5: ethernet-phy@5 {
163 reg = <0x5>;
164 };
165 phy11: ethernet-phy@11 {
166 reg = <0x11>;
167 };
168 phy13: ethernet-phy@13 {
169 reg = <0x13>;
170 };
171 };
172
173 &gswip_ports {
174 port@0 {
175 reg = <0>;
176 label = "lan3";
177 phy-mode = "rgmii-id";
178 tx-internal-delay-ps = <1500>;
179 rx-internal-delay-ps = <1500>;
180 phy-handle = <&phy0>;
181 };
182 port@1 {
183 reg = <1>;
184 label = "lan4";
185 phy-mode = "rgmii-id";
186 tx-internal-delay-ps = <1500>;
187 rx-internal-delay-ps = <1500>;
188 phy-handle = <&phy1>;
189 };
190 port@2 {
191 reg = <2>;
192 label = "lan2";
193 phy-mode = "internal";
194 phy-handle = <&phy11>;
195 };
196 port@4 {
197 reg = <4>;
198 label = "lan1";
199 phy-mode = "internal";
200 phy-handle = <&phy13>;
201 };
202 port@5 {
203 reg = <5>;
204 label = "wan";
205 phy-mode = "rgmii-id";
206 tx-internal-delay-ps = <1500>;
207 rx-internal-delay-ps = <1500>;
208 phy-handle = <&phy5>;
209 };
210 };
211
212 &localbus {
213 flash@1 {
214 compatible = "lantiq,nand-xway";
215 lantiq,cs = <1>;
216 bank-width = <2>;
217 reg = <0x1 0x0 0x2000000>;
218
219 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
220 pinctrl-names = "default";
221
222 nand-on-flash-bbt;
223 nand-ecc-strength = <3>;
224 nand-ecc-step-size = <256>;
225 nand-use-soft-ecc-engine;
226
227 partitions {
228 compatible = "fixed-partitions";
229 #address-cells = <1>;
230 #size-cells = <1>;
231
232 partition@0 {
233 label = "u-boot";
234 reg = <0x0 0xa0000>;
235 read-only;
236 };
237 partition@a0000 {
238 label = "u-boot-env";
239 reg = <0xa0000 0x20000>;
240 read-only;
241 };
242 partition@c0000 {
243 label = "unused";
244 reg = <0xc0000 0x40000>;
245 };
246 partition@100000 {
247 label = "ubi";
248 reg = <0x100000 0x7e80000>;
249 };
250 /*
251 * last 512 KiB are for the bad block table, not writable
252 */
253 };
254 };
255 };
256
257 &pci0 {
258 status = "okay";
259 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
260
261 wifi@168c,002d {
262 compatible = "pci168c,002d";
263 reg = <0x7000 0 0 0 0>;
264 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
265 ieee80211-freq-limit = <2402000 2482000>;
266 };
267 };
268
269 &usb_phy0 {
270 status = "okay";
271 };
272
273 &usb0 {
274 status = "okay";
275 vbus-supply = <&usb_vbus>;
276 };