ipq806x: ap148/r7500: fix eth0 for non gige speeds
[openwrt/openwrt.git] / target / linux / ipq806x / patches-3.18 / 301-ARM-qcom-add-Netgear-Nighthawk-X4-R7500-device-tree.patch
1 From 7e77aa188a7a7c4391856a9e5ef5ef58f769e679 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Sun, 9 Aug 2015 13:02:38 +0200
4 Subject: [PATCH] ARM: qcom: add Netgear Nighthawk X4 R7500 device tree
5
6 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
7 ---
8 arch/arm/boot/dts/Makefile | 1 +
9 arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 370 +++++++++++++++++++++++++++++++
10 2 files changed, 371 insertions(+)
11 create mode 100644 arch/arm/boot/dts/qcom-ipq8064-r7500.dts
12
13 --- a/arch/arm/boot/dts/Makefile
14 +++ b/arch/arm/boot/dts/Makefile
15 @@ -361,6 +361,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
16 qcom-apq8084-mtp.dtb \
17 qcom-ipq8064-ap148.dtb \
18 qcom-ipq8064-db149.dtb \
19 + qcom-ipq8064-r7500.dtb \
20 qcom-msm8660-surf.dtb \
21 qcom-msm8960-cdp.dtb \
22 qcom-msm8974-sony-xperia-honami.dtb
23 --- /dev/null
24 +++ b/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
25 @@ -0,0 +1,342 @@
26 +#include "qcom-ipq8064-v1.0.dtsi"
27 +
28 +#include <dt-bindings/input/input.h>
29 +
30 +/ {
31 + model = "Netgear Nighthawk X4 R7500";
32 + compatible = "netgear,r7500", "qcom,ipq8064";
33 +
34 + memory@0 {
35 + reg = <0x42000000 0xe000000>;
36 + device_type = "memory";
37 + };
38 +
39 + reserved-memory {
40 + #address-cells = <1>;
41 + #size-cells = <1>;
42 + ranges;
43 + rsvd@41200000 {
44 + reg = <0x41200000 0x300000>;
45 + no-map;
46 + };
47 + };
48 +
49 + aliases {
50 + serial0 = &uart4;
51 + mdio-gpio0 = &mdio0;
52 + };
53 +
54 + chosen {
55 + bootargs = "rootfstype=squashfs noinitrd";
56 + linux,stdout-path = "serial0:115200n8";
57 + };
58 +
59 + soc {
60 + pinmux@800000 {
61 + i2c4_pins: i2c4_pinmux {
62 + pins = "gpio12", "gpio13";
63 + function = "gsbi4";
64 + bias-disable;
65 + };
66 +
67 + nand_pins: nand_pins {
68 + mux {
69 + pins = "gpio34", "gpio35", "gpio36",
70 + "gpio37", "gpio38", "gpio39",
71 + "gpio40", "gpio41", "gpio42",
72 + "gpio43", "gpio44", "gpio45",
73 + "gpio46", "gpio47";
74 + function = "nand";
75 + drive-strength = <10>;
76 + bias-disable;
77 + };
78 + pullups {
79 + pins = "gpio39";
80 + bias-pull-up;
81 + };
82 + hold {
83 + pins = "gpio40", "gpio41", "gpio42",
84 + "gpio43", "gpio44", "gpio45",
85 + "gpio46", "gpio47";
86 + bias-bus-hold;
87 + };
88 + };
89 +
90 + mdio0_pins: mdio0_pins {
91 + mux {
92 + pins = "gpio0", "gpio1";
93 + function = "gpio";
94 + drive-strength = <8>;
95 + bias-disable;
96 + };
97 + };
98 +
99 + rgmii2_pins: rgmii2_pins {
100 + mux {
101 + pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
102 + "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
103 + function = "rgmii2";
104 + drive-strength = <8>;
105 + bias-disable;
106 + };
107 + };
108 + };
109 +
110 + gsbi@16300000 {
111 + qcom,mode = <GSBI_PROT_I2C_UART>;
112 + status = "ok";
113 + serial@16340000 {
114 + status = "ok";
115 + };
116 + /*
117 + * The i2c device on gsbi4 should not be enabled.
118 + * On ipq806x designs gsbi4 i2c is meant for exclusive
119 + * RPM usage. Turning this on in kernel manifests as
120 + * i2c failure for the RPM.
121 + */
122 + };
123 +
124 + sata-phy@1b400000 {
125 + status = "ok";
126 + };
127 +
128 + sata@29000000 {
129 + status = "ok";
130 + };
131 +
132 + phy@100f8800 { /* USB3 port 1 HS phy */
133 + status = "ok";
134 + };
135 +
136 + phy@100f8830 { /* USB3 port 1 SS phy */
137 + status = "ok";
138 + };
139 +
140 + phy@110f8800 { /* USB3 port 0 HS phy */
141 + status = "ok";
142 + };
143 +
144 + phy@110f8830 { /* USB3 port 0 SS phy */
145 + status = "ok";
146 + };
147 +
148 + usb30@0 {
149 + status = "ok";
150 + };
151 +
152 + usb30@1 {
153 + status = "ok";
154 + };
155 +
156 + pcie0: pci@1b500000 {
157 + status = "ok";
158 + };
159 +
160 + pcie1: pci@1b700000 {
161 + status = "ok";
162 + };
163 +
164 + nand@1ac00000 {
165 + status = "ok";
166 +
167 + pinctrl-0 = <&nand_pins>;
168 + pinctrl-names = "default";
169 +
170 + nand-ecc-strength = <4>;
171 + nand-bus-width = <8>;
172 +
173 + #address-cells = <1>;
174 + #size-cells = <1>;
175 +
176 + qcadata@0 {
177 + label = "qcadata";
178 + reg = <0x0000000 0x0c80000>;
179 + read-only;
180 + };
181 +
182 + APPSBL@c80000 {
183 + label = "APPSBL";
184 + reg = <0x0c80000 0x0500000>;
185 + read-only;
186 + };
187 +
188 + APPSBLENV@1180000 {
189 + label = "APPSBLENV";
190 + reg = <0x1180000 0x0080000>;
191 + read-only;
192 + };
193 +
194 + art: art@1200000 {
195 + label = "art";
196 + reg = <0x1200000 0x0140000>;
197 + read-only;
198 + };
199 +
200 + kernel@1340000 {
201 + label = "kernel";
202 + reg = <0x1340000 0x0200000>;
203 + };
204 +
205 + ubi@1540000 {
206 + label = "ubi";
207 + reg = <0x1540000 0x1800000>;
208 + };
209 +
210 + netgear@2d40000 {
211 + label = "netgear";
212 + reg = <0x2d40000 0x0c00000>;
213 + read-only;
214 + };
215 +
216 + reserve@3940000 {
217 + label = "reserve";
218 + reg = <0x3940000 0x46c0000>;
219 + read-only;
220 + };
221 +
222 + firmware@1340000 {
223 + label = "firmware";
224 + reg = <0x1340000 0x1a00000>;
225 + };
226 +
227 + };
228 +
229 + mdio0: mdio {
230 + compatible = "virtual,mdio-gpio";
231 + #address-cells = <1>;
232 + #size-cells = <0>;
233 + gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
234 + pinctrl-0 = <&mdio0_pins>;
235 + pinctrl-names = "default";
236 +
237 + phy0: ethernet-phy@0 {
238 + device_type = "ethernet-phy";
239 + reg = <0>;
240 + qca,ar8327-initvals = <
241 + 0x00004 0x7600000 /* PAD0_MODE */
242 + 0x00008 0x1000000 /* PAD5_MODE */
243 + 0x0000c 0x80 /* PAD6_MODE */
244 + 0x000e4 0xaa545 /* MAC_POWER_SEL */
245 + 0x000e0 0xc74164de /* SGMII_CTRL */
246 + 0x0007c 0x4e /* PORT0_STATUS */
247 + 0x00094 0x4e /* PORT6_STATUS */
248 + >;
249 + };
250 +
251 + phy4: ethernet-phy@4 {
252 + device_type = "ethernet-phy";
253 + reg = <4>;
254 + };
255 + };
256 +
257 + gmac1: ethernet@37200000 {
258 + status = "ok";
259 + phy-mode = "rgmii";
260 + qcom,id = <1>;
261 +
262 + pinctrl-0 = <&rgmii2_pins>;
263 + pinctrl-names = "default";
264 +
265 + mtd-mac-address = <&art 6>;
266 +
267 + fixed-link {
268 + speed = <1000>;
269 + full-duplex;
270 + };
271 + };
272 +
273 + gmac2: ethernet@37400000 {
274 + status = "ok";
275 + phy-mode = "sgmii";
276 + qcom,id = <2>;
277 +
278 + mtd-mac-address = <&art 0>;
279 +
280 + fixed-link {
281 + speed = <1000>;
282 + full-duplex;
283 + };
284 + };
285 + };
286 +
287 + gpio-keys {
288 + compatible = "gpio-keys";
289 +
290 + wifi {
291 + label = "wifi";
292 + gpios = <&qcom_pinmux 6 1>;
293 + linux,code = <KEY_WLAN>;
294 + };
295 +
296 + reset {
297 + label = "reset";
298 + gpios = <&qcom_pinmux 54 1>;
299 + linux,code = <KEY_RESTART>;
300 + };
301 +
302 + wps {
303 + label = "wps";
304 + gpios = <&qcom_pinmux 65 1>;
305 + linux,code = <KEY_WPS_BUTTON>;
306 + };
307 + };
308 +
309 + gpio-leds {
310 + compatible = "gpio-leds";
311 +
312 + usb1 {
313 + label = "r7500:amber:usb1";
314 + gpios = <&qcom_pinmux 7 0>;
315 + };
316 +
317 + usb3 {
318 + label = "r7500:amber:usb3";
319 + gpios = <&qcom_pinmux 8 0>;
320 + };
321 +
322 + status {
323 + label = "r7500:amber:status";
324 + gpios = <&qcom_pinmux 9 0>;
325 + };
326 +
327 + internet {
328 + label = "r7500:white:internet";
329 + gpios = <&qcom_pinmux 22 0>;
330 + };
331 +
332 + wan {
333 + label = "r7500:white:wan";
334 + gpios = <&qcom_pinmux 23 0>;
335 + };
336 +
337 + wps {
338 + label = "r7500:white:wps";
339 + gpios = <&qcom_pinmux 24 0>;
340 + };
341 +
342 + esata {
343 + label = "r7500:white:esata";
344 + gpios = <&qcom_pinmux 26 0>;
345 + };
346 +
347 + power {
348 + label = "r7500:white:power";
349 + gpios = <&qcom_pinmux 53 0>;
350 + default-state = "on";
351 + };
352 +
353 + rfkill {
354 + label = "r7500:white:rfkill";
355 + gpios = <&qcom_pinmux 64 0>;
356 + };
357 +
358 + wifi5g {
359 + label = "r7500:white:wifi5g";
360 + gpios = <&qcom_pinmux 67 0>;
361 + };
362 + };
363 +};
364 +
365 +&adm_dma {
366 + status = "ok";
367 +};