ipq806x: rework dts to use label
[openwrt/openwrt.git] / target / linux / ipq806x / files-5.4 / arch / arm / boot / dts / qcom-ipq8064-r7500.dts
1 #include "qcom-ipq8064-v1.0.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/soc/qcom,tcsr.h>
5
6 / {
7 model = "Netgear Nighthawk X4 R7500";
8 compatible = "netgear,r7500", "qcom,ipq8064";
9
10 memory@0 {
11 reg = <0x42000000 0xe000000>;
12 device_type = "memory";
13 };
14
15 reserved-memory {
16 #address-cells = <1>;
17 #size-cells = <1>;
18 ranges;
19 rsvd@41200000 {
20 reg = <0x41200000 0x300000>;
21 no-map;
22 };
23 };
24
25 aliases {
26 serial0 = &gsbi4_serial;
27 mdio-gpio0 = &mdio0;
28
29 led-boot = &power_white;
30 led-failsafe = &power_amber;
31 led-running = &power_white;
32 led-upgrade = &power_amber;
33 };
34
35 chosen {
36 bootargs = "rootfstype=squashfs noinitrd";
37 stdout-path = "serial0:115200n8";
38 };
39
40 soc {
41 mdio0: mdio@37000000 {
42 #address-cells = <1>;
43 #size-cells = <0>;
44
45 compatible = "qcom,ipq8064-mdio", "syscon";
46 reg = <0x37000000 0x200000>;
47 resets = <&gcc GMAC_CORE1_RESET>;
48 reset-names = "stmmaceth";
49 clocks = <&gcc GMAC_CORE1_CLK>;
50 clock-names = "stmmaceth";
51
52 pinctrl-0 = <&mdio0_pins>;
53 pinctrl-names = "default";
54
55 phy0: ethernet-phy@0 {
56 reg = <0>;
57 qca,ar8327-initvals = <
58 0x00004 0x7600000 /* PAD0_MODE */
59 0x00008 0x1000000 /* PAD5_MODE */
60 0x0000c 0x80 /* PAD6_MODE */
61 0x000e4 0x6a545 /* MAC_POWER_SEL */
62 0x000e0 0xc74164de /* SGMII_CTRL */
63 0x0007c 0x4e /* PORT0_STATUS */
64 0x00094 0x4e /* PORT6_STATUS */
65 >;
66 };
67
68 phy4: ethernet-phy@4 {
69 reg = <4>;
70 };
71 };
72
73 };
74
75 keys {
76 compatible = "gpio-keys";
77 pinctrl-0 = <&button_pins>;
78 pinctrl-names = "default";
79
80 wifi {
81 label = "wifi";
82 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_RFKILL>;
84 };
85
86 reset {
87 label = "reset";
88 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_RESTART>;
90 };
91
92 wps {
93 label = "wps";
94 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
95 linux,code = <KEY_WPS_BUTTON>;
96 };
97 };
98
99 leds {
100 compatible = "gpio-leds";
101 pinctrl-0 = <&led_pins>;
102 pinctrl-names = "default";
103
104 usb1 {
105 label = "r7500:white:usb1";
106 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
107 };
108
109 usb2 {
110 label = "r7500:white:usb2";
111 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
112 };
113
114 power_amber: power_amber {
115 label = "r7500:amber:power";
116 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
117 };
118
119 wan_white {
120 label = "r7500:white:wan";
121 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
122 };
123
124 wan_amber {
125 label = "r7500:amber:wan";
126 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
127 };
128
129 wps {
130 label = "r7500:white:wps";
131 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
132 };
133
134 esata {
135 label = "r7500:white:esata";
136 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
137 };
138
139 power_white: power_white {
140 label = "r7500:white:power";
141 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
142 default-state = "keep";
143 };
144
145 wifi {
146 label = "r7500:white:wifi";
147 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
148 };
149 };
150 };
151
152 &qcom_pinmux {
153 button_pins: button_pins {
154 mux {
155 pins = "gpio6", "gpio54", "gpio65";
156 function = "gpio";
157 drive-strength = <2>;
158 bias-pull-up;
159 };
160 };
161
162 i2c4_pins: i2c4_pinmux {
163 mux {
164 pins = "gpio12", "gpio13";
165 function = "gsbi4";
166 drive-strength = <12>;
167 bias-disable;
168 };
169 };
170
171 led_pins: led_pins {
172 mux {
173 pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
174 "gpio24","gpio26", "gpio53", "gpio64";
175 function = "gpio";
176 drive-strength = <2>;
177 bias-pull-up;
178 };
179 };
180
181 mdio0_pins: mdio0_pins {
182 mux {
183 pins = "gpio0", "gpio1";
184 function = "mdio";
185 drive-strength = <8>;
186 bias-disable;
187 };
188 };
189
190 nand_pins: nand_pins {
191 disable {
192 pins = "gpio34", "gpio35", "gpio36",
193 "gpio37", "gpio38";
194 function = "nand";
195 drive-strength = <10>;
196 bias-disable;
197 };
198
199 pullups {
200 pins = "gpio39";
201 function = "nand";
202 drive-strength = <10>;
203 bias-pull-up;
204 };
205
206 hold {
207 pins = "gpio40", "gpio41", "gpio42",
208 "gpio43", "gpio44", "gpio45",
209 "gpio46", "gpio47";
210 function = "nand";
211 drive-strength = <10>;
212 bias-bus-hold;
213 };
214 };
215
216 rgmii2_pins: rgmii2_pins {
217 mux {
218 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
219 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
220 function = "rgmii2";
221 drive-strength = <8>;
222 bias-disable;
223 };
224 };
225 };
226
227 &gsbi4 {
228 qcom,mode = <GSBI_PROT_I2C_UART>;
229 status = "okay";
230 serial@16340000 {
231 status = "okay";
232 };
233 /*
234 * The i2c device on gsbi4 should not be enabled.
235 * On ipq806x designs gsbi4 i2c is meant for exclusive
236 * RPM usage. Turning this on in kernel manifests as
237 * i2c failure for the RPM.
238 */
239 };
240
241 &sata_phy {
242 status = "okay";
243 };
244
245 &sata {
246 status = "okay";
247 };
248
249 &usb3_0 {
250 clocks = <&gcc USB30_1_MASTER_CLK>;
251 status = "okay";
252 };
253
254 &usb3_1 {
255 clocks = <&gcc USB30_0_MASTER_CLK>;
256 status = "okay";
257 };
258
259 &pcie0 {
260 status = "okay";
261 };
262
263 &pcie1 {
264 status = "okay";
265 force_gen1 = <1>;
266 };
267
268 &nand_controller {
269 status = "okay";
270
271 pinctrl-0 = <&nand_pins>;
272 pinctrl-names = "default";
273
274 nand@0 {
275 reg = <0>;
276 compatible = "qcom,nandcs";
277
278 nand-ecc-strength = <4>;
279 nand-bus-width = <8>;
280 nand-ecc-step-size = <512>;
281
282 partitions {
283 compatible = "fixed-partitions";
284 #address-cells = <1>;
285 #size-cells = <1>;
286
287 qcadata@0 {
288 label = "qcadata";
289 reg = <0x0000000 0x0c80000>;
290 read-only;
291 };
292
293 APPSBL@c80000 {
294 label = "APPSBL";
295 reg = <0x0c80000 0x0500000>;
296 read-only;
297 };
298
299 APPSBLENV@1180000 {
300 label = "APPSBLENV";
301 reg = <0x1180000 0x0080000>;
302 read-only;
303 };
304
305 art: art@1200000 {
306 label = "art";
307 reg = <0x1200000 0x0140000>;
308 read-only;
309 };
310
311 kernel@1340000 {
312 label = "kernel";
313 reg = <0x1340000 0x0400000>;
314 };
315
316 ubi@1740000 {
317 label = "ubi";
318 reg = <0x1740000 0x1600000>;
319 };
320
321 netgear@2d40000 {
322 label = "netgear";
323 reg = <0x2d40000 0x0c00000>;
324 read-only;
325 };
326
327 reserve@3940000 {
328 label = "reserve";
329 reg = <0x3940000 0x46c0000>;
330 read-only;
331 };
332 };
333 };
334 };
335
336 &gmac1 {
337 status = "okay";
338 phy-mode = "rgmii";
339 qcom,id = <1>;
340
341 pinctrl-0 = <&rgmii2_pins>;
342 pinctrl-names = "default";
343
344 mtd-mac-address = <&art 6>;
345
346 fixed-link {
347 speed = <1000>;
348 full-duplex;
349 };
350 };
351
352 &gmac2 {
353 status = "okay";
354 phy-mode = "sgmii";
355 qcom,id = <2>;
356
357 mtd-mac-address = <&art 0>;
358
359 fixed-link {
360 speed = <1000>;
361 full-duplex;
362 };
363 };
364
365 &tcsr {
366 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
367 compatible = "qcom,tcsr";
368 };
369
370 &adm_dma {
371 status = "okay";
372 };