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