d23d57aa47233bf3f2a72f6abdf819c43d79be59
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-nbg6817.dts
1 #include "qcom-ipq8065-v1.0.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 model = "ZyXEL NBG6817";
7 compatible = "zyxel,nbg6817", "qcom,ipq8065";
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 = &uart4;
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 = "root=/dev/mmcblk0p5 rootfstype=squashfs,ext4 rootwait noinitrd";
37 linux,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 off {
62 pins = "gpio26", "gpio33", "gpio64";
63 function = "gpio";
64 drive-strength = <2>;
65 bias-pull-down;
66 };
67
68 on {
69 pins = "gpio9";
70 function = "gpio";
71 drive-strength = <2>;
72 bias-pull-up;
73 };
74 };
75
76 mdio0_pins: mdio0_pins {
77 mux {
78 pins = "gpio0", "gpio1";
79 function = "gpio";
80 drive-strength = <8>;
81 bias-disable;
82 };
83
84 clk {
85 pins = "gpio1";
86 input-disable;
87 };
88 };
89
90 rgmii2_pins: rgmii2_pins {
91 mux {
92 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
93 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
94 function = "rgmii2";
95 drive-strength = <8>;
96 bias-disable;
97 };
98
99 tx {
100 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
101 input-disable;
102 };
103 };
104
105 spi_pins: spi_pins {
106 mux {
107 pins = "gpio18", "gpio19", "gpio21";
108 function = "gsbi5";
109 drive-strength = <10>;
110 bias-none;
111 };
112
113 cs {
114 pins = "gpio20";
115 drive-strength = <12>;
116 };
117 };
118
119 usb0_pwr_en_pins: usb0_pwr_en_pins {
120 pwr {
121 pins = "gpio14";
122 function = "gpio";
123 drive-strength = <12>;
124 bias-pull-down;
125 output-high;
126 };
127
128 ovc {
129 pins = "gpio15";
130 function = "gpio";
131 drive-strength = <12>;
132 bias-pull-up;
133 output-high;
134 };
135 };
136
137 usb1_pwr_en_pins: usb1_pwr_en_pins {
138 pwr {
139 pins = "gpio17";
140 function = "gpio";
141 drive-strength = <12>;
142 bias-pull-down;
143 output-high;
144 };
145
146 ovc {
147 pins = "gpio16";
148 function = "gpio";
149 drive-strength = <12>;
150 bias-pull-up;
151 output-high;
152 };
153 };
154 };
155
156 gsbi@16300000 {
157 qcom,mode = <GSBI_PROT_I2C_UART>;
158 status = "ok";
159 serial@16340000 {
160 status = "ok";
161 };
162 /*
163 * The i2c device on gsbi4 should not be enabled.
164 * On ipq806x designs gsbi4 i2c is meant for exclusive
165 * RPM usage. Turning this on in kernel manifests as
166 * i2c failure for the RPM.
167 */
168 };
169
170 gsbi5: gsbi@1a200000 {
171 qcom,mode = <GSBI_PROT_SPI>;
172 status = "ok";
173
174 spi4: spi@1a280000 {
175 status = "ok";
176 spi-max-frequency = <50000000>;
177 pinctrl-0 = <&spi_pins>;
178 pinctrl-names = "default";
179
180 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
181
182 flash: m25p80@0 {
183 compatible = "s25fl512s";
184 #address-cells = <1>;
185 #size-cells = <1>;
186 spi-max-frequency = <51200000>;
187 reg = <0>;
188
189 linux,part-probe = "qcom-smem";
190 };
191 };
192 };
193
194 phy@100f8800 { /* USB3 port 1 HS phy */
195 status = "ok";
196 };
197
198 phy@100f8830 { /* USB3 port 1 SS phy */
199 status = "ok";
200 };
201
202 phy@110f8800 { /* USB3 port 0 HS phy */
203 status = "ok";
204 };
205
206 phy@110f8830 { /* USB3 port 0 SS phy */
207 status = "ok";
208 };
209
210 usb30@0 {
211 status = "ok";
212
213 pinctrl-0 = <&usb0_pwr_en_pins>;
214 pinctrl-names = "default";
215 };
216
217 usb30@1 {
218 status = "ok";
219
220 pinctrl-0 = <&usb1_pwr_en_pins>;
221 pinctrl-names = "default";
222 };
223
224 pcie0: pci@1b500000 {
225 status = "ok";
226 reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
227 pinctrl-0 = <&pcie0_pins>;
228 pinctrl-names = "default";
229 };
230
231 pcie1: pci@1b700000 {
232 status = "ok";
233 reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
234 pinctrl-0 = <&pcie1_pins>;
235 pinctrl-names = "default";
236 };
237
238 mdio0: mdio {
239 compatible = "virtual,mdio-gpio";
240 #address-cells = <1>;
241 #size-cells = <0>;
242 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_LOW &qcom_pinmux 0 GPIO_ACTIVE_LOW>;
243 pinctrl-0 = <&mdio0_pins>;
244 pinctrl-names = "default";
245
246 phy0: ethernet-phy@0 {
247 device_type = "ethernet-phy";
248 reg = <0>;
249 qca,ar8327-initvals = <
250 0x00004 0x7600000 /* PAD0_MODE */
251 0x00008 0x1000000 /* PAD5_MODE */
252 0x0000c 0x80 /* PAD6_MODE */
253 0x000e4 0xaa545 /* MAC_POWER_SEL */
254 0x000e0 0xc74164de /* SGMII_CTRL */
255 0x0007c 0x4e /* PORT0_STATUS */
256 0x00094 0x4e /* PORT6_STATUS */
257 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
258 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
259 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
260 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
261 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
262 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
263 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
264 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
265 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
266 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
267 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
268 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
269 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
270 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
271 >;
272 };
273
274 phy4: ethernet-phy@4 {
275 device_type = "ethernet-phy";
276 reg = <4>;
277 qca,ar8327-initvals = <
278 0x000e4 0x6a545 /* MAC_POWER_SEL */
279 0x0000c 0x80 /* PAD6_MODE */
280 >;
281 };
282 };
283
284 gmac1: ethernet@37200000 {
285 status = "ok";
286 phy-mode = "rgmii";
287 qcom,id = <1>;
288 qcom,phy_mdio_addr = <4>;
289 qcom,poll_required = <0>;
290 qcom,rgmii_delay = <1>;
291 qcom,phy_mii_type = <0>;
292 qcom,emulation = <0>;
293 qcom,irq = <255>;
294 mdiobus = <&mdio0>;
295
296 pinctrl-0 = <&rgmii2_pins>;
297 pinctrl-names = "default";
298
299 fixed-link {
300 speed = <1000>;
301 full-duplex;
302 };
303 };
304
305 gmac2: ethernet@37400000 {
306 status = "ok";
307 phy-mode = "sgmii";
308 qcom,id = <2>;
309 qcom,phy_mdio_addr = <0>; /* none */
310 qcom,poll_required = <0>; /* no polling */
311 qcom,rgmii_delay = <0>;
312 qcom,phy_mii_type = <1>;
313 qcom,emulation = <0>;
314 qcom,irq = <258>;
315 mdiobus = <&mdio0>;
316
317 fixed-link {
318 speed = <1000>;
319 full-duplex;
320 };
321 };
322
323 rpm@108000 {
324 pinctrl-0 = <&i2c4_pins>;
325 pinctrl-names = "default";
326 };
327
328 amba {
329 sdcc1: sdcc@12400000 {
330 status = "okay";
331 dmas = <&sdcc1bam 2>, <&sdcc1bam 1>;
332 dma-names = "tx", "rx";
333 };
334 };
335 };
336
337 gpio-keys {
338 compatible = "gpio-keys";
339 pinctrl-0 = <&button_pins>;
340 pinctrl-names = "default";
341
342 wifi {
343 label = "wifi";
344 gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
345 linux,code = <KEY_RFKILL>;
346 };
347
348 reset {
349 label = "reset";
350 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
351 linux,code = <KEY_RESTART>;
352 };
353
354 wps {
355 label = "wps";
356 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
357 linux,code = <KEY_WPS_BUTTON>;
358 };
359 };
360
361 gpio-leds {
362 compatible = "gpio-leds";
363 pinctrl-0 = <&led_pins>;
364 pinctrl-names = "default";
365
366 internet {
367 label = "nbg6817:white:internet";
368 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
369 };
370
371 power: power {
372 label = "nbg6817:white:power";
373 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
374 };
375
376 wifi {
377 label = "nbg6817:amber:wifi";
378 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
379 };
380
381 wifi5g {
382 label = "nbg6817:amber:wifi5g";
383 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
384 };
385 };
386 };
387
388 &adm_dma {
389 status = "ok";
390 };