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 mdio0: mdio@37000000 {
65 compatible = "qcom,ipq8064-mdio", "syscon";
66 reg = <0x37000000 0x200000>;
67 resets = <&gcc GMAC_CORE1_RESET>;
68 reset-names = "stmmaceth";
69 clocks = <&gcc GMAC_CORE1_CLK>;
70 clock-names = "stmmaceth";
72 pinctrl-0 = <&mdio0_pins>;
73 pinctrl-names = "default";
77 qca,ar8327-initvals = <
78 0x00004 0x7600000 /* PAD0_MODE */
79 0x00008 0x1000000 /* PAD5_MODE */
80 0x0000c 0x80 /* PAD6_MODE */
81 0x000e4 0x6a545 /* MAC_POWER_SEL */
82 0x000e0 0xc74164de /* SGMII_CTRL */
83 0x0007c 0x4e /* PORT0_STATUS */
84 0x00094 0x4e /* PORT6_STATUS */
96 compatible = "gpio-leds";
98 pinctrl-0 = <&led_pins>;
99 pinctrl-names = "default";
102 label = "wpq864:green:rss4";
103 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
107 label = "wpq864:green:rss3";
108 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
109 default-state = "keep";
113 label = "wpq864:orange:rss2";
114 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
118 label = "wpq864:red:rss1";
119 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
123 label = "wpq864:green:pass";
124 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
128 label = "wpq864:green:fail";
129 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
133 label = "wpq864:green:usb";
134 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
138 label = "wpq864:green:usb-pcie";
139 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
144 compatible = "gpio-keys";
146 pinctrl-0 = <&button_pins>;
147 pinctrl-names = "default";
151 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
152 linux,code = <KEY_RESTART>;
157 compatible = "gpio-beeper";
159 pinctrl-0 = <&beeper_pins>;
160 pinctrl-names = "default";
162 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
167 pinctrl-0 = <&rpm_pins>;
168 pinctrl-names = "default";
174 pinctrl-0 = <&nand_pins>;
175 pinctrl-names = "default";
178 compatible = "qcom,nandcs";
182 nand-ecc-strength = <4>;
183 nand-bus-width = <8>;
184 nand-ecc-step-size = <512>;
187 compatible = "fixed-partitions";
188 #address-cells = <1>;
193 reg = <0x0000000 0x0040000>;
199 reg = <0x0040000 0x0140000>;
205 reg = <0x0180000 0x0140000>;
211 reg = <0x02c0000 0x0280000>;
217 reg = <0x0540000 0x0120000>;
223 reg = <0x0660000 0x0120000>;
229 reg = <0x0780000 0x0280000>;
235 reg = <0x0a00000 0x0280000>;
241 reg = <0x0c80000 0x0500000>;
247 reg = <0x1180000 0x0080000>;
252 reg = <0x1200000 0x0140000>;
257 reg = <0x1340000 0x4000000>;
261 label = "BOOTCONFIG";
262 reg = <0x5340000 0x0060000>;
267 reg = <0x53a0000 0x0140000>;
273 reg = <0x54e0000 0x0280000>;
277 DDRCONFIG-1@5760000 {
278 label = "DDRCONFIG_1";
279 reg = <0x5760000 0x0120000>;
285 reg = <0x5880000 0x0120000>;
291 reg = <0x59a0000 0x0280000>;
297 reg = <0x5c20000 0x0280000>;
301 BOOTCONFIG1@5ea0000 {
302 label = "BOOTCONFIG1";
303 reg = <0x5ea0000 0x0060000>;
308 reg = <0x5f00000 0x0500000>;
314 reg = <0x6400000 0x4000000>;
319 reg = <0xa400000 0x5c00000>;
332 pinctrl-0 = <&rgmii2_pins>;
333 pinctrl-names = "default";
358 qcom,mode = <GSBI_PROT_I2C_UART>;
364 pinctrl-0 = <&uart0_pins>;
365 pinctrl-names = "default";
371 qcom,mode = <GSBI_PROT_SPI>;
376 pinctrl-0 = <&spi_pins>;
377 pinctrl-names = "default";
379 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
382 compatible = "jedec,spi-nor";
383 #address-cells = <1>;
386 spi-max-frequency = <50000000>;
391 &ss_phy_0 { /* USB3 port 0 SS phy */
395 tx_deamp_3_5db = <32>;
399 &ss_phy_1 { /* USB3 port 1 SS phy */
403 tx_deamp_3_5db = <32>;
410 /delete-property/ pinctrl-0;
411 /delete-property/ pinctrl-names;
412 /delete-property/ perst-gpios;
422 /delete-property/ pinctrl-0;
423 /delete-property/ pinctrl-names;
424 /delete-property/ perst-gpios;
428 pinctrl-names = "default";
429 pinctrl-0 = <&state_default>;
431 state_default: pinctrl0 {
435 drive-strength = <2>;
443 pins = "gpio7", "gpio8", "gpio9", "gpio22",
444 "gpio23", "gpio24", "gpio25", "gpio53";
446 drive-strength = <2>;
451 button_pins: button_pins {
455 drive-strength = <2>;
460 beeper_pins: beeper_pins {
464 drive-strength = <2>;
471 pins = "gpio12", "gpio13";
473 drive-strength = <10>;
478 uart0_pins: uart0_pins {
480 pins = "gpio10", "gpio11";
482 drive-strength = <10>;
489 pins = "gpio18", "gpio19";
491 drive-strength = <10>;
498 drive-strength = <12>;
505 drive-strength = <10>;
510 nand_pins: nand_pins {
512 pins = "gpio34", "gpio35", "gpio36", "gpio37",
515 drive-strength = <10>;
522 drive-strength = <10>;
527 pins = "gpio40", "gpio41", "gpio42", "gpio43",
528 "gpio44", "gpio45", "gpio46", "gpio47";
530 drive-strength = <10>;
535 mdio0_pins: mdio0_pins {
537 pins = "gpio0", "gpio1";
539 drive-strength = <8>;
544 rgmii2_pins: rgmii2_pins {
546 pins = "gpio27", "gpio28", "gpio29", "gpio30",
547 "gpio31", "gpio32", "gpio51", "gpio52",
548 "gpio59", "gpio60", "gpio61", "gpio62";
550 drive-strength = <8>;
565 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;