#include "lahaina-pmic-overlay.dtsi"
#include <dt-bindings/gpio/gpio.h>

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

&wdog {
	status = "disabled";
};

&spmi_debug_bus {
	status = "ok";
};

/* Debug UART console */
&qupv3_se3_2uart {
	qcom,rumi_platform;
};

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

	vdda-phy-supply = <&pm8350_l5>;
	vdda-pll-supply = <&pm8350_l6>;
	vdda-phy-max-microamp = <85700>;
	vdda-pll-max-microamp = <18300>;

	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 = <800000>;

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

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

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

	status = "ok";
};

&sdhc_2 {
	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 = <1808000 2960000>;
	qcom,vdd-io-current-level = <200 22000>;

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

	cd-gpios = <&tlmm 92 GPIO_ACTIVE_LOW>;

	status = "disabled";
};

&soc {
	#address-cells = <1>;
	#size-cells = <1>;

	usb_emu_phy_0: usb_emu_phy@a720000 {
		compatible = "qcom,usb-emu-phy";
		reg = <0x0a720000 0x9500>;

		qcom,emu-init-seq = <0xffff 0x4
				     0xfff0 0x4
				     0x100000 0x20
				     0x0 0x20
				     0x101f0 0x20
				     0x100000 0x3c
				     0x0 0x3c
				     0x10060 0x3c
				     0x0 0x4>;
	};
	qcom,qbt_handler {
		compatible = "qcom,qbt-handler";
		qcom,ipc-gpio = <&tlmm 38 0>;
		qcom,finger-detect-gpio = <&tlmm 39 0>;
	};
};

&usb2_phy0 {
	status = "disabled";
};

&usb2_phy1 {
	status = "disabled";
};

&usb_qmp_dp_phy {
	status = "disabled";
};

&usb_qmp_phy {
	status = "disabled";
};

&usb0 {
	/delete-property/ extcon;
	dwc3@a600000 {
		usb-phy = <&usb_emu_phy_0>, <&usb_nop_phy>;
		maximum-speed = "high-speed";
		dr_mode = "peripheral";
	};
};

&usb1 {
	status = "disabled";
	dwc3@a800000 {
		status = "disabled";
	};
};

&qupv3_se13_i2c {
	status = "disabled";
};

&gpu_cc_cx_gdsc {
	qcom,gds-timeout = <5000>;
};
