4 * Copyright (C) 2017 Christian Mehlis <christian@m3hlis.de>
5 * Copyright (C) 2018 Mathias Kresin <dev@kresin.me>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the names of the copyright holders nor the names of any
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #include "qcom-ipq8064-v1.0.dtsi"
36 #include <dt-bindings/input/input.h>
37 #include <dt-bindings/soc/qcom,tcsr.h>
40 compatible = "compex,wpq864", "qcom,ipq8064";
41 model = "Compex WPQ864";
45 serial0 = &gsbi4_serial;
50 led-failsafe = &led_fail;
51 led-running = &led_pass;
52 led-upgrade = &led_pass;
56 stdout-path = "serial0:115200n8";
61 pinctrl-0 = <&rpm_pins>;
62 pinctrl-names = "default";
65 nand-controller@1ac00000 {
68 pinctrl-0 = <&nand_pins>;
69 pinctrl-names = "default";
72 compatible = "qcom,nandcs";
76 nand-ecc-strength = <4>;
78 nand-ecc-step-size = <512>;
81 compatible = "fixed-partitions";
87 reg = <0x0000000 0x0040000>;
93 reg = <0x0040000 0x0140000>;
99 reg = <0x0180000 0x0140000>;
105 reg = <0x02c0000 0x0280000>;
111 reg = <0x0540000 0x0120000>;
117 reg = <0x0660000 0x0120000>;
123 reg = <0x0780000 0x0280000>;
129 reg = <0x0a00000 0x0280000>;
135 reg = <0x0c80000 0x0500000>;
141 reg = <0x1180000 0x0080000>;
146 reg = <0x1200000 0x0140000>;
151 reg = <0x1340000 0x4000000>;
155 label = "BOOTCONFIG";
156 reg = <0x5340000 0x0060000>;
161 reg = <0x53a0000 0x0140000>;
167 reg = <0x54e0000 0x0280000>;
171 DDRCONFIG-1@5760000 {
172 label = "DDRCONFIG_1";
173 reg = <0x5760000 0x0120000>;
179 reg = <0x5880000 0x0120000>;
185 reg = <0x59a0000 0x0280000>;
191 reg = <0x5c20000 0x0280000>;
195 BOOTCONFIG1@5ea0000 {
196 label = "BOOTCONFIG1";
197 reg = <0x5ea0000 0x0060000>;
202 reg = <0x5f00000 0x0500000>;
208 reg = <0x6400000 0x4000000>;
213 reg = <0xa400000 0x5c00000>;
220 mdio0: mdio@37000000 {
221 #address-cells = <1>;
224 compatible = "qcom,ipq8064-mdio", "syscon";
225 reg = <0x37000000 0x200000>;
226 resets = <&gcc GMAC_CORE1_RESET>;
227 reset-names = "stmmaceth";
228 clocks = <&gcc GMAC_CORE1_CLK>;
229 clock-names = "stmmaceth";
231 pinctrl-0 = <&mdio0_pins>;
232 pinctrl-names = "default";
236 qca,ar8327-initvals = <
237 0x00004 0x7600000 /* PAD0_MODE */
238 0x00008 0x1000000 /* PAD5_MODE */
239 0x0000c 0x80 /* PAD6_MODE */
240 0x000e4 0x6a545 /* MAC_POWER_SEL */
241 0x000e0 0xc74164de /* SGMII_CTRL */
242 0x0007c 0x4e /* PORT0_STATUS */
243 0x00094 0x4e /* PORT6_STATUS */
253 compatible = "gpio-leds";
255 pinctrl-0 = <&led_pins>;
256 pinctrl-names = "default";
259 label = "wpq864:green:rss4";
260 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
264 label = "wpq864:green:rss3";
265 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
266 default-state = "keep";
270 label = "wpq864:orange:rss2";
271 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
275 label = "wpq864:red:rss1";
276 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
280 label = "wpq864:green:pass";
281 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
285 label = "wpq864:green:fail";
286 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
290 label = "wpq864:green:usb";
291 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
295 label = "wpq864:green:usb-pcie";
296 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
301 compatible = "gpio-keys";
303 pinctrl-0 = <&button_pins>;
304 pinctrl-names = "default";
308 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
309 linux,code = <KEY_RESTART>;
314 compatible = "gpio-beeper";
316 pinctrl-0 = <&beeper_pins>;
317 pinctrl-names = "default";
319 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
330 pinctrl-0 = <&rgmii2_pins>;
331 pinctrl-names = "default";
356 qcom,mode = <GSBI_PROT_I2C_UART>;
362 pinctrl-0 = <&uart0_pins>;
363 pinctrl-names = "default";
369 qcom,mode = <GSBI_PROT_SPI>;
374 pinctrl-0 = <&spi_pins>;
375 pinctrl-names = "default";
377 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
380 compatible = "jedec,spi-nor";
381 #address-cells = <1>;
384 spi-max-frequency = <50000000>;
389 &ss_phy_0 { /* USB3 port 0 SS phy */
393 tx_deamp_3_5db = <32>;
397 &ss_phy_1 { /* USB3 port 1 SS phy */
401 tx_deamp_3_5db = <32>;
408 /delete-property/ pinctrl-0;
409 /delete-property/ pinctrl-names;
410 /delete-property/ perst-gpios;
420 /delete-property/ pinctrl-0;
421 /delete-property/ pinctrl-names;
422 /delete-property/ perst-gpios;
426 pinctrl-names = "default";
427 pinctrl-0 = <&state_default>;
429 state_default: pinctrl0 {
433 drive-strength = <2>;
441 pins = "gpio7", "gpio8", "gpio9", "gpio22",
442 "gpio23", "gpio24", "gpio25", "gpio53";
444 drive-strength = <2>;
449 button_pins: button_pins {
453 drive-strength = <2>;
458 beeper_pins: beeper_pins {
462 drive-strength = <2>;
469 pins = "gpio12", "gpio13";
471 drive-strength = <10>;
476 uart0_pins: uart0_pins {
478 pins = "gpio10", "gpio11";
480 drive-strength = <10>;
487 pins = "gpio18", "gpio19";
489 drive-strength = <10>;
496 drive-strength = <12>;
503 drive-strength = <10>;
508 nand_pins: nand_pins {
510 pins = "gpio34", "gpio35", "gpio36", "gpio37",
513 drive-strength = <10>;
520 drive-strength = <10>;
525 pins = "gpio40", "gpio41", "gpio42", "gpio43",
526 "gpio44", "gpio45", "gpio46", "gpio47";
528 drive-strength = <10>;
533 mdio0_pins: mdio0_pins {
535 pins = "gpio0", "gpio1";
537 drive-strength = <8>;
542 rgmii2_pins: rgmii2_pins {
544 pins = "gpio27", "gpio28", "gpio29", "gpio30",
545 "gpio31", "gpio32", "gpio51", "gpio52",
546 "gpio59", "gpio60", "gpio61", "gpio62";
548 drive-strength = <8>;
564 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;