code:
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= apq8094-sony-xperia-kitakami-karin_windy.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= apq8096-db820c.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= apq8096-ifc6640.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= ipq6018-cp01-c1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk01.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk10-c1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= ipq8074-hk10-c2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-alcatel-idol347.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-asus-z00l.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-huawei-g7.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-longcheer-l8150.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-longcheer-l8910.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a3u-eur.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a5u-eur.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e5.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e7.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-grandmax.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-kugo.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8956-sony-xperia-loire-suzu.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-10.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-lg-bullhead-rev-101.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-msft-lumia-octagon-talkman.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-xiaomi-libra.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-huawei-angler-rev-101.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-msft-lumia-octagon-cityman.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-ivy.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-karin.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-satsuki.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-sumire.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-suzuran.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-oneplus3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-oneplus3t.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-dora.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-kagura.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-sony-xperia-tone-keyaki.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-xiaomi-gemini.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996pro-xiaomi-natrium.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8996pro-xiaomi-scorpio.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-asus-novago-tp370ql.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-fxtec-pro1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-hp-envy-x2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-lenovo-miix-630.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-oneplus-cheeseburger.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-oneplus-dumpling.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-lilac.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-xiaomi-sagit.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5-vision-mezzanine.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sa8540p-ride.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-coachz-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-coachz-r1-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-coachz-r3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-coachz-r3-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-homestar-r2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-homestar-r3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-homestar-r4.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-kingoftown-r0.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-kingoftown-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r0.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r1-kb.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r1-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r3-kb.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r3-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r9.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r9-kb.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-r9-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-limozeen-r4.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-limozeen-r9.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-limozeen-nots-r4.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-limozeen-nots-r5.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-lazor-limozeen-nots-r9.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-mrbland-rev0-auo.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-mrbland-rev0-boe.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-mrbland-rev1-auo.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-mrbland-rev1-boe.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pazquel-lte-parade.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pazquel-lte-ti.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pazquel-parade.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pazquel-ti.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pazquel360-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pazquel360-wifi.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pompom-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pompom-r1-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pompom-r2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pompom-r2-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pompom-r3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-pompom-r3-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-quackingstick-r0.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-quackingstick-r0-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-wormdingler-rev0-boe.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-wormdingler-rev0-inx.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-wormdingler-rev1-boe.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-wormdingler-rev1-inx.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-wormdingler-rev1-inx-rt5682s.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-wormdingler-rev1-boe-rt5682s.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-trogdor-r1-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-crd.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-evoker.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-evoker-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-herobrine-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-villager-r0.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-villager-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-villager-r1-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-zombie.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-herobrine-zombie-lte.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-idp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-idp2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc7280-crd-r3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc8280xp-crd.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sc8280xp-lenovo-thinkpad-x13s.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sda660-inforce-ifc6560.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-ganges-kirin.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-discovery.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-pioneer.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-voyager.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm632-fairphone-fp3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm636-sony-xperia-ganges-mermaid.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm660-xiaomi-lavender.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm670-google-sargo.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r1.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c-navigation-mezzanine.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyln.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-oneplus-enchilada.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-oneplus-fajita.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-samsung-starqltechn.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-akari.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-akatsuki.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-sony-xperia-tama-apollo.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-xiaomi-beryllium-ebbg.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-xiaomi-beryllium-tianma.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-xiaomi-polaris.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-shift-axolotl.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-samsung-w737.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-oneplus-billie2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm6350-sony-xperia-lena-pdx213.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm6375-sony-xperia-murray-pdx225.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm7225-fairphone-fp4.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-microsoft-surface-duo.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-sony-xperia-kumano-bahamut.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-sony-xperia-kumano-griffin.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-hdk.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-sony-xperia-edo-pdx203.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-sony-xperia-edo-pdx206.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-hdk.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-microsoft-surface-duo2.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-mtp.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-sony-xperia-sagami-pdx214.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8350-sony-xperia-sagami-pdx215.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8450-hdk.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8450-qrd.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8450-sony-xperia-nagara-pdx223.dtb
dtb-$(CONFIG_ARCH_QCOM)	+= sm8450-sony-xperia-nagara-pdx224.dtb

repo_name: angery/linux


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 */

/dts-v1/;

#include "msm8916-pm8916.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
#include <dt-bindings/sound/apq8016-lpass.h>

/ {
	model = "Qualcomm Technologies, Inc. APQ 8016 SBC";
	compatible = "qcom,apq8016-sbc", "qcom,apq8016";

	aliases {
		serial0 = &blsp1_uart2;
		serial1 = &blsp1_uart1;
		usid0 = &pm8916_0;
		i2c0 = &blsp_i2c2;
		i2c1 = &blsp_i2c6;
		i2c3 = &blsp_i2c4;
		spi0 = &blsp_spi5;
		spi1 = &blsp_spi3;
	};

	chosen {
		stdout-path = "serial0";
	};

	camera_vdddo_1v8: camera-vdddo-1v8 {
		compatible = "regulator-fixed";
		regulator-name = "camera_vdddo";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		regulator-always-on;
	};

	camera_vdda_2v8: camera-vdda-2v8 {
		compatible = "regulator-fixed";
		regulator-name = "camera_vdda";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		regulator-always-on;
	};

	camera_vddd_1v5: camera-vddd-1v5 {
		compatible = "regulator-fixed";
		regulator-name = "camera_vddd";
		regulator-min-microvolt = <1500000>;
		regulator-max-microvolt = <1500000>;
		regulator-always-on;
	};

	reserved-memory {
		ramoops@bff00000 {
			compatible = "ramoops";
			reg = <0x0 0xbff00000 0x0 0x100000>;

			record-size = <0x20000>;
			console-size = <0x20000>;
			ftrace-size = <0x20000>;
		};
	};

	usb2513 {
		compatible = "smsc,usb3503";
		reset-gpios = <&pm8916_gpios 3 GPIO_ACTIVE_LOW>;
		initial-mode = <1>;
	};

	usb_id: usb-id {
		compatible = "linux,extcon-usb-gpio";
		id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb_id_default>;
	};

	hdmi-out {
		compatible = "hdmi-connector";
		type = "a";

		port {
			hdmi_con: endpoint {
				remote-endpoint = <&adv7533_out>;
			};
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		autorepeat;

		pinctrl-names = "default";
		pinctrl-0 = <&msm_key_volp_n_default>;

		button {
			label = "Volume Up";
			linux,code = <KEY_VOLUMEUP>;
			gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
		};
	};

	leds {
		pinctrl-names = "default";
		pinctrl-0 = <&msmgpio_leds>,
			    <&pm8916_gpios_leds>,
			    <&pm8916_mpps_leds>;

		compatible = "gpio-leds";

		led@1 {
			label = "apq8016-sbc:green:user1";
			function = LED_FUNCTION_HEARTBEAT;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
			default-state = "off";
		};

		led@2 {
			label = "apq8016-sbc:green:user2";
			function = LED_FUNCTION_DISK_ACTIVITY;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "mmc0";
			default-state = "off";
		};

		led@3 {
			label = "apq8016-sbc:green:user3";
			function = LED_FUNCTION_DISK_ACTIVITY;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "mmc1";
			default-state = "off";
		};

		led@4 {
			label = "apq8016-sbc:green:user4";
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "none";
			panic-indicator;
			default-state = "off";
		};

		led@5 {
			label = "apq8016-sbc:yellow:wlan";
			function = LED_FUNCTION_WLAN;
			color = <LED_COLOR_ID_YELLOW>;
			gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "phy0tx";
			default-state = "off";
		};

		led@6 {
			label = "apq8016-sbc:blue:bt";
			function = LED_FUNCTION_BLUETOOTH;
			color = <LED_COLOR_ID_BLUE>;
			gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "bluetooth-power";
			default-state = "off";
		};
	};
};

&blsp_dma {
	status = "okay";
};

&blsp_i2c2 {
	/* On Low speed expansion */
	status = "okay";
	label = "LS-I2C0";
};

&blsp_i2c4 {
	/* On High speed expansion */
	status = "okay";
	label = "HS-I2C2";

	adv_bridge: bridge@39 {
		status = "okay";

		compatible = "adi,adv7533";
		reg = <0x39>;

		interrupt-parent = <&msmgpio>;
		interrupts = <31 IRQ_TYPE_EDGE_FALLING>;

		adi,dsi-lanes = <4>;
		clocks = <&rpmcc RPM_SMD_BB_CLK2>;
		clock-names = "cec";

		pd-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>;

		avdd-supply = <&pm8916_l6>;
		v1p2-supply = <&pm8916_l6>;
		v3p3-supply = <&pm8916_l17>;

		pinctrl-names = "default","sleep";
		pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
		pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
		#sound-dai-cells = <1>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				adv7533_in: endpoint {
					remote-endpoint = <&dsi0_out>;
				};
			};

			port@1 {
				reg = <1>;
				adv7533_out: endpoint {
					remote-endpoint = <&hdmi_con>;
				};
			};
		};
	};
};

&blsp_i2c6 {
	/* On Low speed expansion */
	status = "okay";
	label = "LS-I2C1";
};

&blsp_spi3 {
	/* On High speed expansion */
	status = "okay";
	label = "HS-SPI1";
};

&blsp_spi5 {
	/* On Low speed expansion */
	status = "okay";
	label = "LS-SPI0";
};

&blsp1_uart1 {
	status = "okay";
	label = "LS-UART0";
};

&blsp1_uart2 {
	status = "okay";
	label = "LS-UART1";
};

&camss {
	status = "okay";
	ports {
		port@0 {
			reg = <0>;
			csiphy0_ep: endpoint {
				data-lanes = <0 2>;
				remote-endpoint = <&ov5640_ep>;
				status = "okay";
			};
		};
	};
};

&cci {
	status = "okay";
};

&cci_i2c0 {
	camera_rear@3b {
		compatible = "ovti,ov5640";
		reg = <0x3b>;

		enable-gpios = <&msmgpio 34 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
		pinctrl-names = "default";
		pinctrl-0 = <&camera_rear_default>;

		clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
		clock-names = "xclk";
		clock-frequency = <23880000>;

		vdddo-supply = <&camera_vdddo_1v8>;
		vdda-supply = <&camera_vdda_2v8>;
		vddd-supply = <&camera_vddd_1v5>;

		/* No camera mezzanine by default */
		status = "disabled";

		port {
			ov5640_ep: endpoint {
				data-lanes = <0 2>;
				remote-endpoint = <&csiphy0_ep>;
			};
		};
	};
};

&dsi0_out {
	data-lanes = <0 1 2 3>;
	remote-endpoint = <&adv7533_in>;
};

&lpass {
	status = "okay";
};

&mdss {
	status = "okay";
};

&mpss {
	status = "okay";

	firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/modem.mbn";
};

&pm8916_resin {
	status = "okay";
	linux,code = <KEY_VOLUMEDOWN>;
};

&pronto {
	status = "okay";

	firmware-name = "qcom/apq8016/wcnss.mbn";
};

&sdhc_1 {
	status = "okay";

	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
};

&sdhc_2 {
	status = "okay";

	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;

	cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>;
};

&sound {
	status = "okay";

	pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
	pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
	pinctrl-names = "default", "sleep";
	model = "DB410c";
	audio-routing =
		"AMIC2", "MIC BIAS Internal2",
		"AMIC3", "MIC BIAS External1";

	quaternary-dai-link {
		link-name = "ADV7533";
		cpu {
			sound-dai = <&lpass MI2S_QUATERNARY>;
		};
		codec {
			sound-dai = <&adv_bridge 0>;
		};
	};

	primary-dai-link {
		link-name = "WCD";
		cpu {
			sound-dai = <&lpass MI2S_PRIMARY>;
		};
		codec {
			sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
		};
	};

	tertiary-dai-link {
		link-name = "WCD-Capture";
		cpu {
			sound-dai = <&lpass MI2S_TERTIARY>;
		};
		codec {
			sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
		};
	};
};

&usb {
	status = "okay";
	extcon = <&usb_id>, <&usb_id>;

	pinctrl-names = "default", "device";
	pinctrl-0 = <&usb_sw_sel_pm &usb_hub_reset_pm>;
	pinctrl-1 = <&usb_sw_sel_pm_device &usb_hub_reset_pm_device>;
};

&usb_hs_phy {
	extcon = <&usb_id>;
};

&wcd_codec {
	clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
	clock-names = "mclk";
	qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
	qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
};

&wcnss_ctrl {
	firmware-name = "qcom/apq8016/WCNSS_qcom_wlan_nv_sbc.bin";
};

/* Enable CoreSight */
&cti0 { status = "okay"; };
&cti1 { status = "okay"; };
&cti12 { status = "okay"; };
&cti13 { status = "okay"; };
&cti14 { status = "okay"; };
&cti15 { status = "okay"; };
&debug0 { status = "okay"; };
&debug1 { status = "okay"; };
&debug2 { status = "okay"; };
&debug3 { status = "okay"; };
&etf { status = "okay"; };
&etm0 { status = "okay"; };
&etm1 { status = "okay"; };
&etm2 { status = "okay"; };
&etm3 { status = "okay"; };
&etr { status = "okay"; };
&funnel0 { status = "okay"; };
&funnel1 { status = "okay"; };
&replicator { status = "okay"; };
&stm { status = "okay"; };
&tpiu { status = "okay"; };

&smd_rpm_regulators {
	vdd_l1_l2_l3-supply = <&pm8916_s3>;
	vdd_l4_l5_l6-supply = <&pm8916_s4>;
	vdd_l7-supply = <&pm8916_s4>;

	s3 {
		regulator-min-microvolt = <375000>;
		regulator-max-microvolt = <1562000>;
	};

	s4 {
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;

		regulator-always-on;
		regulator-boot-on;
	};

	l1 {
		regulator-min-microvolt = <375000>;
		regulator-max-microvolt = <1525000>;
	};

	l2 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <1200000>;
	};

	l4 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l5 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l6 {
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
	};

	l7 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l8 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l9 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l10 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l11 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
		regulator-allow-set-load;
		regulator-system-load = <200000>;
	};

	l12 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l13 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l14 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	/**
	 * 1.8v required on LS expansion
	 * for mezzanine boards
	 */
	l15 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
		regulator-always-on;
	};

	l16 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};

	l17 {
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	l18 {
		regulator-min-microvolt = <1750000>;
		regulator-max-microvolt = <3337000>;
	};
};

/*
 * 2mA drive strength is not enough when connecting multiple
 * I2C devices with different pull up resistors.
 */
&i2c2_default {
	drive-strength = <16>;
};

&i2c4_default {
	drive-strength = <16>;
};

&i2c6_default {
	drive-strength = <16>;
};

/*
 * GPIO name legend: proper name = the GPIO line is used as GPIO
 *         NC = not connected (pin out but not routed from the chip to
 *              anything the board)
 *         "[PER]" = pin is muxed for [peripheral] (not GPIO)
 *         LSEC = Low Speed External Connector
 *         HSEC = High Speed External Connector
 *
 * Line names are taken from the schematic "DragonBoard410c"
 * dated monday, august 31, 2015. Page 5 in particular.
 *
 * For the lines routed to the external connectors the
 * lines are named after the 96Boards CE Specification 1.0,
 * Appendix "Expansion Connector Signal Description".
 *
 * When the 96Board naming of a line and the schematic name of
 * the same line are in conflict, the 96Board specification
 * takes precedence, which means that the external UART on the
 * LSEC is named UART0 while the schematic and SoC names this
 * UART3. This is only for the informational lines i.e. "[FOO]",
 * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
 * ones actually used for GPIO.
 */

&msmgpio {
	gpio-line-names =
		"[UART0_TX]", /* GPIO_0, LSEC pin 5 */
		"[UART0_RX]", /* GPIO_1, LSEC pin 7 */
		"[UART0_CTS_N]", /* GPIO_2, LSEC pin 3 */
		"[UART0_RTS_N]", /* GPIO_3, LSEC pin 9 */
		"[UART1_TX]", /* GPIO_4, LSEC pin 11 */
		"[UART1_RX]", /* GPIO_5, LSEC pin 13 */
		"[I2C0_SDA]", /* GPIO_8, LSEC pin 17 */
		"[I2C0_SCL]", /* GPIO_7, LSEC pin 15 */
		"[SPI1_DOUT]", /* SPI1_MOSI, HSEC pin 1 */
		"[SPI1_DIN]", /* SPI1_MISO, HSEC pin 11 */
		"[SPI1_CS]", /* SPI1_CS_N, HSEC pin 7 */
		"[SPI1_SCLK]", /* SPI1_CLK, HSEC pin 9 */
		"GPIO-B", /* LS_EXP_GPIO_B, LSEC pin 24 */
		"GPIO-C", /* LS_EXP_GPIO_C, LSEC pin 25 */
		"[I2C3_SDA]", /* HSEC pin 38 */
		"[I2C3_SCL]", /* HSEC pin 36 */
		"[SPI0_MOSI]", /* LSEC pin 14 */
		"[SPI0_MISO]", /* LSEC pin 10 */
		"[SPI0_CS_N]", /* LSEC pin 12 */
		"[SPI0_CLK]", /* LSEC pin 8 */
		"HDMI_HPD_N", /* GPIO 20 */
		"USR_LED_1_CTRL",
		"[I2C1_SDA]", /* GPIO_22, LSEC pin 21 */
		"[I2C1_SCL]", /* GPIO_23, LSEC pin 19 */
		"GPIO-G", /* LS_EXP_GPIO_G, LSEC pin 29 */
		"GPIO-H", /* LS_EXP_GPIO_H, LSEC pin 30 */
		"[CSI0_MCLK]", /* HSEC pin 15 */
		"[CSI1_MCLK]", /* HSEC pin 17 */
		"GPIO-K", /* LS_EXP_GPIO_K, LSEC pin 33 */
		"[I2C2_SDA]", /* HSEC pin 34 */
		"[I2C2_SCL]", /* HSEC pin 32 */
		"DSI2HDMI_INT_N",
		"DSI_SW_SEL_APQ",
		"GPIO-L", /* LS_EXP_GPIO_L, LSEC pin 34 */
		"GPIO-J", /* LS_EXP_GPIO_J, LSEC pin 32 */
		"GPIO-I", /* LS_EXP_GPIO_I, LSEC pin 31 */
		"GPIO-A", /* LS_EXP_GPIO_A, LSEC pin 23 */
		"FORCED_USB_BOOT",
		"SD_CARD_DET_N",
		"[WCSS_BT_SSBI]",
		"[WCSS_WLAN_DATA_2]", /* GPIO 40 */
		"[WCSS_WLAN_DATA_1]",
		"[WCSS_WLAN_DATA_0]",
		"[WCSS_WLAN_SET]",
		"[WCSS_WLAN_CLK]",
		"[WCSS_FM_SSBI]",
		"[WCSS_FM_SDI]",
		"[WCSS_BT_DAT_CTL]",
		"[WCSS_BT_DAT_STB]",
		"NC",
		"NC", /* GPIO 50 */
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC", /* GPIO 60 */
		"NC",
		"NC",
		"[CDC_PDM0_CLK]",
		"[CDC_PDM0_SYNC]",
		"[CDC_PDM0_TX0]",
		"[CDC_PDM0_RX0]",
		"[CDC_PDM0_RX1]",
		"[CDC_PDM0_RX2]",
		"GPIO-D", /* LS_EXP_GPIO_D, LSEC pin 26 */
		"NC", /* GPIO 70 */
		"NC",
		"NC",
		"NC",
		"NC", /* GPIO 74 */
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"BOOT_CONFIG_0", /* GPIO 80 */
		"BOOT_CONFIG_1",
		"BOOT_CONFIG_2",
		"BOOT_CONFIG_3",
		"NC",
		"NC",
		"BOOT_CONFIG_5",
		"NC",
		"NC",
		"NC",
		"NC", /* GPIO 90 */
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC", /* GPIO 100 */
		"NC",
		"NC",
		"NC",
		"SSBI_GPS",
		"NC",
		"NC",
		"KEY_VOLP_N",
		"NC",
		"NC",
		"[LS_EXP_MI2S_WS]", /* GPIO 110 */
		"NC",
		"NC",
		"[LS_EXP_MI2S_SCK]",
		"[LS_EXP_MI2S_DATA0]",
		"GPIO-E", /* LS_EXP_GPIO_E, LSEC pin 27 */
		"NC",
		"[DSI2HDMI_MI2S_WS]",
		"[DSI2HDMI_MI2S_SCK]",
		"[DSI2HDMI_MI2S_DATA0]",
		"USR_LED_2_CTRL", /* GPIO 120 */
		"SB_HS_ID";

	msmgpio_leds: msmgpio-leds-state {
		pins = "gpio21", "gpio120";
		function = "gpio";

		output-low;
	};

	usb_id_default: usb-id-default-state {
		pins = "gpio121";
		function = "gpio";

		drive-strength = <8>;
		input-enable;
		bias-pull-up;
	};

	adv7533_int_active: adv533-int-active-state {
		pins = "gpio31";
		function = "gpio";

		drive-strength = <16>;
		bias-disable;
	};

	adv7533_int_suspend: adv7533-int-suspend-state {
		pins = "gpio31";
		function = "gpio";

		drive-strength = <2>;
		bias-disable;
	};

	adv7533_switch_active: adv7533-switch-active-state {
		pins = "gpio32";
		function = "gpio";

		drive-strength = <16>;
		bias-disable;
	};

	adv7533_switch_suspend: adv7533-switch-suspend-state {
		pins = "gpio32";
		function = "gpio";

		drive-strength = <2>;
		bias-disable;
	};

	msm_key_volp_n_default: msm-key-volp-n-default-state {
		pins = "gpio107";
		function = "gpio";

		drive-strength = <8>;
		input-enable;
		bias-pull-up;
	};
};

&pm8916_gpios {
	gpio-line-names =
		"USR_LED_3_CTRL",
		"USR_LED_4_CTRL",
		"USB_HUB_RESET_N_PM",
		"USB_SW_SEL_PM";

	usb_hub_reset_pm: usb-hub-reset-pm-state {
		pins = "gpio3";
		function = PMIC_GPIO_FUNC_NORMAL;

		input-disable;
		output-high;
	};

	usb_hub_reset_pm_device: usb-hub-reset-pm-device-state {
		pins = "gpio3";
		function = PMIC_GPIO_FUNC_NORMAL;

		output-low;
	};

	usb_sw_sel_pm: usb-sw-sel-pm-state {
		pins = "gpio4";
		function = PMIC_GPIO_FUNC_NORMAL;

		power-source = <PM8916_GPIO_VPH>;
		input-disable;
		output-high;
	};

	usb_sw_sel_pm_device: usb-sw-sel-pm-device-state {
		pins = "gpio4";
		function = PMIC_GPIO_FUNC_NORMAL;

		power-source = <PM8916_GPIO_VPH>;
		input-disable;
		output-low;
	};

	pm8916_gpios_leds: pm8916-gpios-leds-state {
		pins = "gpio1", "gpio2";
		function = PMIC_GPIO_FUNC_NORMAL;

		output-low;
	};
};

&pm8916_mpps {
	gpio-line-names =
		"VDD_PX_BIAS",
		"WLAN_LED_CTRL",
		"BT_LED_CTRL",
		"GPIO-F"; /* LS_EXP_GPIO_F, LSEC pin 28 */

	pinctrl-names = "default";
	pinctrl-0 = <&ls_exp_gpio_f>;

	ls_exp_gpio_f: pm8916-mpp4-state {
		pins = "mpp4";
		function = "digital";

		output-low;
		power-source = <PM8916_MPP_L5>;	/* 1.8V */
	};

	pm8916_mpps_leds: pm8916-mpps-state {
		pins = "mpp2", "mpp3";
		function = "digital";

		output-low;
	};
};


code:
// SPDX-License-Identifier: BSD-3-Clause
/*
 * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
 */

/dts-v1/;

/* As the names may imply, there is quite a bunch of duplication there. */
#include "msm8994-sony-xperia-kitakami-karin.dts"

/ {
	model = "Sony Xperia Z4 Tablet (Wi-Fi)";
	compatible = "sony,karin_windy", "qcom,apq8094";
	chassis-type = "tablet";

	/*
	 * This model uses the APQ variant of MSM8994 (APQ8094).
	 * The v1/v2/v2.1 story (from kitakami.dtsi) also applies here.
	 */
	qcom,msm-id = <253 0x20000>, <253 0x20001>;
};

/delete-node/ &pm8994_l1;
/delete-node/ &pm8994_l19;


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 */

/dts-v1/;

#include "msm8996.dtsi"
#include "pm8994.dtsi"
#include "pmi8994.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include <dt-bindings/sound/qcom,wcd9335.h>

/*
 * GPIO name legend: proper name = the GPIO line is used as GPIO
 *         NC      = not connected (pin out but not routed from the chip to
 *                   anything the board)
 *         "[PER]" = pin is muxed for [peripheral] (not GPIO)
 *         LSEC    = Low Speed External Connector
 *         P HSEC  = Primary High Speed External Connector
 *         S HSEC  = Secondary High Speed External Connector
 *         J14     = Camera Connector
 *         TP      = Test Points
 *
 * Line names are taken from the schematic "DragonBoard 820c",
 * drawing no: LM25-P2751-1
 *
 * For the lines routed to the external connectors the
 * lines are named after the 96Boards CE Specification 1.0,
 * Appendix "Expansion Connector Signal Description".
 *
 * When the 96Board naming of a line and the schematic name of
 * the same line are in conflict, the 96Board specification
 * takes precedence, which means that the external UART on the
 * LSEC is named UART0 while the schematic and SoC names this
 * UART3. This is only for the informational lines i.e. "[FOO]",
 * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
 * ones actually used for GPIO.
 */

/ {
	model = "Qualcomm Technologies, Inc. DB820c";
	compatible = "arrow,apq8096-db820c", "qcom,apq8096-sbc", "qcom,apq8096";

	aliases {
		serial0 = &blsp2_uart2;
		serial1 = &blsp2_uart3;
		serial2 = &blsp1_uart2;
		i2c0 = &blsp1_i2c3;
		i2c1 = &blsp2_i2c1;
		i2c2 = &blsp2_i2c1;
		spi0 = &blsp1_spi1;
		spi1 = &blsp2_spi6;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	clocks {
		compatible = "simple-bus";
		divclk4: divclk4 {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <32768>;
			clock-output-names = "divclk4";

			pinctrl-names = "default";
			pinctrl-0 = <&divclk4_pin_a>;
		};

		div1_mclk: divclk1 {
			compatible = "gpio-gate-clock";
			pinctrl-0 = <&audio_mclk>;
			pinctrl-names = "default";
			clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
			#clock-cells = <0>;
			enable-gpios = <&pm8994_gpios 15 0>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		autorepeat;

		pinctrl-names = "default";
		pinctrl-0 = <&volume_up_gpio>;

		button {
			label = "Volume Up";
			linux,code = <KEY_VOLUMEUP>;
			gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
		};
	};

	usb2_id: usb2-id {
		compatible = "linux,extcon-usb-gpio";
		id-gpio = <&pmi8994_gpios 6 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb2_vbus_det_gpio>;
	};

	usb3_id: usb3-id {
		compatible = "linux,extcon-usb-gpio";
		id-gpio = <&pm8994_gpios 22 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&usb3_vbus_det_gpio>;
	};

	vph_pwr: vph-pwr-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vph_pwr";
		regulator-always-on;
		regulator-boot-on;

		regulator-min-microvolt = <3700000>;
		regulator-max-microvolt = <3700000>;
	};

	wlan_en: wlan-en-1-8v {
		pinctrl-names = "default";
		pinctrl-0 = <&wlan_en_gpios>;
		compatible = "regulator-fixed";
		regulator-name = "wlan-en-regulator";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;

		gpio = <&pm8994_gpios 8 0>;

		/* WLAN card specific delay */
		startup-delay-us = <70000>;
		enable-active-high;
	};
};

&blsp1_i2c3 {
	/* On Low speed expansion */
	label = "LS-I2C0";
	status = "okay";
};

&blsp1_spi1 {
	/* On Low speed expansion */
	label = "LS-SPI0";
	status = "okay";
};

&blsp1_uart2 {
	label = "BT-UART";
	status = "okay";

	bluetooth {
		compatible = "qcom,qca6174-bt";

		/* bt_disable_n gpio */
		enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;

		clocks = <&divclk4>;
	};
};

&adsp_pil {
	status = "okay";
	firmware-name = "qcom/apq8096/adsp.mbn";
};

&blsp2_i2c1 {
	/* On High speed expansion */
	label = "HS-I2C2";
	status = "okay";
};

&blsp2_i2c1 {
	/* On Low speed expansion */
	label = "LS-I2C1";
	status = "okay";
};

&blsp2_spi6 {
	/* On High speed expansion */
	label = "HS-SPI1";
	status = "okay";
};

&blsp2_uart2 {
	label = "LS-UART1";
	status = "okay";
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&blsp2_uart2_2pins_default>;
	pinctrl-1 = <&blsp2_uart2_2pins_sleep>;
};

&blsp2_uart3 {
	label = "LS-UART0";
	status = "disabled";
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&blsp2_uart3_4pins_default>;
	pinctrl-1 = <&blsp2_uart3_4pins_sleep>;
};

&camss {
	vdda-supply = <&vreg_l2a_1p25>;
};

&gpu {
	status = "okay";
};

&hdmi {
	status = "okay";

	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&hdmi_hpd_active &hdmi_ddc_active>;
	pinctrl-1 = <&hdmi_hpd_suspend &hdmi_ddc_suspend>;

	core-vdda-supply = <&vreg_l12a_1p8>;
	core-vcc-supply = <&vreg_s4a_1p8>;
};

&hdmi_phy {
	status = "okay";

	vddio-supply = <&vreg_l12a_1p8>;
	vcca-supply = <&vreg_l28a_0p925>;
	#phy-cells = <0>;
};

&hsusb_phy1 {
	status = "okay";

	vdd-supply = <&vreg_l28a_0p925>;
	vdda-pll-supply = <&vreg_l12a_1p8>;
	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
};

&hsusb_phy2 {
	status = "okay";

	vdd-supply = <&vreg_l28a_0p925>;
	vdda-pll-supply = <&vreg_l12a_1p8>;
	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
};

&mdp {
	status = "okay";
};

&mdss {
	status = "okay";
};

&mmcc {
	vdd-gfx-supply = <&vdd_gfx>;
};

&mss_pil {
	status = "okay";
	pll-supply = <&vreg_l12a_1p8>;
	firmware-name = "qcom/apq8096/mba.mbn", "qcom/apq8096/modem.mbn";
};

&pm8994_resin {
	status = "okay";
	linux,code = <KEY_VOLUMEDOWN>;
};

&tlmm {
	gpio-line-names =
		"[SPI0_DOUT]", /* GPIO_0, BLSP1_SPI_MOSI, LSEC pin 14 */
		"[SPI0_DIN]", /* GPIO_1, BLSP1_SPI_MISO, LSEC pin 10 */
		"[SPI0_CS]", /* GPIO_2, BLSP1_SPI_CS_N, LSEC pin 12 */
		"[SPI0_SCLK]", /* GPIO_3, BLSP1_SPI_CLK, LSEC pin 8 */
		"[UART1_TxD]", /* GPIO_4, BLSP8_UART_TX, LSEC pin 11 */
		"[UART1_RxD]", /* GPIO_5, BLSP8_UART_RX, LSEC pin 13 */
		"[I2C1_SDA]", /* GPIO_6, BLSP8_I2C_SDA, LSEC pin 21 */
		"[I2C1_SCL]", /* GPIO_7, BLSP8_I2C_SCL, LSEC pin 19 */
		"GPIO-H", /* GPIO_8, LCD0_RESET_N, LSEC pin 30 */
		"TP93", /* GPIO_9 */
		"GPIO-G", /* GPIO_10, MDP_VSYNC_P, LSEC pin 29 */
		"[MDP_VSYNC_S]", /* GPIO_11, S HSEC pin 55 */
		"NC", /* GPIO_12 */
		"[CSI0_MCLK]", /* GPIO_13, CAM_MCLK0, P HSEC pin 15 */
		"[CAM_MCLK1]", /* GPIO_14, J14 pin 11 */
		"[CSI1_MCLK]", /* GPIO_15, CAM_MCLK2, P HSEC pin 17 */
		"TP99", /* GPIO_16 */
		"[I2C2_SDA]", /* GPIO_17, CCI_I2C_SDA0, P HSEC pin 34 */
		"[I2C2_SCL]", /* GPIO_18, CCI_I2C_SCL0, P HSEC pin 32 */
		"[CCI_I2C_SDA1]", /* GPIO_19, S HSEC pin 38 */
		"[CCI_I2C_SCL1]", /* GPIO_20, S HSEC pin 36 */
		"FLASH_STROBE_EN", /* GPIO_21, S HSEC pin 5 */
		"FLASH_STROBE_TRIG", /* GPIO_22, S HSEC pin 1 */
		"GPIO-K", /* GPIO_23, CAM2_RST_N, LSEC pin 33 */
		"GPIO-D", /* GPIO_24, LSEC pin 26 */
		"GPIO-I", /* GPIO_25, CAM0_RST_N, LSEC pin 31 */
		"GPIO-J", /* GPIO_26, CAM0_STANDBY_N, LSEC pin 32 */
		"BLSP6_I2C_SDA", /* GPIO_27 */
		"BLSP6_I2C_SCL", /* GPIO_28 */
		"GPIO-B", /* GPIO_29, TS0_RESET_N, LSEC pin 24 */
		"GPIO30", /* GPIO_30, S HSEC pin 4 */
		"HDMI_CEC", /* GPIO_31 */
		"HDMI_DDC_CLOCK", /* GPIO_32 */
		"HDMI_DDC_DATA", /* GPIO_33 */
		"HDMI_HOT_PLUG_DETECT", /* GPIO_34 */
		"PCIE0_RST_N", /* GPIO_35 */
		"PCIE0_CLKREQ_N", /* GPIO_36 */
		"PCIE0_WAKE", /* GPIO_37 */
		"SD_CARD_DET_N", /* GPIO_38 */
		"TSIF1_SYNC", /* GPIO_39, S HSEC pin 48 */
		"W_DISABLE_N", /* GPIO_40 */
		"[BLSP9_UART_TX]", /* GPIO_41 */
		"[BLSP9_UART_RX]", /* GPIO_42 */
		"[BLSP2_UART_CTS_N]", /* GPIO_43 */
		"[BLSP2_UART_RFR_N]", /* GPIO_44 */
		"[BLSP3_UART_TX]", /* GPIO_45 */
		"[BLSP3_UART_RX]", /* GPIO_46 */
		"[I2C0_SDA]", /* GPIO_47, LS_I2C0_SDA, LSEC pin 17 */
		"[I2C0_SCL]", /* GPIO_48, LS_I2C0_SCL, LSEC pin 15 */
		"[UART0_TxD]", /* GPIO_49, BLSP9_UART_TX, LSEC pin 5 */
		"[UART0_RxD]", /* GPIO_50, BLSP9_UART_RX, LSEC pin 7 */
		"[UART0_CTS]", /* GPIO_51, BLSP9_UART_CTS_N, LSEC pin 3 */
		"[UART0_RTS]", /* GPIO_52, BLSP9_UART_RFR_N, LSEC pin 9 */
		"[CODEC_INT1_N]", /* GPIO_53 */
		"[CODEC_INT2_N]", /* GPIO_54 */
		"[BLSP7_I2C_SDA]", /* GPIO_55 */
		"[BLSP7_I2C_SCL]", /* GPIO_56 */
		"MI2S_MCLK", /* GPIO_57, S HSEC pin 3 */
		"[PCM_CLK]", /* GPIO_58, QUA_MI2S_SCK, LSEC pin 18 */
		"[PCM_FS]", /* GPIO_59, QUA_MI2S_WS, LSEC pin 16 */
		"[PCM_DO]", /* GPIO_60, QUA_MI2S_DATA0, LSEC pin 20 */
		"[PCM_DI]", /* GPIO_61, QUA_MI2S_DATA1, LSEC pin 22 */
		"GPIO-E", /* GPIO_62, LSEC pin 27 */
		"TP87", /* GPIO_63 */
		"[CODEC_RST_N]", /* GPIO_64 */
		"[PCM1_CLK]", /* GPIO_65 */
		"[PCM1_SYNC]", /* GPIO_66 */
		"[PCM1_DIN]", /* GPIO_67 */
		"[PCM1_DOUT]", /* GPIO_68 */
		"AUDIO_REF_CLK", /* GPIO_69 */
		"SLIMBUS_CLK", /* GPIO_70 */
		"SLIMBUS_DATA0", /* GPIO_71 */
		"SLIMBUS_DATA1", /* GPIO_72 */
		"NC", /* GPIO_73 */
		"NC", /* GPIO_74 */
		"NC", /* GPIO_75 */
		"NC", /* GPIO_76 */
		"TP94", /* GPIO_77 */
		"NC", /* GPIO_78 */
		"TP95", /* GPIO_79 */
		"GPIO-A", /* GPIO_80, MEMS_RESET_N, LSEC pin 23 */
		"TP88", /* GPIO_81 */
		"TP89", /* GPIO_82 */
		"TP90", /* GPIO_83 */
		"TP91", /* GPIO_84 */
		"[SD_DAT0]", /* GPIO_85, BLSP12_SPI_MOSI, P HSEC pin 1 */
		"[SD_CMD]", /* GPIO_86, BLSP12_SPI_MISO, P HSEC pin 11 */
		"[SD_DAT3]", /* GPIO_87, BLSP12_SPI_CS_N, P HSEC pin 7 */
		"[SD_SCLK]", /* GPIO_88, BLSP12_SPI_CLK, P HSEC pin 9 */
		"TSIF1_CLK", /* GPIO_89, S HSEC pin 42 */
		"TSIF1_EN", /* GPIO_90, S HSEC pin 46 */
		"TSIF1_DATA", /* GPIO_91, S HSEC pin 44 */
		"NC", /* GPIO_92 */
		"TSIF2_CLK", /* GPIO_93, S HSEC pin 52 */
		"TSIF2_EN", /* GPIO_94, S HSEC pin 56 */
		"TSIF2_DATA", /* GPIO_95, S HSEC pin 54 */
		"TSIF2_SYNC", /* GPIO_96, S HSEC pin 58 */
		"NC", /* GPIO_97 */
		"CAM1_STANDBY_N", /* GPIO_98 */
		"NC", /* GPIO_99 */
		"NC", /* GPIO_100 */
		"[LCD1_RESET_N]", /* GPIO_101, S HSEC pin 51 */
		"BOOT_CONFIG1", /* GPIO_102 */
		"USB_HUB_RESET", /* GPIO_103 */
		"CAM1_RST_N", /* GPIO_104 */
		"NC", /* GPIO_105 */
		"NC", /* GPIO_106 */
		"NC", /* GPIO_107 */
		"NC", /* GPIO_108 */
		"NC", /* GPIO_109 */
		"NC", /* GPIO_110 */
		"NC", /* GPIO_111 */
		"NC", /* GPIO_112 */
		"PMI8994_BUA", /* GPIO_113 */
		"PCIE2_RST_N", /* GPIO_114 */
		"PCIE2_CLKREQ_N", /* GPIO_115 */
		"PCIE2_WAKE", /* GPIO_116 */
		"SSC_IRQ_0", /* GPIO_117 */
		"SSC_IRQ_1", /* GPIO_118 */
		"SSC_IRQ_2", /* GPIO_119 */
		"NC", /* GPIO_120 */
		"GPIO121", /* GPIO_121, S HSEC pin 2 */
		"NC", /* GPIO_122 */
		"SSC_IRQ_6", /* GPIO_123 */
		"SSC_IRQ_7", /* GPIO_124 */
		"GPIO-C", /* GPIO_125, TS_INT0, LSEC pin 25 */
		"BOOT_CONFIG5", /* GPIO_126 */
		"NC", /* GPIO_127 */
		"NC", /* GPIO_128 */
		"BOOT_CONFIG7", /* GPIO_129 */
		"PCIE1_RST_N", /* GPIO_130 */
		"PCIE1_CLKREQ_N", /* GPIO_131 */
		"PCIE1_WAKE", /* GPIO_132 */
		"GPIO-L", /* GPIO_133, CAM2_STANDBY_N, LSEC pin 34 */
		"NC", /* GPIO_134 */
		"NC", /* GPIO_135 */
		"BOOT_CONFIG8", /* GPIO_136 */
		"NC", /* GPIO_137 */
		"NC", /* GPIO_138 */
		"GPS_SSBI2", /* GPIO_139 */
		"GPS_SSBI1", /* GPIO_140 */
		"NC", /* GPIO_141 */
		"NC", /* GPIO_142 */
		"NC", /* GPIO_143 */
		"BOOT_CONFIG6", /* GPIO_144 */
		"NC", /* GPIO_145 */
		"NC", /* GPIO_146 */
		"NC", /* GPIO_147 */
		"NC", /* GPIO_148 */
		"NC"; /* GPIO_149 */

	sdc2_cd_on: sdc2-cd-on-state {
		pins = "gpio38";
		function = "gpio";
		bias-pull-up;
		drive-strength = <16>;
	};

	sdc2_cd_off: sdc2-cd-off-state {
		pins = "gpio38";
		function = "gpio";
		bias-pull-up;
		drive-strength = <2>;
	};

	hdmi_hpd_active: hdmi-hpd-active-state {
		pins = "gpio34";
		function = "hdmi_hot";
		bias-pull-down;
		drive-strength = <16>;
	};

	hdmi_hpd_suspend: hdmi-hpd-suspend-state {
		pins = "gpio34";
		function = "hdmi_hot";
		bias-pull-down;
		drive-strength = <2>;
	};

	hdmi_ddc_active: hdmi-ddc-active-state {
		pins = "gpio32", "gpio33";
		function = "hdmi_ddc";
		drive-strength = <2>;
		bias-pull-up;
	};

	hdmi_ddc_suspend: hdmi-ddc-suspend-state {
		pins = "gpio32", "gpio33";
		function = "hdmi_ddc";
		drive-strength = <2>;
		bias-pull-down;
	};
};

&pcie0 {
	status = "okay";
	perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
	vddpe-3v3-supply = <&wlan_en>;
	vdda-supply = <&vreg_l28a_0p925>;
};

&pcie1 {
	status = "okay";
	perst-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>;
	vdda-supply = <&vreg_l28a_0p925>;
};

&pcie2 {
	status = "okay";
	perst-gpios = <&tlmm 114 GPIO_ACTIVE_LOW>;
	vdda-supply = <&vreg_l28a_0p925>;
};

&pcie_phy {
	status = "okay";

	vdda-phy-supply = <&vreg_l28a_0p925>;
	vdda-pll-supply = <&vreg_l12a_1p8>;
};

&pm8994_gpios {
	gpio-line-names =
		"NC",
		"KEY_VOLP_N",
		"NC",
		"BL1_PWM",
		"GPIO-F", /* BL0_PWM, LSEC pin 28 */
		"BL1_EN",
		"NC",
		"WLAN_EN",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"NC",
		"DIVCLK1",
		"DIVCLK2",
		"DIVCLK3",
		"DIVCLK4",
		"BT_EN",
		"PMIC_SLB",
		"PMIC_BUA",
		"USB_VBUS_DET";

	pinctrl-names = "default";
	pinctrl-0 = <&ls_exp_gpio_f &bt_en_gpios>;

	ls_exp_gpio_f: pm8994-gpio5-state {
		pinconf {
			pins = "gpio5";
			function = PMIC_GPIO_FUNC_NORMAL;
			output-low;
			power-source = <PM8994_GPIO_S4>; /* 1.8V */
		};
	};

	bt_en_gpios: bt-en-pios-state {
		pinconf {
			pins = "gpio19";
			function = PMIC_GPIO_FUNC_NORMAL;
			output-low;
			power-source = <PM8994_GPIO_S4>; /* 1.8V */
			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
			bias-pull-down;
		};
	};

	wlan_en_gpios: wlan-en-gpios-state {
		pinconf {
			pins = "gpio8";
			function = PMIC_GPIO_FUNC_NORMAL;
			output-low;
			power-source = <PM8994_GPIO_S4>; /* 1.8V */
			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
			bias-pull-down;
		};
	};

	audio_mclk: clk-div1-state {
		pinconf {
			pins = "gpio15";
			function = "func1";
			power-source = <PM8994_GPIO_S4>; /* 1.8V */
		};
	};

	volume_up_gpio: pm8996-gpio2-state {
		pinconf {
			pins = "gpio2";
			function = "normal";
			input-enable;
			drive-push-pull;
			bias-pull-up;
			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
			power-source = <PM8994_GPIO_S4>; /* 1.8V */
		};
	};

	divclk4_pin_a: divclk4-state {
		pinconf {
			pins = "gpio18";
			function = PMIC_GPIO_FUNC_FUNC2;

			bias-disable;
			power-source = <PM8994_GPIO_S4>;
		};
	};

	usb3_vbus_det_gpio: pm8996-gpio22-state {
		pinconf {
			pins = "gpio22";
			function = PMIC_GPIO_FUNC_NORMAL;
			input-enable;
			bias-pull-down;
			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
			power-source = <PM8994_GPIO_S4>; /* 1.8V */
		};
	};
};

&pm8994_mpps {
	gpio-line-names =
		"VDDPX_BIAS",
		"WIFI_LED",
		"NC",
		"BT_LED",
		"PM_MPP05",
		"PM_MPP06",
		"PM_MPP07",
		"NC";
};

&pm8994_spmi_regulators {
	qcom,saw-reg = <&saw3>;
	vdd_s11-supply = <&vph_pwr>;

	s9 {
		qcom,saw-slave;
	};
	s10 {
		qcom,saw-slave;
	};
	s11 {
		qcom,saw-leader;
		regulator-name = "VDD_APCC";
		regulator-always-on;
		regulator-min-microvolt = <980000>;
		regulator-max-microvolt = <980000>;
	};
};

&pmi8994_gpios {
	gpio-line-names =
		"NC",
		"SPKR_AMP_EN1",
		"SPKR_AMP_EN2",
		"TP61",
		"NC",
		"USB2_VBUS_DET",
		"NC",
		"NC",
		"NC",
		"NC";

	usb2_vbus_det_gpio: pmi8996-gpio6-state {
		pinconf {
			pins = "gpio6";
			function = PMIC_GPIO_FUNC_NORMAL;
			input-enable;
			bias-pull-down;
			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
			power-source = <PM8994_GPIO_S4>; /* 1.8V */
		};
	};
};

&pmi8994_lpg {
	qcom,power-source = <1>;

	pinctrl-names = "default";
	pinctrl-0 = <&pmi8994_mpp2_userled4>;

	qcom,dtest = <0 0>,
		     <0 0>,
		     <0 0>,
		     <4 1>;

	status = "okay";

	led@1 {
		reg = <1>;
		color = <LED_COLOR_ID_GREEN>;
		function = LED_FUNCTION_HEARTBEAT;
		function-enumerator = <1>;

		linux,default-trigger = "heartbeat";
		default-state = "on";
	};

	led@2 {
		reg = <2>;
		color = <LED_COLOR_ID_GREEN>;
		function = LED_FUNCTION_HEARTBEAT;
		function-enumerator = <0>;
	};

	led@3 {
		reg = <3>;
		color = <LED_COLOR_ID_GREEN>;
		function = LED_FUNCTION_HEARTBEAT;
		function-enumerator = <2>;
	};

	led@4 {
		reg = <4>;
		color = <LED_COLOR_ID_GREEN>;
		function = LED_FUNCTION_HEARTBEAT;
		function-enumerator = <3>;
	};
};

&pmi8994_mpps {
	pmi8994_mpp2_userled4: mpp2-userled4-state {
		pins = "mpp2";
		function = "sink";

		output-low;
		qcom,dtest = <4>;
	};
};

&pmi8994_spmi_regulators {
	vdd_s2-supply = <&vph_pwr>;

	vdd_gfx: s2@1700 {
		reg = <0x1700 0x100>;
		regulator-name = "VDD_GFX";
		regulator-min-microvolt = <980000>;
		regulator-max-microvolt = <980000>;
	};
};

&rpm_requests {
	regulators-0 {
		compatible = "qcom,rpm-pm8994-regulators";

		vdd_s1-supply = <&vph_pwr>;
		vdd_s2-supply = <&vph_pwr>;
		vdd_s3-supply = <&vph_pwr>;
		vdd_s4-supply = <&vph_pwr>;
		vdd_s5-supply = <&vph_pwr>;
		vdd_s6-supply = <&vph_pwr>;
		vdd_s7-supply = <&vph_pwr>;
		vdd_s8-supply = <&vph_pwr>;
		vdd_s9-supply = <&vph_pwr>;
		vdd_s10-supply = <&vph_pwr>;
		vdd_s11-supply = <&vph_pwr>;
		vdd_s12-supply = <&vph_pwr>;
		vdd_l1-supply = <&vreg_s1b_1p025>;
		vdd_l2_l26_l28-supply = <&vreg_s3a_1p3>;
		vdd_l3_l11-supply = <&vreg_s3a_1p3>;
		vdd_l4_l27_l31-supply = <&vreg_s3a_1p3>;
		vdd_l5_l7-supply = <&vreg_s5a_2p15>;
		vdd_l6_l12_l32-supply = <&vreg_s5a_2p15>;
		vdd_l8_l16_l30-supply = <&vph_pwr>;
		vdd_l9_l10_l18_l22-supply = <&vph_pwr_bbyp>;
		vdd_l13_l19_l23_l24-supply = <&vph_pwr_bbyp>;
		vdd_l14_l15-supply = <&vreg_s5a_2p15>;
		vdd_l17_l29-supply = <&vph_pwr_bbyp>;
		vdd_l20_l21-supply = <&vph_pwr_bbyp>;
		vdd_l25-supply = <&vreg_s3a_1p3>;
		vdd_lvs1_2-supply = <&vreg_s4a_1p8>;

		vreg_s3a_1p3: s3 {
			regulator-name = "vreg_s3a_1p3";
			regulator-min-microvolt = <1300000>;
			regulator-max-microvolt = <1300000>;
		};

		/**
		 * 1.8v required on LS expansion
		 * for mezzanine boards
		 */
		vreg_s4a_1p8: s4 {
			regulator-name = "vreg_s4a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-always-on;
		};
		vreg_s5a_2p15: s5 {
			regulator-name = "vreg_s5a_2p15";
			regulator-min-microvolt = <2150000>;
			regulator-max-microvolt = <2150000>;
		};
		vreg_s7a_1p0: s7 {
			regulator-name = "vreg_s7a_1p0";
			regulator-min-microvolt = <800000>;
			regulator-max-microvolt = <800000>;
		};

		vreg_l1a_1p0: l1 {
			regulator-name = "vreg_l1a_1p0";
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
		};
		vreg_l2a_1p25: l2 {
			regulator-name = "vreg_l2a_1p25";
			regulator-min-microvolt = <1250000>;
			regulator-max-microvolt = <1250000>;
		};
		vreg_l3a_0p875: l3 {
			regulator-name = "vreg_l3a_0p875";
			regulator-min-microvolt = <850000>;
			regulator-max-microvolt = <850000>;
		};
		vreg_l4a_1p225: l4 {
			regulator-name = "vreg_l4a_1p225";
			regulator-min-microvolt = <1225000>;
			regulator-max-microvolt = <1225000>;
		};
		vreg_l6a_1p2: l6 {
			regulator-name = "vreg_l6a_1p2";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
		};
		vreg_l8a_1p8: l8 {
			regulator-name = "vreg_l8a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l9a_1p8: l9 {
			regulator-name = "vreg_l9a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l10a_1p8: l10 {
			regulator-name = "vreg_l10a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l11a_1p15: l11 {
			regulator-name = "vreg_l11a_1p15";
			regulator-min-microvolt = <1150000>;
			regulator-max-microvolt = <1150000>;
		};
		vreg_l12a_1p8: l12 {
			regulator-name = "vreg_l12a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l13a_2p95: l13 {
			regulator-name = "vreg_l13a_2p95";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <2950000>;
		};
		vreg_l14a_1p8: l14 {
			regulator-name = "vreg_l14a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l15a_1p8: l15 {
			regulator-name = "vreg_l15a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l16a_2p7: l16 {
			regulator-name = "vreg_l16a_2p7";
			regulator-min-microvolt = <2700000>;
			regulator-max-microvolt = <2700000>;
		};
		vreg_l17a_2p8: l17 {
			regulator-name = "vreg_l17a_2p8";
			regulator-min-microvolt = <2500000>;
			regulator-max-microvolt = <2500000>;
		};
		vreg_l18a_2p85: l18 {
			regulator-name = "vreg_l18a_2p85";
			regulator-min-microvolt = <2700000>;
			regulator-max-microvolt = <2900000>;
		};
		vreg_l19a_2p8: l19 {
			regulator-name = "vreg_l19a_2p8";
			regulator-min-microvolt = <3000000>;
			regulator-max-microvolt = <3000000>;
		};
		vreg_l20a_2p95: l20 {
			regulator-name = "vreg_l20a_2p95";
			regulator-min-microvolt = <2950000>;
			regulator-max-microvolt = <2950000>;
			regulator-allow-set-load;
		};
		vreg_l21a_2p95: l21 {
			regulator-name = "vreg_l21a_2p95";
			regulator-min-microvolt = <2950000>;
			regulator-max-microvolt = <2950000>;
			regulator-allow-set-load;
			regulator-system-load = <200000>;
		};
		vreg_l22a_3p0: l22 {
			regulator-name = "vreg_l22a_3p0";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
		};
		vreg_l23a_2p8: l23 {
			regulator-name = "vreg_l23a_2p8";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};
		vreg_l24a_3p075: l24 {
			regulator-name = "vreg_l24a_3p075";
			regulator-min-microvolt = <3075000>;
			regulator-max-microvolt = <3075000>;
		};
		vreg_l25a_1p2: l25 {
			regulator-name = "vreg_l25a_1p2";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-allow-set-load;
		};
		vreg_l26a_0p8: l27 {
			regulator-name = "vreg_l26a_0p8";
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
		};
		vreg_l28a_0p925: l28 {
			regulator-name = "vreg_l28a_0p925";
			regulator-min-microvolt = <925000>;
			regulator-max-microvolt = <925000>;
			regulator-allow-set-load;
		};
		vreg_l29a_2p8: l29 {
			regulator-name = "vreg_l29a_2p8";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};
		vreg_l30a_1p8: l30 {
			regulator-name = "vreg_l30a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l32a_1p8: l32 {
			regulator-name = "vreg_l32a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		vreg_lvs1a_1p8: lvs1 {
			regulator-name = "vreg_lvs1a_1p8";
		};

		vreg_lvs2a_1p8: lvs2 {
			regulator-name = "vreg_lvs2a_1p8";
		};
	};

	regulators-1 {
		compatible = "qcom,rpm-pmi8994-regulators";

		vdd_s1-supply = <&vph_pwr>;
		vdd_s2-supply = <&vph_pwr>;
		vdd_s3-supply = <&vph_pwr>;
		vdd_bst_byp-supply = <&vph_pwr>;

		vph_pwr_bbyp: boost-bypass {
			regulator-name = "vph_pwr_bbyp";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
		};

		vreg_s1b_1p025: s1 {
			regulator-name = "vreg_s1b_1p025";
			regulator-min-microvolt = <1025000>;
			regulator-max-microvolt = <1025000>;
		};
	};
};

&sdhc2 {
	/* External SD card */
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&sdc2_state_on &sdc2_cd_on>;
	pinctrl-1 = <&sdc2_state_off &sdc2_cd_off>;
	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
	vmmc-supply = <&vreg_l21a_2p95>;
	vqmmc-supply = <&vreg_l13a_2p95>;
	status = "okay";
};

&q6asmdai {
	dai@0 {
		reg = <0>;
	};

	dai@1 {
		reg = <1>;
	};

	dai@2 {
		reg = <2>;
	};
};

&sound {
	compatible = "qcom,apq8096-sndcard";
	model = "DB820c";
	audio-routing = "RX_BIAS", "MCLK",
		"MM_DL1",  "MultiMedia1 Playback",
		"MM_DL2",  "MultiMedia2 Playback",
		"MultiMedia3 Capture", "MM_UL3";

	mm1-dai-link {
		link-name = "MultiMedia1";
		cpu {
			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
		};
	};

	mm2-dai-link {
		link-name = "MultiMedia2";
		cpu {
			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
		};
	};

	mm3-dai-link {
		link-name = "MultiMedia3";
		cpu {
			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
		};
	};

	hdmi-dai-link {
		link-name = "HDMI";
		cpu {
			sound-dai = <&q6afedai HDMI_RX>;
		};

		platform {
			sound-dai = <&q6routing>;
		};

		codec {
			sound-dai = <&hdmi 0>;
		};
	};

	slim-dai-link {
		link-name = "SLIM Playback";
		cpu {
			sound-dai = <&q6afedai SLIMBUS_6_RX>;
		};

		platform {
			sound-dai = <&q6routing>;
	};

		codec {
			sound-dai = <&wcd9335 AIF4_PB>;
		};
	};

	slimcap-dai-link {
		link-name = "SLIM Capture";
		cpu {
			sound-dai = <&q6afedai SLIMBUS_0_TX>;
		};

		platform {
			sound-dai = <&q6routing>;
		};

		codec {
			sound-dai = <&wcd9335 AIF1_CAP>;
		};
	};
};

&ufsphy {
	status = "okay";

	vdda-phy-supply = <&vreg_l28a_0p925>;
	vdda-pll-supply = <&vreg_l12a_1p8>;
	vddp-ref-clk-supply = <&vreg_l25a_1p2>;
};

&ufshc {
	status = "okay";

	vcc-supply = <&vreg_l20a_2p95>;
	vccq-supply = <&vreg_l25a_1p2>;
	vccq2-supply = <&vreg_s4a_1p8>;

	vcc-max-microamp = <600000>;
	vccq-max-microamp = <450000>;
	vccq2-max-microamp = <450000>;
};

&usb2 {
	status = "okay";
	extcon = <&usb2_id>;
};

&usb2_dwc3 {
	extcon = <&usb2_id>;
	dr_mode = "otg";
	maximum-speed = "high-speed";
};

&usb3 {
	status = "okay";
	extcon = <&usb3_id>;
};

&usb3_dwc3 {
	extcon = <&usb3_id>;
	dr_mode = "otg";
};

&usb3phy {
	status = "okay";

	vdda-phy-supply = <&vreg_l28a_0p925>;
	vdda-pll-supply = <&vreg_l12a_1p8>;

};

&venus {
	status = "okay";
};

&wcd9335 {
	clock-names = "mclk", "slimbus";
	clocks = <&div1_mclk>,
		 <&rpmcc RPM_SMD_BB_CLK1>;

	vdd-buck-supply = <&vreg_s4a_1p8>;
	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
	vdd-tx-supply = <&vreg_s4a_1p8>;
	vdd-rx-supply = <&vreg_s4a_1p8>;
	vdd-io-supply = <&vreg_s4a_1p8>;
};


code:
// SPDX-License-Identifier: BSD-3-Clause

/dts-v1/;

#include "msm8996.dtsi"
#include "pm8994.dtsi"
#include "pmi8994.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>

/ {
	model = "Inforce 6640 Single Board Computer";
	compatible = "inforce,ifc6640", "qcom,apq8096-sbc", "qcom,apq8096";

	qcom,msm-id = <291 0x00030001>;
	qcom,board-id = <0x00010018 0>;

	aliases {
		serial0 = &blsp2_uart2;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	v1p05: v1p05-regulator {
		compatible = "regulator-fixed";
		reglator-name = "v1p05";
		regulator-always-on;
		regulator-boot-on;

		regulator-min-microvolt = <1050000>;
		regulator-max-microvolt = <1050000>;

		vin-supply = <&v5p0>;
	};

	v12_poe: v12-poe-regulator {
		compatible = "regulator-fixed";
		reglator-name = "v12_poe";
		regulator-always-on;
		regulator-boot-on;

		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
	};

	v3p3: v3p3-regulator {
		compatible = "regulator-fixed";
		regulator-name = "v3p3";
		regulator-always-on;
		regulator-boot-on;

		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;

		vin-supply = <&v12_poe>;
	};

	v5p0: v5p0-regulator {
		compatible = "regulator-fixed";
		regulator-name = "v5p0";
		regulator-always-on;
		regulator-boot-on;

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;

		vin-supply = <&v12_poe>;
	};

	vph_pwr: vph-pwr-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vph_pwr";
		regulator-always-on;
		regulator-boot-on;

		regulator-min-microvolt = <3800000>;
		regulator-max-microvolt = <3800000>;
	};
};

&blsp2_uart2 {
	status = "okay";
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&blsp2_uart2_2pins_default>;
	pinctrl-1 = <&blsp2_uart2_2pins_sleep>;
};

&gpu {
	status = "okay";
};

&hdmi {
	status = "okay";
};

&hdmi_phy {
	status = "okay";
};

&mdss {
	status = "okay";
};

&sdc2_state_on {
	cd-pins {
		pins = "gpio38";
		function = "gpio";

		bias-pull-up;
		drive-strength = <16>;
	};
};

&sdc2_state_off {
	cd-pins {
		pins = "gpio38";
		function = "gpio";
		bias-pull-up;
		drive-strength = <2>;
	};
};

&rpm_requests {
	regulators-0 {
		compatible = "qcom,rpm-pm8994-regulators";

		vdd_s1-supply = <&vph_pwr>;
		vdd_s2-supply = <&vph_pwr>;
		vdd_s3-supply = <&vph_pwr>;
		vdd_s4-supply = <&vph_pwr>;
		vdd_s5-supply = <&vph_pwr>;
		vdd_s6-supply = <&vph_pwr>;
		vdd_s7-supply = <&vph_pwr>;
		vdd_s8-supply = <&vph_pwr>;
		vdd_s9-supply = <&vph_pwr>;
		vdd_s10-supply = <&vph_pwr>;
		vdd_s11-supply = <&vph_pwr>;
		vdd_s12-supply = <&vph_pwr>;
		vdd_l2_l26_l28-supply = <&vreg_s3a_1p3>;
		vdd_l3_l11-supply = <&vreg_s3a_1p3>;
		vdd_l4_l27_l31-supply = <&vreg_s3a_1p3>;
		vdd_l5_l7-supply = <&vreg_s5a_2p15>;
		vdd_l6_l12_l32-supply = <&vreg_s5a_2p15>;
		vdd_l8_l16_l30-supply = <&vph_pwr>;
		vdd_l25-supply = <&vreg_s3a_1p3>;
		vdd_lvs1_2-supply = <&vreg_s4a_1p8>;

		vreg_s3a_1p3: s3 {
			regulator-name = "vreg_s3a_1p3";
			regulator-min-microvolt = <1300000>;
			regulator-max-microvolt = <1300000>;
		};

		vreg_s4a_1p8: s4 {
			regulator-name = "vreg_s4a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
			regulator-always-on;
		};
		vreg_s5a_2p15: s5 {
			regulator-name = "vreg_s5a_2p15";
			regulator-min-microvolt = <2150000>;
			regulator-max-microvolt = <2150000>;
		};
		vreg_s7a_1p0: s7 {
			regulator-name = "vreg_s7a_1p0";
			regulator-min-microvolt = <800000>;
			regulator-max-microvolt = <800000>;
		};

		vreg_l1a_1p0: l1 {
			regulator-name = "vreg_l1a_1p0";
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
		};
		vreg_l2a_1p25: l2 {
			regulator-name = "vreg_l2a_1p25";
			regulator-min-microvolt = <1250000>;
			regulator-max-microvolt = <1250000>;
		};
		vreg_l3a_0p875: l3 {
			regulator-name = "vreg_l3a_0p875";
			regulator-min-microvolt = <850000>;
			regulator-max-microvolt = <850000>;
		};
		vreg_l4a_1p225: l4 {
			regulator-name = "vreg_l4a_1p225";
			regulator-min-microvolt = <1225000>;
			regulator-max-microvolt = <1225000>;
		};
		vreg_l6a_1p2: l6 {
			regulator-name = "vreg_l6a_1p2";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
		};
		vreg_l8a_1p8: l8 {
			regulator-name = "vreg_l8a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l9a_1p8: l9 {
			regulator-name = "vreg_l9a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l10a_1p8: l10 {
			regulator-name = "vreg_l10a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l11a_1p15: l11 {
			regulator-name = "vreg_l11a_1p15";
			regulator-min-microvolt = <1150000>;
			regulator-max-microvolt = <1150000>;
		};
		vreg_l12a_1p8: l12 {
			regulator-name = "vreg_l12a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l13a_2p95: l13 {
			regulator-name = "vreg_l13a_2p95";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <2950000>;
		};
		vreg_l14a_1p8: l14 {
			regulator-name = "vreg_l14a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l15a_1p8: l15 {
			regulator-name = "vreg_l15a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l16a_2p7: l16 {
			regulator-name = "vreg_l16a_2p7";
			regulator-min-microvolt = <2700000>;
			regulator-max-microvolt = <2700000>;
		};
		vreg_l17a_2p8: l17 {
			regulator-name = "vreg_l17a_2p8";
			regulator-min-microvolt = <2500000>;
			regulator-max-microvolt = <2500000>;
		};
		vreg_l18a_2p85: l18 {
			regulator-name = "vreg_l18a_2p85";
			regulator-min-microvolt = <2700000>;
			regulator-max-microvolt = <2900000>;
		};
		vreg_l19a_2p8: l19 {
			regulator-name = "vreg_l19a_2p8";
			regulator-min-microvolt = <3000000>;
			regulator-max-microvolt = <3000000>;
		};
		vreg_l20a_2p95: l20 {
			regulator-name = "vreg_l20a_2p95";
			regulator-min-microvolt = <2950000>;
			regulator-max-microvolt = <2950000>;
			regulator-allow-set-load;
		};
		vreg_l21a_2p95: l21 {
			regulator-name = "vreg_l21a_2p95";
			regulator-min-microvolt = <2950000>;
			regulator-max-microvolt = <2950000>;
		};
		vreg_l22a_3p0: l22 {
			regulator-name = "vreg_l22a_3p0";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
		};
		vreg_l23a_2p8: l23 {
			regulator-name = "vreg_l23a_2p8";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};
		vreg_l24a_3p075: l24 {
			regulator-name = "vreg_l24a_3p075";
			regulator-min-microvolt = <3075000>;
			regulator-max-microvolt = <3075000>;
		};
		vreg_l25a_1p2: l25 {
			regulator-name = "vreg_l25a_1p2";
			regulator-min-microvolt = <1200000>;
			regulator-max-microvolt = <1200000>;
			regulator-allow-set-load;
		};
		vreg_l26a_0p8: l27 {
			regulator-name = "vreg_l26a_0p8";
			regulator-min-microvolt = <1000000>;
			regulator-max-microvolt = <1000000>;
		};
		vreg_l28a_0p925: l28 {
			regulator-name = "vreg_l28a_0p925";
			regulator-min-microvolt = <925000>;
			regulator-max-microvolt = <925000>;
			regulator-allow-set-load;
		};
		vreg_l29a_2p8: l29 {
			regulator-name = "vreg_l29a_2p8";
			regulator-min-microvolt = <2800000>;
			regulator-max-microvolt = <2800000>;
		};
		vreg_l30a_1p8: l30 {
			regulator-name = "vreg_l30a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};
		vreg_l32a_1p8: l32 {
			regulator-name = "vreg_l32a_1p8";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		vreg_lvs1a_1p8: lvs1 {
			regulator-name = "vreg_lvs1a_1p8";
		};

		vreg_lvs2a_1p8: lvs2 {
			regulator-name = "vreg_lvs2a_1p8";
		};
	};
};

&sdhc2 {
	status = "okay";

	bus-width = <4>;

	cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;

	vmmc-supply = <&vreg_l21a_2p95>;
	vqmmc-supply = <&vreg_l13a_2p95>;
};

&ufshc {
	status = "okay";

	vcc-supply = <&vreg_l20a_2p95>;
	vccq-supply = <&vreg_l25a_1p2>;
	vccq2-supply = <&vreg_s4a_1p8>;

	vcc-max-microamp = <600000>;
	vccq-max-microamp = <450000>;
	vccq2-max-microamp = <450000>;
};

&ufsphy {
	status = "okay";

	vdda-phy-supply = <&vreg_l28a_0p925>;
	vdda-pll-supply = <&vreg_l12a_1p8>;
};

&venus {
	status = "okay";
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
 * IPQ6018 CP01 board device tree source
 *
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 */

/dts-v1/;

#include "ipq6018.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. IPQ6018/AP-CP01-C1";
	compatible = "qcom,ipq6018-cp01", "qcom,ipq6018";

	aliases {
		serial0 = &blsp1_uart3;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};
};

&blsp1_uart3 {
	pinctrl-0 = <&serial_3_pins>;
	pinctrl-names = "default";
	status = "okay";
};

&blsp1_i2c3 {
	pinctrl-0 = <&i2c_1_pins>;
	pinctrl-names = "default";
	status = "okay";
};

&blsp1_spi1 {
	cs-select = <0>;
	pinctrl-0 = <&spi_0_pins>;
	pinctrl-names = "default";
	status = "okay";

	flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0>;
		compatible = "micron,n25q128a11", "jedec,spi-nor";
		spi-max-frequency = <50000000>;
	};
};

&tlmm {
	i2c_1_pins: i2c-1-state {
		pins = "gpio42", "gpio43";
		function = "blsp2_i2c";
		drive-strength = <8>;
	};

	spi_0_pins: spi-0-state {
		pins = "gpio38", "gpio39", "gpio40", "gpio41";
		function = "blsp0_spi";
		drive-strength = <8>;
		bias-pull-down;
	};
};

&qpic_bam {
	status = "okay";
};

&qpic_nand {
	status = "okay";

	nand@0 {
		reg = <0>;

		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;
		nand-bus-width = <8>;
	};
};

&qusb_phy_1 {
	status = "okay";
};

&usb2 {
	status = "okay";
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
 * IPQ6018 SoC device tree source
 *
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 */

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-ipq6018.h>
#include <dt-bindings/reset/qcom,gcc-ipq6018.h>
#include <dt-bindings/clock/qcom,apss-ipq.h>

/ {
	#address-cells = <2>;
	#size-cells = <2>;
	interrupt-parent = <&intc>;

	clocks {
		sleep_clk: sleep-clk {
			compatible = "fixed-clock";
			clock-frequency = <32000>;
			#clock-cells = <0>;
		};

		xo: xo {
			compatible = "fixed-clock";
			clock-frequency = <24000000>;
			#clock-cells = <0>;
		};
	};

	cpus: cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		CPU0: cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x0>;
			enable-method = "psci";
			next-level-cache = <&L2_0>;
			clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
			clock-names = "cpu";
			operating-points-v2 = <&cpu_opp_table>;
			cpu-supply = <&ipq6018_s2>;
		};

		CPU1: cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "psci";
			reg = <0x1>;
			next-level-cache = <&L2_0>;
			clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
			clock-names = "cpu";
			operating-points-v2 = <&cpu_opp_table>;
			cpu-supply = <&ipq6018_s2>;
		};

		CPU2: cpu@2 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "psci";
			reg = <0x2>;
			next-level-cache = <&L2_0>;
			clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
			clock-names = "cpu";
			operating-points-v2 = <&cpu_opp_table>;
			cpu-supply = <&ipq6018_s2>;
		};

		CPU3: cpu@3 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "psci";
			reg = <0x3>;
			next-level-cache = <&L2_0>;
			clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
			clock-names = "cpu";
			operating-points-v2 = <&cpu_opp_table>;
			cpu-supply = <&ipq6018_s2>;
		};

		L2_0: l2-cache {
			compatible = "cache";
			cache-level = <0x2>;
		};
	};

	cpu_opp_table: opp-table-cpu {
		compatible = "operating-points-v2";
		opp-shared;

		opp-864000000 {
			opp-hz = /bits/ 64 <864000000>;
			opp-microvolt = <725000>;
			clock-latency-ns = <200000>;
		};
		opp-1056000000 {
			opp-hz = /bits/ 64 <1056000000>;
			opp-microvolt = <787500>;
			clock-latency-ns = <200000>;
		};
		opp-1320000000 {
			opp-hz = /bits/ 64 <1320000000>;
			opp-microvolt = <862500>;
			clock-latency-ns = <200000>;
		};
		opp-1440000000 {
			opp-hz = /bits/ 64 <1440000000>;
			opp-microvolt = <925000>;
			clock-latency-ns = <200000>;
		};
		opp-1608000000 {
			opp-hz = /bits/ 64 <1608000000>;
			opp-microvolt = <987500>;
			clock-latency-ns = <200000>;
		};
		opp-1800000000 {
			opp-hz = /bits/ 64 <1800000000>;
			opp-microvolt = <1062500>;
			clock-latency-ns = <200000>;
		};
	};

	firmware {
		scm {
			compatible = "qcom,scm-ipq6018", "qcom,scm";
		};
	};

	pmuv8: pmu {
		compatible = "arm,cortex-a53-pmu";
		interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
					 IRQ_TYPE_LEVEL_HIGH)>;
	};

	psci: psci {
		compatible = "arm,psci-1.0";
		method = "smc";
	};

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		rpm_msg_ram: memory@60000 {
			reg = <0x0 0x60000 0x0 0x6000>;
			no-map;
		};

		tz: memory@4a600000 {
			reg = <0x0 0x4a600000 0x0 0x00400000>;
			no-map;
		};

		smem_region: memory@4aa00000 {
			reg = <0x0 0x4aa00000 0x0 0x00100000>;
			no-map;
		};

		q6_region: memory@4ab00000 {
			reg = <0x0 0x4ab00000 0x0 0x05500000>;
			no-map;
		};
	};

	smem {
		compatible = "qcom,smem";
		memory-region = <&smem_region>;
		hwlocks = <&tcsr_mutex 0>;
	};

	soc: soc {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges = <0 0 0 0 0x0 0xffffffff>;
		dma-ranges;
		compatible = "simple-bus";

		prng: qrng@e1000 {
			compatible = "qcom,prng-ee";
			reg = <0x0 0xe3000 0x0 0x1000>;
			clocks = <&gcc GCC_PRNG_AHB_CLK>;
			clock-names = "core";
		};

		cryptobam: dma-controller@704000 {
			compatible = "qcom,bam-v1.7.0";
			reg = <0x0 0x00704000 0x0 0x20000>;
			interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc GCC_CRYPTO_AHB_CLK>;
			clock-names = "bam_clk";
			#dma-cells = <1>;
			qcom,ee = <1>;
			qcom,controlled-remotely;
		};

		crypto: crypto@73a000 {
			compatible = "qcom,crypto-v5.1";
			reg = <0x0 0x0073a000 0x0 0x6000>;
			clocks = <&gcc GCC_CRYPTO_AHB_CLK>,
				<&gcc GCC_CRYPTO_AXI_CLK>,
				<&gcc GCC_CRYPTO_CLK>;
			clock-names = "iface", "bus", "core";
			dmas = <&cryptobam 2>, <&cryptobam 3>;
			dma-names = "rx", "tx";
		};

		tlmm: pinctrl@1000000 {
			compatible = "qcom,ipq6018-pinctrl";
			reg = <0x0 0x01000000 0x0 0x300000>;
			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
			gpio-controller;
			#gpio-cells = <2>;
			gpio-ranges = <&tlmm 0 0 80>;
			interrupt-controller;
			#interrupt-cells = <2>;

			serial_3_pins: serial3-state {
				pins = "gpio44", "gpio45";
				function = "blsp2_uart";
				drive-strength = <8>;
				bias-pull-down;
			};

			qpic_pins: qpic-state {
				pins = "gpio1", "gpio3", "gpio4",
					"gpio5", "gpio6", "gpio7",
					"gpio8", "gpio10", "gpio11",
					"gpio12", "gpio13", "gpio14",
					"gpio15", "gpio17";
				function = "qpic_pad";
				drive-strength = <8>;
				bias-disable;
			};
		};

		gcc: gcc@1800000 {
			compatible = "qcom,gcc-ipq6018";
			reg = <0x0 0x01800000 0x0 0x80000>;
			clocks = <&xo>, <&sleep_clk>;
			clock-names = "xo", "sleep_clk";
			#clock-cells = <1>;
			#reset-cells = <1>;
		};

		tcsr_mutex: hwlock@1905000 {
			compatible = "qcom,ipq6018-tcsr-mutex", "qcom,tcsr-mutex";
			reg = <0x0 0x01905000 0x0 0x1000>;
			#hwlock-cells = <1>;
		};

		tcsr: syscon@1937000 {
			compatible = "qcom,tcsr-ipq6018", "syscon";
			reg = <0x0 0x01937000 0x0 0x21000>;
		};

		blsp_dma: dma-controller@7884000 {
			compatible = "qcom,bam-v1.7.0";
			reg = <0x0 0x07884000 0x0 0x2b000>;
			interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc GCC_BLSP1_AHB_CLK>;
			clock-names = "bam_clk";
			#dma-cells = <1>;
			qcom,ee = <0>;
		};

		blsp1_uart3: serial@78b1000 {
			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
			reg = <0x0 0x078b1000 0x0 0x200>;
			interrupts = <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc GCC_BLSP1_UART3_APPS_CLK>,
				<&gcc GCC_BLSP1_AHB_CLK>;
			clock-names = "core", "iface";
			status = "disabled";
		};

		blsp1_spi1: spi@78b5000 {
			compatible = "qcom,spi-qup-v2.2.1";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x0 0x078b5000 0x0 0x600>;
			interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
			spi-max-frequency = <50000000>;
			clocks = <&gcc GCC_BLSP1_QUP1_SPI_APPS_CLK>,
				<&gcc GCC_BLSP1_AHB_CLK>;
			clock-names = "core", "iface";
			dmas = <&blsp_dma 12>, <&blsp_dma 13>;
			dma-names = "tx", "rx";
			status = "disabled";
		};

		blsp1_spi2: spi@78b6000 {
			compatible = "qcom,spi-qup-v2.2.1";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x0 0x078b6000 0x0 0x600>;
			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
			spi-max-frequency = <50000000>;
			clocks = <&gcc GCC_BLSP1_QUP2_SPI_APPS_CLK>,
				<&gcc GCC_BLSP1_AHB_CLK>;
			clock-names = "core", "iface";
			dmas = <&blsp_dma 14>, <&blsp_dma 15>;
			dma-names = "tx", "rx";
			status = "disabled";
		};

		blsp1_i2c2: i2c@78b6000 {
			compatible = "qcom,i2c-qup-v2.2.1";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x0 0x078b6000 0x0 0x600>;
			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>,
				 <&gcc GCC_BLSP1_AHB_CLK>;
			clock-names = "core", "iface";
			clock-frequency = <400000>;
			dmas = <&blsp_dma 14>, <&blsp_dma 15>;
			dma-names = "tx", "rx";
			status = "disabled";
		};

		blsp1_i2c3: i2c@78b7000 {
			compatible = "qcom,i2c-qup-v2.2.1";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0x0 0x078b7000 0x0 0x600>;
			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc GCC_BLSP1_QUP3_I2C_APPS_CLK>,
				 <&gcc GCC_BLSP1_AHB_CLK>;
			clock-names = "core", "iface";
			clock-frequency = <400000>;
			dmas = <&blsp_dma 16>, <&blsp_dma 17>;
			dma-names = "tx", "rx";
			status = "disabled";
		};

		qpic_bam: dma-controller@7984000 {
			compatible = "qcom,bam-v1.7.0";
			reg = <0x0 0x07984000 0x0 0x1a000>;
			interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&gcc GCC_QPIC_AHB_CLK>;
			clock-names = "bam_clk";
			#dma-cells = <1>;
			qcom,ee = <0>;
			status = "disabled";
		};

		qpic_nand: nand-controller@79b0000 {
			compatible = "qcom,ipq6018-nand";
			reg = <0x0 0x079b0000 0x0 0x10000>;
			#address-cells = <1>;
			#size-cells = <0>;
			clocks = <&gcc GCC_QPIC_CLK>,
				 <&gcc GCC_QPIC_AHB_CLK>;
			clock-names = "core", "aon";

			dmas = <&qpic_bam 0>,
				<&qpic_bam 1>,
				<&qpic_bam 2>;
			dma-names = "tx", "rx", "cmd";
			pinctrl-0 = <&qpic_pins>;
			pinctrl-names = "default";
			status = "disabled";
		};

		intc: interrupt-controller@b000000 {
			compatible = "qcom,msm-qgic2";
			#address-cells = <2>;
			#size-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <0x3>;
			reg =   <0x0 0x0b000000 0x0 0x1000>,  /*GICD*/
				<0x0 0x0b002000 0x0 0x1000>,  /*GICC*/
				<0x0 0x0b001000 0x0 0x1000>,  /*GICH*/
				<0x0 0x0b004000 0x0 0x1000>;  /*GICV*/
			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
			ranges = <0 0 0 0xb00a000 0 0xffd>;

			v2m@0 {
				compatible = "arm,gic-v2m-frame";
				msi-controller;
				reg = <0x0 0x0 0x0 0xffd>;
			};
		};

		pcie_phy: phy@84000 {
			compatible = "qcom,ipq6018-qmp-pcie-phy";
			reg = <0x0 0x84000 0x0 0x1bc>; /* Serdes PLL */
			status = "disabled";
			#address-cells = <2>;
			#size-cells = <2>;
			ranges;

			clocks = <&gcc GCC_PCIE0_AUX_CLK>,
				<&gcc GCC_PCIE0_AHB_CLK>;
			clock-names = "aux", "cfg_ahb";

			resets = <&gcc GCC_PCIE0_PHY_BCR>,
				<&gcc GCC_PCIE0PHY_PHY_BCR>;
			reset-names = "phy",
				      "common";

			pcie_phy0: phy@84200 {
				reg = <0x0 0x84200 0x0 0x16c>, /* Serdes Tx */
				      <0x0 0x84400 0x0 0x200>, /* Serdes Rx */
				      <0x0 0x84800 0x0 0x1f0>, /* PCS: Lane0, COM, PCIE */
				      <0x0 0x84c00 0x0 0xf4>; /* pcs_misc */
				#phy-cells = <0>;

				clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
				clock-names = "pipe0";
				clock-output-names = "gcc_pcie0_pipe_clk_src";
				#clock-cells = <0>;
			};
		};

		pcie0: pci@20000000 {
			compatible = "qcom,pcie-ipq6018";
			reg = <0x0 0x20000000 0x0 0xf1d>,
			      <0x0 0x20000f20 0x0 0xa8>,
			      <0x0 0x20001000 0x0 0x1000>,
			      <0x0 0x80000 0x0 0x4000>,
			      <0x0 0x20100000 0x0 0x1000>;
			reg-names = "dbi", "elbi", "atu", "parf", "config";

			device_type = "pci";
			linux,pci-domain = <0>;
			bus-range = <0x00 0xff>;
			num-lanes = <1>;
			max-link-speed = <3>;
			#address-cells = <3>;
			#size-cells = <2>;

			phys = <&pcie_phy0>;
			phy-names = "pciephy";

			ranges = <0x81000000 0 0x20200000 0 0x20200000
				  0 0x10000>, /* downstream I/O */
				 <0x82000000 0 0x20220000 0 0x20220000
				  0 0xfde0000>; /* non-prefetchable memory */

			interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
			interrupt-names = "msi";

			#interrupt-cells = <1>;
			interrupt-map-mask = <0 0 0 0x7>;
			interrupt-map = <0 0 0 1 &intc 0 75
					 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
					<0 0 0 2 &intc 0 78
					 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
					<0 0 0 3 &intc 0 79
					 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
					<0 0 0 4 &intc 0 83
					 IRQ_TYPE_LEVEL_HIGH>; /* int_d */

			clocks = <&gcc GCC_SYS_NOC_PCIE0_AXI_CLK>,
				 <&gcc GCC_PCIE0_AXI_M_CLK>,
				 <&gcc GCC_PCIE0_AXI_S_CLK>,
				 <&gcc GCC_PCIE0_AXI_S_BRIDGE_CLK>,
				 <&gcc PCIE0_RCHNG_CLK>;
			clock-names = "iface",
				      "axi_m",
				      "axi_s",
				      "axi_bridge",
				      "rchng";

			resets = <&gcc GCC_PCIE0_PIPE_ARES>,
				 <&gcc GCC_PCIE0_SLEEP_ARES>,
				 <&gcc GCC_PCIE0_CORE_STICKY_ARES>,
				 <&gcc GCC_PCIE0_AXI_MASTER_ARES>,
				 <&gcc GCC_PCIE0_AXI_SLAVE_ARES>,
				 <&gcc GCC_PCIE0_AHB_ARES>,
				 <&gcc GCC_PCIE0_AXI_MASTER_STICKY_ARES>,
				 <&gcc GCC_PCIE0_AXI_SLAVE_STICKY_ARES>;
			reset-names = "pipe",
				      "sleep",
				      "sticky",
				      "axi_m",
				      "axi_s",
				      "ahb",
				      "axi_m_sticky",
				      "axi_s_sticky";

			status = "disabled";
		};

		watchdog@b017000 {
			compatible = "qcom,kpss-wdt";
			interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
			reg = <0x0 0x0b017000 0x0 0x40>;
			clocks = <&sleep_clk>;
			timeout-sec = <10>;
		};

		apcs_glb: mailbox@b111000 {
			compatible = "qcom,ipq6018-apcs-apps-global";
			reg = <0x0 0x0b111000 0x0 0x1000>;
			#clock-cells = <1>;
			clocks = <&a53pll>, <&xo>;
			clock-names = "pll", "xo";
			#mbox-cells = <1>;
		};

		a53pll: clock@b116000 {
			compatible = "qcom,ipq6018-a53pll";
			reg = <0x0 0x0b116000 0x0 0x40>;
			#clock-cells = <0>;
			clocks = <&xo>;
			clock-names = "xo";
		};

		timer@b120000 {
			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <0 0 0 0x10000000>;
			compatible = "arm,armv7-timer-mem";
			reg = <0x0 0x0b120000 0x0 0x1000>;

			frame@b120000 {
				frame-number = <0>;
				interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
					     <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
				reg = <0x0b121000 0x1000>,
				      <0x0b122000 0x1000>;
			};

			frame@b123000 {
				frame-number = <1>;
				interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
				reg = <0x0b123000 0x1000>;
				status = "disabled";
			};

			frame@b124000 {
				frame-number = <2>;
				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
				reg = <0x0b124000 0x1000>;
				status = "disabled";
			};

			frame@b125000 {
				frame-number = <3>;
				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
				reg = <0x0b125000 0x1000>;
				status = "disabled";
			};

			frame@b126000 {
				frame-number = <4>;
				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
				reg = <0x0b126000 0x1000>;
				status = "disabled";
			};

			frame@b127000 {
				frame-number = <5>;
				interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
				reg = <0x0b127000 0x1000>;
				status = "disabled";
			};

			frame@b128000 {
				frame-number = <6>;
				interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
				reg = <0x0b128000 0x1000>;
				status = "disabled";
			};
		};

		q6v5_wcss: remoteproc@cd00000 {
			compatible = "qcom,ipq6018-wcss-pil";
			reg = <0x0 0x0cd00000 0x0 0x4040>,
			      <0x0 0x004ab000 0x0 0x20>;
			reg-names = "qdsp6",
				    "rmb";
			interrupts-extended = <&intc GIC_SPI 325 IRQ_TYPE_EDGE_RISING>,
					      <&wcss_smp2p_in 0 0>,
					      <&wcss_smp2p_in 1 0>,
					      <&wcss_smp2p_in 2 0>,
					      <&wcss_smp2p_in 3 0>;
			interrupt-names = "wdog",
					  "fatal",
					  "ready",
					  "handover",
					  "stop-ack";

			resets = <&gcc GCC_WCSSAON_RESET>,
				 <&gcc GCC_WCSS_BCR>,
				 <&gcc GCC_WCSS_Q6_BCR>;

			reset-names = "wcss_aon_reset",
				      "wcss_reset",
				      "wcss_q6_reset";

			clocks = <&gcc GCC_PRNG_AHB_CLK>;
			clock-names = "prng";

			qcom,halt-regs = <&tcsr 0x18000 0x1b000 0xe000>;

			qcom,smem-states = <&wcss_smp2p_out 0>,
					   <&wcss_smp2p_out 1>;
			qcom,smem-state-names = "shutdown",
						"stop";

			memory-region = <&q6_region>;

			glink-edge {
				interrupts = <GIC_SPI 321 IRQ_TYPE_EDGE_RISING>;
				label = "rtr";
				qcom,remote-pid = <1>;
				mboxes = <&apcs_glb 8>;

				qrtr_requests {
					qcom,glink-channels = "IPCRTR";
				};
			};
		};

		mdio: mdio@90000 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "qcom,ipq6018-mdio", "qcom,ipq4019-mdio";
			reg = <0x0 0x90000 0x0 0x64>;
			clocks = <&gcc GCC_MDIO_AHB_CLK>;
			clock-names = "gcc_mdio_ahb_clk";
			status = "disabled";
		};

		qusb_phy_1: qusb@59000 {
			compatible = "qcom,ipq6018-qusb2-phy";
			reg = <0x0 0x059000 0x0 0x180>;
			#phy-cells = <0>;

			clocks = <&gcc GCC_USB1_PHY_CFG_AHB_CLK>,
				 <&xo>;
			clock-names = "cfg_ahb", "ref";

			resets = <&gcc GCC_QUSB2_1_PHY_BCR>;
			status = "disabled";
		};

		usb2: usb@70f8800 {
			compatible = "qcom,ipq6018-dwc3", "qcom,dwc3";
			reg = <0x0 0x070F8800 0x0 0x400>;
			#address-cells = <2>;
			#size-cells = <2>;
			ranges;
			clocks = <&gcc GCC_USB1_MASTER_CLK>,
				 <&gcc GCC_USB1_SLEEP_CLK>,
				 <&gcc GCC_USB1_MOCK_UTMI_CLK>;
			clock-names = "core",
				      "sleep",
				      "mock_utmi";

			assigned-clocks = <&gcc GCC_USB1_MASTER_CLK>,
					  <&gcc GCC_USB1_MOCK_UTMI_CLK>;
			assigned-clock-rates = <133330000>,
					       <24000000>;
			resets = <&gcc GCC_USB1_BCR>;
			status = "disabled";

			dwc_1: usb@7000000 {
			       compatible = "snps,dwc3";
			       reg = <0x0 0x7000000 0x0 0xcd00>;
			       interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
			       phys = <&qusb_phy_1>;
			       phy-names = "usb2-phy";
			       tx-fifo-resize;
			       snps,is-utmi-l1-suspend;
			       snps,hird-threshold = /bits/ 8 <0x0>;
			       snps,dis_u2_susphy_quirk;
			       snps,dis_u3_susphy_quirk;
			       dr_mode = "host";
			};
		};

		ssphy_0: ssphy@78000 {
			compatible = "qcom,ipq6018-qmp-usb3-phy";
			reg = <0x0 0x78000 0x0 0x1C4>;
			#address-cells = <2>;
			#size-cells = <2>;
			ranges;

			clocks = <&gcc GCC_USB0_AUX_CLK>,
				 <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, <&xo>;
			clock-names = "aux", "cfg_ahb", "ref";

			resets = <&gcc GCC_USB0_PHY_BCR>,
				 <&gcc GCC_USB3PHY_0_PHY_BCR>;
			reset-names = "phy","common";
			status = "disabled";

			usb0_ssphy: phy@78200 {
				reg = <0x0 0x00078200 0x0 0x130>, /* Tx */
				      <0x0 0x00078400 0x0 0x200>, /* Rx */
				      <0x0 0x00078800 0x0 0x1F8>, /* PCS */
				      <0x0 0x00078600 0x0 0x044>; /* PCS misc */
				#phy-cells = <0>;
				#clock-cells = <0>;
				clocks = <&gcc GCC_USB0_PIPE_CLK>;
				clock-names = "pipe0";
				clock-output-names = "gcc_usb0_pipe_clk_src";
			};
		};

		qusb_phy_0: qusb@79000 {
			compatible = "qcom,ipq6018-qusb2-phy";
			reg = <0x0 0x079000 0x0 0x180>;
			#phy-cells = <0>;

			clocks = <&gcc GCC_USB0_PHY_CFG_AHB_CLK>,
				<&xo>;
			clock-names = "cfg_ahb", "ref";

			resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
			status = "disabled";
		};

		usb3: usb@8af8800 {
			compatible = "qcom,ipq6018-dwc3", "qcom,dwc3";
			reg = <0x0 0x8AF8800 0x0 0x400>;
			#address-cells = <2>;
			#size-cells = <2>;
			ranges;

			clocks = <&gcc GCC_SYS_NOC_USB0_AXI_CLK>,
				<&gcc GCC_USB0_MASTER_CLK>,
				<&gcc GCC_USB0_SLEEP_CLK>,
				<&gcc GCC_USB0_MOCK_UTMI_CLK>;
			clock-names = "cfg_noc",
				"core",
				"sleep",
				"mock_utmi";

			assigned-clocks = <&gcc GCC_SYS_NOC_USB0_AXI_CLK>,
					  <&gcc GCC_USB0_MASTER_CLK>,
					  <&gcc GCC_USB0_MOCK_UTMI_CLK>;
			assigned-clock-rates = <133330000>,
					       <133330000>,
					       <20000000>;

			resets = <&gcc GCC_USB0_BCR>;
			status = "disabled";

			dwc_0: usb@8a00000 {
				compatible = "snps,dwc3";
				reg = <0x0 0x8A00000 0x0 0xcd00>;
				interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
				phys = <&qusb_phy_0>, <&usb0_ssphy>;
				phy-names = "usb2-phy", "usb3-phy";
				clocks = <&xo>;
				clock-names = "ref";
				tx-fifo-resize;
				snps,is-utmi-l1-suspend;
				snps,hird-threshold = /bits/ 8 <0x0>;
				snps,dis_u2_susphy_quirk;
				snps,dis_u3_susphy_quirk;
				dr_mode = "host";
			};
		};
	};

	timer {
		compatible = "arm,armv8-timer";
		interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
	};

	wcss: wcss-smp2p {
		compatible = "qcom,smp2p";
		qcom,smem = <435>, <428>;

		interrupt-parent = <&intc>;
		interrupts = <GIC_SPI 322 IRQ_TYPE_EDGE_RISING>;

		mboxes = <&apcs_glb 9>;

		qcom,local-pid = <0>;
		qcom,remote-pid = <1>;

		wcss_smp2p_out: master-kernel {
			qcom,entry-name = "master-kernel";
			#qcom,smem-state-cells = <1>;
		};

		wcss_smp2p_in: slave-kernel {
			qcom,entry-name = "slave-kernel";
			interrupt-controller;
			#interrupt-cells = <2>;
		};
	};

	rpm-glink {
		compatible = "qcom,glink-rpm";
		interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
		qcom,rpm-msg-ram = <&rpm_msg_ram>;
		mboxes = <&apcs_glb 0>;

		rpm_requests: glink-channel {
			compatible = "qcom,rpm-ipq6018";
			qcom,glink-channels = "rpm_requests";

			regulators {
				compatible = "qcom,rpm-mp5496-regulators";

				ipq6018_s2: s2 {
					regulator-min-microvolt = <725000>;
					regulator-max-microvolt = <1062500>;
					regulator-always-on;
				};
			};
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/*
 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
 */
#include "ipq8074.dtsi"
#include "pmp8074.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Qualcomm Technologies, Inc. IPQ8074-HK01";
	compatible = "qcom,ipq8074-hk01", "qcom,ipq8074";

	aliases {
		serial0 = &blsp1_uart5;
		serial1 = &blsp1_uart3;
	};

	chosen {
		stdout-path = "serial0";
	};

	memory@40000000 {
		device_type = "memory";
		reg = <0x0 0x40000000 0x0 0x20000000>;
	};

	vreg_dummy: regulator-dummy { };
};

&blsp1_i2c2 {
	status = "okay";
};

&blsp1_spi1 {
	status = "okay";

	flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;
	};
};

&blsp1_uart3 {
	status = "okay";
};

&blsp1_uart5 {
	status = "okay";
};

&pcie0 {
	status = "okay";
	perst-gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
};

&pcie1 {
	status = "okay";
	perst-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
};

&pcie_phy0 {
	status = "okay";
};

&pcie_phy1 {
	status = "okay";
};

&qpic_bam {
	status = "okay";
};

&qpic_nand {
	status = "okay";

	nand@0 {
		reg = <0>;
		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;
		nand-bus-width = <8>;
	};
};

&sdhc_1 {
	status = "okay";
	vqmmc-supply = <&l11>;
};

&qusb_phy_0 {
	status = "okay";
};

&qusb_phy_1 {
	status = "okay";
};

&ssphy_0 {
	status = "okay";
	vdda-phy-supply = <&vreg_dummy>;
	vdda-pll-supply = <&vreg_dummy>;
};

&ssphy_1 {
	status = "okay";
	vdda-phy-supply = <&vreg_dummy>;
	vdda-pll-supply = <&vreg_dummy>;
};

&usb_0 {
	status = "okay";
};

&usb_1 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2020 The Linux Foundation. All rights reserved.
 */
/dts-v1/;

#include "ipq8074-hk10.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C1";
	compatible = "qcom,ipq8074-hk10-c1", "qcom,ipq8074";
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/*
 * Copyright (c) 2020 The Linux Foundation. All rights reserved.
 */
#include "ipq8074-hk10.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2";
	compatible = "qcom,ipq8074-hk10-c2", "qcom,ipq8074";
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 */
/dts-v1/;

#include "ipq8074.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
	aliases {
		serial0 = &blsp1_uart5;
	};

	chosen {
		stdout-path = "serial0";
	};

	memory {
		device_type = "memory";
		reg = <0x0 0x40000000 0x0 0x20000000>;
	};
};

&blsp1_spi1 {
	status = "okay";

	flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;
	};
};

&blsp1_uart5 {
	status = "okay";
};

&pcie0 {
	status = "okay";
	perst-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
};

&pcie1 {
	status = "okay";
	perst-gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
};

&pcie_phy0 {
	status = "okay";
};

&pcie_phy1 {
	status = "okay";
};

&qpic_bam {
	status = "okay";
};

&qpic_nand {
	status = "okay";

	nand@0 {
		reg = <0>;
		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;
		nand-bus-width = <8>;
	};
};