#include <dt-bindings/gpio/gpio.h>

#include "waipio-pmic-overlay.dtsi"

&arch_timer {
	clock-frequency = <500000>;
};

&memtimer {
	clock-frequency = <500000>;
};

&soc {
	pcie0: qcom,pcie@1c00000 {
		reg = <0x01c00000 0x3000>,
			<0x01c06000 0x2000>,
			<0x60000000 0xf1d>,
			<0x60000f20 0xa8>,
			<0x60001000 0x1000>,
			<0x60100000 0x100000>,
			<0x01c05000 0x1000>;
			reg-names = "parf", "phy", "dm_core", "elbi", "iatu", "conf",
				"rumi";
			qcom,target-link-speed = <0x1>;
			qcom,link-check-max-count = <200>; /* 1 sec */
			qcom,no-l1-supported;
			qcom,no-l1ss-supported;
			qcom,no-aux-clk-sync;

			status = "ok";
	};

	usb_nop_phy: usb_nop_phy {
		compatible = "usb-nop-xceiv";
	};

	usb_emuphy: phy@a784000 {
		compatible = "qcom,usb-emu-phy";
		reg = <0x0a784000 0x9500>;

		qcom,emu-init-seq = <0xfffff 0x4
		     0xffff0 0x4
		     0x100000 0x20
		     0x0 0x20
		     0x000101F0 0x20
		     0x00100000 0x3c
		     0x0 0x3c
		     0x0 0x4>;
	};
};

&usb0 {
	dwc3@a600000 {
		usb-phy = <&usb_emuphy>, <&usb_nop_phy>;
		dr_mode = "peripheral";
		maximum-speed = "high-speed";
	};
};

&usb2_phy0 {
	status = "disabled";
};

&usb_qmp_dp_phy {
	status = "disabled";
};

&sdhc_2 {
	status = "ok";
	vdd-supply = <&pm8350c_l9>;
	qcom,vdd-voltage-level = <2950000 2960000>;
	qcom,vdd-current-level = <200 800000>;

	vdd-io-supply = <&pm8350c_l6>;
	qcom,vdd-io-voltage-level = <2960000 2960000>;
	qcom,vdd-io-current-level = <200 22000>;

	cap-sd-highspeed;
	max-frequency = <100000000>;

	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&sdc2_on>;
	pinctrl-1 = <&sdc2_off>;

	cd-gpios = <&tlmm 92 GPIO_ACTIVE_LOW>;
};

&ufsphy_mem {
	compatible = "qcom,ufs-phy-qrbtc-sdm845";

	vdda-phy-supply = <&pm8350_l5>;
	vdda-pll-supply = <&pm8350_l6>;
	vdda-phy-max-microamp = <102000>;
	vdda-pll-max-microamp = <19200>;

	status = "ok";
};

&ufshc_mem {
	limit-tx-hs-gear = <1>;
	limit-rx-hs-gear = <1>;
	limit-rate = <2>; /* HS Rate-B */

	vdd-hba-supply = <&gcc_ufs_phy_gdsc>;
	vdd-hba-fixed-regulator;

	vcc-supply = <&pm8350_l7>;
	vcc-max-microamp = <1100000>;

	vccq-supply = <&pm8350_l9>;
	vccq-max-microamp = <1200000>;

	qcom,vddp-ref-clk-supply = <&pm8350_l9>;
	qcom,vddp-ref-clk-max-microamp = <100>;

	qcom,disable-lpm;
	rpm-level = <0>;
	spm-level = <0>;

	qcom,iommu-dma = "bypass";

	status = "ok";
};

&qupv3_se5_i2c {
	status = "disabled";
};

&tsens0 {
	status = "disabled";
};

&tsens1 {
	status = "disabled";
};
