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