032b01c684fa77e76fae27c24a3f9e7d494c1af1
[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,338 @@
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 + phy-handle = <&phy4>;
261 + qcom,id = <1>;
262 +
263 + pinctrl-0 = <&rgmii2_pins>;
264 + pinctrl-names = "default";
265 +
266 + mtd-mac-address = <&art 6>;
267 + };
268 +
269 + gmac2: ethernet@37400000 {
270 + status = "ok";
271 + phy-mode = "sgmii";
272 + qcom,id = <2>;
273 +
274 + mtd-mac-address = <&art 0>;
275 +
276 + fixed-link {
277 + speed = <1000>;
278 + full-duplex;
279 + };
280 + };
281 + };
282 +
283 + gpio-keys {
284 + compatible = "gpio-keys";
285 +
286 + wifi {
287 + label = "wifi";
288 + gpios = <&qcom_pinmux 6 1>;
289 + linux,code = <KEY_WLAN>;
290 + };
291 +
292 + reset {
293 + label = "reset";
294 + gpios = <&qcom_pinmux 54 1>;
295 + linux,code = <KEY_RESTART>;
296 + };
297 +
298 + wps {
299 + label = "wps";
300 + gpios = <&qcom_pinmux 65 1>;
301 + linux,code = <KEY_WPS_BUTTON>;
302 + };
303 + };
304 +
305 + gpio-leds {
306 + compatible = "gpio-leds";
307 +
308 + usb1 {
309 + label = "r7500:amber:usb1";
310 + gpios = <&qcom_pinmux 7 0>;
311 + };
312 +
313 + usb3 {
314 + label = "r7500:amber:usb3";
315 + gpios = <&qcom_pinmux 8 0>;
316 + };
317 +
318 + status {
319 + label = "r7500:amber:status";
320 + gpios = <&qcom_pinmux 9 0>;
321 + };
322 +
323 + internet {
324 + label = "r7500:white:internet";
325 + gpios = <&qcom_pinmux 22 0>;
326 + };
327 +
328 + wan {
329 + label = "r7500:white:wan";
330 + gpios = <&qcom_pinmux 23 0>;
331 + };
332 +
333 + wps {
334 + label = "r7500:white:wps";
335 + gpios = <&qcom_pinmux 24 0>;
336 + };
337 +
338 + esata {
339 + label = "r7500:white:esata";
340 + gpios = <&qcom_pinmux 26 0>;
341 + };
342 +
343 + power {
344 + label = "r7500:white:power";
345 + gpios = <&qcom_pinmux 53 0>;
346 + default-state = "on";
347 + };
348 +
349 + rfkill {
350 + label = "r7500:white:rfkill";
351 + gpios = <&qcom_pinmux 64 0>;
352 + };
353 +
354 + wifi5g {
355 + label = "r7500:white:wifi5g";
356 + gpios = <&qcom_pinmux 67 0>;
357 + };
358 + };
359 +};
360 +
361 +&adm_dma {
362 + status = "ok";
363 +};