ipq806x: move mdio node to ipq8064 dts
[openwrt/staging/hauke.git] / target / linux / ipq806x / files-5.4 / arch / arm / boot / dts / qcom-ipq8065-nbg6817.dts
1 #include "qcom-ipq8065.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 model = "ZyXEL NBG6817";
7 compatible = "zyxel,nbg6817", "qcom,ipq8065", "qcom,ipq8064";
8
9 memory@0 {
10 reg = <0x42000000 0x1e000000>;
11 device_type = "memory";
12 };
13
14 reserved-memory {
15 #address-cells = <1>;
16 #size-cells = <1>;
17 ranges;
18 rsvd@41200000 {
19 reg = <0x41200000 0x300000>;
20 no-map;
21 };
22 };
23
24 aliases {
25 serial0 = &gsbi4_serial;
26 mdio-gpio0 = &mdio0;
27 sdcc1 = &sdcc1;
28
29 led-boot = &power;
30 led-failsafe = &power;
31 led-running = &power;
32 led-upgrade = &power;
33 };
34
35 chosen {
36 bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd";
37 stdout-path = "serial0:115200n8";
38 append-rootblock = "root=/dev/mmcblk0p";
39 };
40
41 keys {
42 compatible = "gpio-keys";
43 pinctrl-0 = <&button_pins>;
44 pinctrl-names = "default";
45
46 wifi {
47 label = "wifi";
48 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RFKILL>;
50 linux,input-type = <EV_SW>;
51 };
52
53 reset {
54 label = "reset";
55 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58
59 wps {
60 label = "wps";
61 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_WPS_BUTTON>;
63 };
64 };
65
66 leds {
67 compatible = "gpio-leds";
68 pinctrl-0 = <&led_pins>;
69 pinctrl-names = "default";
70
71 internet {
72 label = "nbg6817:white:internet";
73 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
74 };
75
76 power: power {
77 label = "nbg6817:white:power";
78 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
79 default-state = "keep";
80 };
81
82 wifi2g {
83 label = "nbg6817:amber:wifi2g";
84 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
85 };
86
87 /* wifi2g amber from the manual is missing */
88
89 wifi5g {
90 label = "nbg6817:amber:wifi5g";
91 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
92 };
93
94 /* wifi5g amber from the manual is missing */
95 };
96 };
97
98 &qcom_pinmux {
99 button_pins: button_pins {
100 mux {
101 pins = "gpio53", "gpio54", "gpio65";
102 function = "gpio";
103 drive-strength = <2>;
104 bias-pull-up;
105 };
106 };
107
108 i2c4_pins: i2c4_pinmux {
109 mux {
110 pins = "gpio12", "gpio13";
111 function = "gsbi4";
112 drive-strength = <12>;
113 bias-disable;
114 };
115 };
116
117 led_pins: led_pins {
118 mux {
119 pins = "gpio9", "gpio26", "gpio33", "gpio64";
120 function = "gpio";
121 drive-strength = <2>;
122 bias-pull-down;
123 };
124 };
125
126 mdio0_pins: mdio0_pins {
127 mux {
128 pins = "gpio0", "gpio1";
129 function = "mdio";
130 drive-strength = <8>;
131 bias-disable;
132 };
133
134 clk {
135 pins = "gpio1";
136 input-disable;
137 };
138 };
139
140 rgmii2_pins: rgmii2_pins {
141 mux {
142 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
143 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
144 function = "rgmii2";
145 drive-strength = <8>;
146 bias-disable;
147 };
148
149 tx {
150 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
151 input-disable;
152 };
153 };
154
155 spi_pins: spi_pins {
156 mux {
157 pins = "gpio18", "gpio19", "gpio21";
158 function = "gsbi5";
159 drive-strength = <10>;
160 bias-none;
161 };
162
163 cs {
164 pins = "gpio20";
165 drive-strength = <12>;
166 };
167 };
168
169 usb0_pwr_en_pins: usb0_pwr_en_pins {
170 mux {
171 pins = "gpio16", "gpio17";
172 function = "gpio";
173 drive-strength = <12>;
174 };
175
176 pwr {
177 pins = "gpio17";
178 bias-pull-down;
179 output-high;
180 };
181
182 ovc {
183 pins = "gpio16";
184 bias-pull-up;
185 };
186 };
187
188 usb1_pwr_en_pins: usb1_pwr_en_pins {
189 mux {
190 pins = "gpio14", "gpio15";
191 function = "gpio";
192 drive-strength = <12>;
193 };
194
195 pwr {
196 pins = "gpio14";
197 bias-pull-down;
198 output-high;
199 };
200
201 ovc {
202 pins = "gpio15";
203 bias-pull-up;
204 };
205 };
206 };
207
208 &gsbi4 {
209 qcom,mode = <GSBI_PROT_I2C_UART>;
210 status = "okay";
211 serial@16340000 {
212 status = "okay";
213 };
214 /*
215 * The i2c device on gsbi4 should not be enabled.
216 * On ipq806x designs gsbi4 i2c is meant for exclusive
217 * RPM usage. Turning this on in kernel manifests as
218 * i2c failure for the RPM.
219 */
220 };
221
222 &gsbi5 {
223 qcom,mode = <GSBI_PROT_SPI>;
224 status = "okay";
225
226 spi4: spi@1a280000 {
227 status = "okay";
228
229 pinctrl-0 = <&spi_pins>;
230 pinctrl-names = "default";
231
232 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
233
234 m25p80@0 {
235 compatible = "jedec,spi-nor";
236 #address-cells = <1>;
237 #size-cells = <1>;
238 spi-max-frequency = <51200000>;
239 reg = <0>;
240
241 partitions {
242 compatible = "qcom,smem";
243 };
244 };
245 };
246 };
247
248 &usb3_0 {
249 status = "okay";
250
251 pinctrl-0 = <&usb0_pwr_en_pins>;
252 pinctrl-names = "default";
253 };
254
255 &usb3_1 {
256 status = "okay";
257
258 pinctrl-0 = <&usb1_pwr_en_pins>;
259 pinctrl-names = "default";
260 };
261
262 &pcie0 {
263 status = "okay";
264 reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
265 pinctrl-0 = <&pcie0_pins>;
266 pinctrl-names = "default";
267 };
268
269 &pcie1 {
270 status = "okay";
271 reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
272 pinctrl-0 = <&pcie1_pins>;
273 pinctrl-names = "default";
274 force_gen1 = <1>;
275 };
276
277 &mdio0 {
278 status = "okay";
279
280 pinctrl-0 = <&mdio0_pins>;
281 pinctrl-names = "default";
282
283
284 phy0: ethernet-phy@0 {
285 reg = <0>;
286 qca,ar8327-initvals = <
287 0x00004 0x7600000 /* PAD0_MODE */
288 0x00008 0x1000000 /* PAD5_MODE */
289 0x0000c 0x80 /* PAD6_MODE */
290 0x000e4 0xaa545 /* MAC_POWER_SEL */
291 0x000e0 0xc74164de /* SGMII_CTRL */
292 0x0007c 0x4e /* PORT0_STATUS */
293 0x00094 0x4e /* PORT6_STATUS */
294 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
295 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
296 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
297 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
298 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
299 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
300 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
301 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
302 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
303 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
304 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
305 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
306 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
307 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
308 >;
309 };
310
311 phy4: ethernet-phy@4 {
312 reg = <4>;
313 qca,ar8327-initvals = <
314 0x000e4 0x6a545 /* MAC_POWER_SEL */
315 0x0000c 0x80 /* PAD6_MODE */
316 >;
317 };
318 };
319
320 &gmac1 {
321 status = "okay";
322 phy-mode = "rgmii";
323 qcom,id = <1>;
324 qcom,phy_mdio_addr = <4>;
325 qcom,poll_required = <0>;
326 qcom,rgmii_delay = <1>;
327 qcom,phy_mii_type = <0>;
328 qcom,emulation = <0>;
329 qcom,irq = <255>;
330 mdiobus = <&mdio0>;
331
332 pinctrl-0 = <&rgmii2_pins>;
333 pinctrl-names = "default";
334
335 fixed-link {
336 speed = <1000>;
337 full-duplex;
338 };
339 };
340
341 &gmac2 {
342 status = "okay";
343 phy-mode = "sgmii";
344 qcom,id = <2>;
345 qcom,phy_mdio_addr = <0>; /* none */
346 qcom,poll_required = <0>; /* no polling */
347 qcom,rgmii_delay = <0>;
348 qcom,phy_mii_type = <1>;
349 qcom,emulation = <0>;
350 qcom,irq = <258>;
351 mdiobus = <&mdio0>;
352
353 fixed-link {
354 speed = <1000>;
355 full-duplex;
356 };
357 };
358
359 &amba {
360 sdcc1: sdcc@12400000 {
361 status = "okay";
362 };
363 };
364
365 &adm_dma {
366 status = "okay";
367 };