| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465 | 
							- // SPDX-License-Identifier: BSD-3-Clause
 
- /*
 
-  *  Copyright (C) 2017 Christian Mehlis <[email protected]>
 
-  *  Copyright (C) 2018 Mathias Kresin <[email protected]>
 
-  *  All rights reserved.
 
-  */
 
- #include "qcom-ipq8064-v1.0.dtsi"
 
- #include <dt-bindings/input/input.h>
 
- #include <dt-bindings/soc/qcom,tcsr.h>
 
- / {
 
- 	compatible = "compex,wpq864", "qcom,ipq8064";
 
- 	model = "Compex WPQ864";
 
- 	aliases {
 
- 		mdio-gpio0 = &mdio0;
 
- 		ethernet0 = &gmac1;
 
- 		ethernet1 = &gmac0;
 
- 		led-boot = &led_pass;
 
- 		led-failsafe = &led_fail;
 
- 		led-running = &led_pass;
 
- 		led-upgrade = &led_pass;
 
- 	};
 
- 	leds {
 
- 		compatible = "gpio-leds";
 
- 		pinctrl-0 = <&led_pins>;
 
- 		pinctrl-names = "default";
 
- 		rss4 {
 
- 			label = "green:rss4";
 
- 			gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
 
- 		};
 
- 		rss3 {
 
- 			label = "green:rss3";
 
- 			gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
 
- 			default-state = "keep";
 
- 		};
 
- 		rss2 {
 
- 			label = "orange:rss2";
 
- 			gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
 
- 		};
 
- 		rss1 {
 
- 			label = "red:rss1";
 
- 			gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
 
- 		};
 
- 		led_pass: pass {
 
- 			label = "green:pass";
 
- 			gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
 
- 		};
 
- 		led_fail: fail {
 
- 			label = "green:fail";
 
- 			gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
 
- 		};
 
- 		usb {
 
- 			label = "green:usb";
 
- 			gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
 
- 		};
 
- 		usb-pcie {
 
- 			label = "green:usb-pcie";
 
- 			gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
 
- 		};
 
- 	};
 
- 	keys {
 
- 		compatible = "gpio-keys";
 
- 		pinctrl-0 = <&button_pins>;
 
- 		pinctrl-names = "default";
 
- 		reset {
 
- 			label = "reset";
 
- 			gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
 
- 			linux,code = <KEY_RESTART>;
 
- 			debounce-interval = <60>;
 
- 			wakeup-source;
 
- 		};
 
- 	};
 
- 	beeper {
 
- 		compatible = "gpio-beeper";
 
- 		pinctrl-0 = <&beeper_pins>;
 
- 		pinctrl-names = "default";
 
- 		gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
 
- 	};
 
- };
 
- &rpm {
 
- 	pinctrl-0 = <&rpm_pins>;
 
- 	pinctrl-names = "default";
 
- };
 
- &nand {
 
- 	status = "okay";
 
- 	pinctrl-0 = <&nand_pins>;
 
- 	pinctrl-names = "default";
 
- 	mt29f2g08abbeah4@0 {
 
- 		compatible = "qcom,nandcs";
 
- 		reg = <0>;
 
- 		nand-ecc-strength = <4>;
 
- 		nand-bus-width = <8>;
 
- 		nand-ecc-step-size = <512>;
 
- 		nand-is-boot-medium;
 
- 		qcom,boot_pages_size = <0x1180000>;
 
- 		partitions {
 
- 			compatible = "fixed-partitions";
 
- 			#address-cells = <1>;
 
- 			#size-cells = <1>;
 
- 			SBL1@0 {
 
- 				label = "SBL1";
 
- 				reg = <0x0000000 0x0040000>;
 
- 				read-only;
 
- 			};
 
- 			MIBIB@40000 {
 
- 				label = "MIBIB";
 
- 				reg = <0x0040000 0x0140000>;
 
- 				read-only;
 
- 			};
 
- 			SBL2@180000 {
 
- 				label = "SBL2";
 
- 				reg = <0x0180000 0x0140000>;
 
- 				read-only;
 
- 			};
 
- 			SBL3@2c0000 {
 
- 				label = "SBL3";
 
- 				reg = <0x02c0000 0x0280000>;
 
- 				read-only;
 
- 			};
 
- 			DDRCONFIG@540000 {
 
- 				label = "DDRCONFIG";
 
- 				reg = <0x0540000 0x0120000>;
 
- 				read-only;
 
- 			};
 
- 			SSD@660000 {
 
- 				label = "SSD";
 
- 				reg = <0x0660000 0x0120000>;
 
- 				read-only;
 
- 			};
 
- 			TZ@780000 {
 
- 				label = "TZ";
 
- 				reg = <0x0780000 0x0280000>;
 
- 				read-only;
 
- 			};
 
- 			RPM@a00000 {
 
- 				label = "RPM";
 
- 				reg = <0x0a00000 0x0280000>;
 
- 				read-only;
 
- 			};
 
- 			APPSBL@c80000 {
 
- 				label = "APPSBL";
 
- 				reg = <0x0c80000 0x0500000>;
 
- 				read-only;
 
- 			};
 
- 			APPSBLENV@1180000 {
 
- 				label = "APPSBLENV";
 
- 				reg = <0x1180000 0x0080000>;
 
- 			};
 
- 			ART@1200000 {
 
- 				label = "ART";
 
- 				reg = <0x1200000 0x0140000>;
 
- 			};
 
- 			ubi@1340000 {
 
- 				label = "ubi";
 
- 				reg = <0x1340000 0x4000000>;
 
- 			};
 
- 			BOOTCONFIG@5340000 {
 
- 				label = "BOOTCONFIG";
 
- 				reg = <0x5340000 0x0060000>;
 
- 			};
 
- 			SBL2-1@53a0000- {
 
- 				label = "SBL2_1";
 
- 				reg = <0x53a0000 0x0140000>;
 
- 				read-only;
 
- 			};
 
- 			SBL3-1@54e0000 {
 
- 				label = "SBL3_1";
 
- 				reg = <0x54e0000 0x0280000>;
 
- 				read-only;
 
- 			};
 
- 			DDRCONFIG-1@5760000 {
 
- 				label = "DDRCONFIG_1";
 
- 				reg = <0x5760000 0x0120000>;
 
- 				read-only;
 
- 			};
 
- 			SSD-1@5880000 {
 
- 				label = "SSD_1";
 
- 				reg = <0x5880000 0x0120000>;
 
- 				read-only;
 
- 			};
 
- 			TZ-1@59a0000 {
 
- 				label = "TZ_1";
 
- 				reg = <0x59a0000 0x0280000>;
 
- 				read-only;
 
- 			};
 
- 			RPM-1@5c20000 {
 
- 				label = "RPM_1";
 
- 				reg = <0x5c20000 0x0280000>;
 
- 				read-only;
 
- 			};
 
- 			BOOTCONFIG1@5ea0000 {
 
- 				label = "BOOTCONFIG1";
 
- 				reg = <0x5ea0000 0x0060000>;
 
- 			};
 
- 			APPSBL-1@5f00000 {
 
- 				label = "APPSBL_1";
 
- 				reg = <0x5f00000 0x0500000>;
 
- 				read-only;
 
- 			};
 
- 			ubi-1@6400000 {
 
- 				label = "ubi_1";
 
- 				reg = <0x6400000 0x4000000>;
 
- 			};
 
- 			unused@a400000 {
 
- 				label = "unused";
 
- 				reg = <0xa400000 0x5c00000>;
 
- 			};
 
- 		};
 
- 	};
 
- };
 
- &adm_dma {
 
- 	status = "okay";
 
- };
 
- &mdio0 {
 
- 	status = "okay";
 
- 	pinctrl-0 = <&mdio0_pins>;
 
- 	pinctrl-names = "default";
 
- 	ethernet-phy@0 {
 
- 		reg = <0>;
 
- 		qca,ar8327-initvals = <
 
- 			0x00004 0x7600000   /* PAD0_MODE */
 
- 			0x00008 0x1000000   /* PAD5_MODE */
 
- 			0x0000c 0x80        /* PAD6_MODE */
 
- 			0x000e4 0x6a545     /* MAC_POWER_SEL */
 
- 			0x000e0 0xc74164de  /* SGMII_CTRL */
 
- 			0x0007c 0x4e        /* PORT0_STATUS */
 
- 			0x00094 0x4e        /* PORT6_STATUS */
 
- 			>;
 
- 	};
 
- 	ethernet-phy@4 {
 
- 		reg = <4>;
 
- 	};
 
- };
 
- &gmac1 {
 
- 	status = "okay";
 
- 	pinctrl-0 = <&rgmii2_pins>;
 
- 	pinctrl-names = "default";
 
- 	phy-mode = "rgmii";
 
- 	qcom,id = <1>;
 
- 	fixed-link {
 
- 		speed = <1000>;
 
- 		full-duplex;
 
- 	};
 
- };
 
- &gmac2 {
 
- 	status = "okay";
 
- 	phy-mode = "sgmii";
 
- 	qcom,id = <2>;
 
- 	fixed-link {
 
- 		speed = <1000>;
 
- 		full-duplex;
 
- 	};
 
- };
 
- &gsbi4_serial {
 
- 	pinctrl-0 = <&uart0_pins>;
 
- 	pinctrl-names = "default";
 
- };
 
- &flash {
 
- 	compatible = "jedec,spi-nor";
 
- };
 
- &sata_phy {
 
- 	status = "disabled";
 
- };
 
- &sata {
 
- 	status = "disabled";
 
- };
 
- &ss_phy_0 {		/* USB3 port 0 SS phy */
 
- 	status = "okay";
 
- 	rx_eq = <2>;
 
- 	tx_deamp_3_5db = <32>;
 
- 	mpll = <160>;
 
- };
 
- &ss_phy_1 {		/* USB3 port 1 SS phy */
 
- 	status = "okay";
 
- 	rx_eq = <2>;
 
- 	tx_deamp_3_5db = <32>;
 
- 	mpll = <160>;
 
- };
 
- &pcie0 {
 
- 	status = "okay";
 
- 	/delete-property/ pinctrl-0;
 
- 	/delete-property/ pinctrl-names;
 
- 	/delete-property/ perst-gpios;
 
- };
 
- &pcie1 {
 
- 	status = "okay";
 
- };
 
- &pcie2 {
 
- 	status = "okay";
 
- 	/delete-property/ pinctrl-0;
 
- 	/delete-property/ pinctrl-names;
 
- 	/delete-property/ perst-gpios;
 
- };
 
- &qcom_pinmux {
 
- 	pinctrl-names = "default";
 
- 	pinctrl-0 = <&state_default>;
 
- 	state_default: pinctrl0 {
 
- 		pcie0_pcie2_perst {
 
- 			pins = "gpio3";
 
- 			function = "gpio";
 
- 			drive-strength = <2>;
 
- 			bias-disable;
 
- 			output-high;
 
- 		};
 
- 	};
 
- 	led_pins: led_pins {
 
- 		mux {
 
- 			pins = "gpio7", "gpio8", "gpio9", "gpio22",
 
- 			       "gpio23", "gpio24", "gpio25", "gpio53";
 
- 			function = "gpio";
 
- 			drive-strength = <2>;
 
- 			bias-pull-up;
 
- 		};
 
- 	};
 
- 	button_pins: button_pins {
 
- 		mux {
 
- 			pins = "gpio54";
 
- 			function = "gpio";
 
- 			drive-strength = <2>;
 
- 			bias-pull-up;
 
- 		};
 
- 	};
 
- 	beeper_pins: beeper_pins {
 
- 		mux {
 
- 			pins = "gpio55";
 
- 			function = "gpio";
 
- 			drive-strength = <2>;
 
- 			bias-pull-up;
 
- 		};
 
- 	};
 
- 	rpm_pins: rpm_pins {
 
- 		mux {
 
- 			pins = "gpio12", "gpio13";
 
- 			function = "gsbi4";
 
- 			drive-strength = <10>;
 
- 			bias-disable;
 
- 		};
 
- 	};
 
- 	uart0_pins: uart0_pins {
 
- 		mux {
 
- 			pins = "gpio10", "gpio11";
 
- 			function = "gsbi4";
 
- 			drive-strength = <10>;
 
- 			bias-disable;
 
- 		};
 
- 	};
 
- 	spi_pins: spi_pins {
 
- 		mux {
 
- 			pins = "gpio18", "gpio19";
 
- 			function = "gsbi5";
 
- 			drive-strength = <10>;
 
- 			bias-pull-down;
 
- 		};
 
- 		clk {
 
- 			pins = "gpio21";
 
- 			function = "gsbi5";
 
- 			drive-strength = <12>;
 
- 			bias-pull-down;
 
- 		};
 
- 		cs {
 
- 			pins = "gpio20";
 
- 			function = "gpio";
 
- 			drive-strength = <10>;
 
- 			bias-pull-up;
 
- 		};
 
- 	};
 
- };
 
- &usb3_0 {
 
- 	status = "okay";
 
- };
 
- &usb3_1 {
 
- 	status = "okay";
 
- };
 
- &tcsr {
 
- 	qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
 
- };
 
 
  |