db4d02d167bde42a7e9741d7c0197c53c81810f3
[openwrt/staging/dedeckeh.git] / target / linux / lantiq / files-5.4 / 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 = "bthomehubv5a:red:broadband";
58 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
59 };
60 broadband-green {
61 label = "bthomehubv5a:green:broadband";
62 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
63 };
64 broadband_blue: broadband-blue {
65 label = "bthomehubv5a:blue:broadband";
66 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
67 };
68
69 /* wireless-* is a single RGB led */
70 wireless-red {
71 label = "bthomehubv5a:red:wireless";
72 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
73 };
74 wireless-green {
75 label = "bthomehubv5a:green:wireless";
76 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
77 };
78 wireless_blue: wireless-blue {
79 label = "bthomehubv5a: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 = "bthomehubv5a:red:power";
86 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
87 };
88 power_green: power-green {
89 label = "bthomehubv5a:green:power";
90 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
91 default-state = "keep";
92 };
93 power_blue: power-blue {
94 label = "bthomehubv5a: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 &eth0 {
118 lan: interface@0 {
119 compatible = "lantiq,xrx200-pdi";
120 #address-cells = <1>;
121 #size-cells = <0>;
122 reg = <0>;
123 lantiq,switch;
124
125 ethernet@0 {
126 compatible = "lantiq,xrx200-pdi-port";
127 reg = <0>;
128 phy-mode = "rgmii";
129 phy-handle = <&phy0>;
130 };
131 ethernet@1 {
132 compatible = "lantiq,xrx200-pdi-port";
133 reg = <1>;
134 phy-mode = "rgmii";
135 phy-handle = <&phy1>;
136 };
137 ethernet@2 {
138 compatible = "lantiq,xrx200-pdi-port";
139 reg = <2>;
140 phy-mode = "gmii";
141 phy-handle = <&phy11>;
142 };
143 ethernet@4 {
144 compatible = "lantiq,xrx200-pdi-port";
145 reg = <4>;
146 phy-mode = "gmii";
147 phy-handle = <&phy13>;
148 };
149 ethernet@5 {
150 compatible = "lantiq,xrx200-pdi-port";
151 reg = <5>;
152 phy-mode = "rgmii";
153 phy-handle = <&phy5>;
154 };
155 };
156
157 mdio {
158 #address-cells = <1>;
159 #size-cells = <0>;
160 compatible = "lantiq,xrx200-mdio";
161
162 phy0: ethernet-phy@0 {
163 reg = <0x0>;
164 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
165 };
166 phy1: ethernet-phy@1 {
167 reg = <0x1>;
168 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
169 };
170 phy5: ethernet-phy@5 {
171 reg = <0x5>;
172 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
173 };
174 phy11: ethernet-phy@11 {
175 reg = <0x11>;
176 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
177 };
178 phy13: ethernet-phy@13 {
179 reg = <0x13>;
180 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
181 };
182 };
183 };
184
185 &gphy0 {
186 lantiq,gphy-mode = <GPHY_MODE_GE>;
187 };
188
189 &gphy1 {
190 lantiq,gphy-mode = <GPHY_MODE_GE>;
191 };
192
193 &gpio {
194 pinctrl-names = "default";
195 pinctrl-0 = <&state_default>;
196
197 state_default: pinmux {
198 pci_rst {
199 lantiq,pins = "io21";
200 lantiq,output = <1>;
201 lantiq,open-drain;
202 };
203 pcie_rst {
204 lantiq,pins = "io38";
205 lantiq,pull = <0>;
206 lantiq,output = <1>;
207 lantiq,open-drain;
208 };
209 usb_vbus {
210 lantiq,pins = "io33";
211 lantiq,pull = <0>;
212 lantiq,open-drain = <0>;
213 lantiq,output = <1>;
214 };
215 };
216 };
217
218 &localbus {
219 flash@1 {
220 compatible = "lantiq,nand-xway";
221 lantiq,cs = <1>;
222 bank-width = <2>;
223 reg = <0x1 0x0 0x2000000>;
224
225 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
226 pinctrl-names = "default";
227
228 nand-on-flash-bbt;
229 nand-ecc-strength = <3>;
230 nand-ecc-step-size = <256>;
231
232 partitions {
233 compatible = "fixed-partitions";
234 #address-cells = <1>;
235 #size-cells = <1>;
236
237 partition@0 {
238 label = "u-boot";
239 reg = <0x0 0xa0000>;
240 read-only;
241 };
242 partition@a0000 {
243 label = "u-boot-env";
244 reg = <0xa0000 0x20000>;
245 read-only;
246 };
247 partition@c0000 {
248 label = "unused";
249 reg = <0xc0000 0x40000>;
250 };
251 partition@100000 {
252 label = "ubi";
253 reg = <0x100000 0x7e80000>;
254 };
255 /*
256 * last 512 KiB are for the bad block table, not writable
257 */
258 };
259 };
260 };
261
262 &pci0 {
263 status = "okay";
264 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
265
266 wifi@168c,002d {
267 compatible = "pci168c,002d";
268 reg = <0x7000 0 0 0 0>;
269 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
270 qca,disable-5ghz;
271 };
272 };
273
274 &usb_phy0 {
275 status = "okay";
276 };
277
278 &usb0 {
279 status = "okay";
280 vbus-supply = <&usb_vbus>;
281 };