76cf69335b917ba79af34e1968e1c98bf098e64e
[openwrt/staging/mkresin.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";
178 phy-handle = <&phy0>;
179 };
180 port@1 {
181 reg = <1>;
182 label = "lan4";
183 phy-mode = "rgmii";
184 phy-handle = <&phy1>;
185 };
186 port@2 {
187 reg = <2>;
188 label = "lan2";
189 phy-mode = "internal";
190 phy-handle = <&phy11>;
191 };
192 port@4 {
193 reg = <4>;
194 label = "lan1";
195 phy-mode = "internal";
196 phy-handle = <&phy13>;
197 };
198 port@5 {
199 reg = <5>;
200 label = "wan";
201 phy-mode = "rgmii";
202 phy-handle = <&phy5>;
203 };
204 };
205
206 &localbus {
207 flash@1 {
208 compatible = "lantiq,nand-xway";
209 lantiq,cs = <1>;
210 bank-width = <2>;
211 reg = <0x1 0x0 0x2000000>;
212
213 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
214 pinctrl-names = "default";
215
216 nand-on-flash-bbt;
217 nand-ecc-strength = <3>;
218 nand-ecc-step-size = <256>;
219 nand-use-soft-ecc-engine;
220
221 partitions {
222 compatible = "fixed-partitions";
223 #address-cells = <1>;
224 #size-cells = <1>;
225
226 partition@0 {
227 label = "u-boot";
228 reg = <0x0 0xa0000>;
229 read-only;
230 };
231 partition@a0000 {
232 label = "u-boot-env";
233 reg = <0xa0000 0x20000>;
234 read-only;
235 };
236 partition@c0000 {
237 label = "unused";
238 reg = <0xc0000 0x40000>;
239 };
240 partition@100000 {
241 label = "ubi";
242 reg = <0x100000 0x7e80000>;
243 };
244 /*
245 * last 512 KiB are for the bad block table, not writable
246 */
247 };
248 };
249 };
250
251 &pci0 {
252 status = "okay";
253 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
254
255 wifi@168c,002d {
256 compatible = "pci168c,002d";
257 reg = <0x7000 0 0 0 0>;
258 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
259 qca,disable-5ghz;
260 };
261 };
262
263 &usb_phy0 {
264 status = "okay";
265 };
266
267 &usb0 {
268 status = "okay";
269 vbus-supply = <&usb_vbus>;
270 };