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