/* Copyright (c) 2021, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <dt-bindings/clock/qcom,rpmh.h>
#include "kalama-arc-products-common-overlay.dtsi"
#include "kalama-moto-common-charger.dtsi"
#include "kalama-arc-charger-overlay.dtsi"
#include "kalama-arc-haptics-overlay.dtsi"
#include "kalama-moto-common-st-nfc.dtsi"
#include "kalama-arc-touchscreen-overlay.dtsi"
#include "kalama-arc-fingerprint-overlay.dtsi"
#include "kalama-arc-evb-sensors-overlay.dtsi"

#include "kalama-arc-thermal-overlay.dtsi"
#include "moto-arc-wl2868c.dtsi"

&soc {
	mmi_relay {
		compatible = "mmi,sys-relay";
	};

	lpd_mitigate: mmi,lpd-mitigate {
		compatible = "mmi,lpd-mitigate";
		mmi,mitigate-mode-cfg = <3>;
		mmi,default-mitigate-mode-cfg = <1>;
	};

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

&usb_qmp_dp_phy {
	status = "disabled";
};

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

&ufshc_mem {
        limit-tx-hs-gear = <4>;
        limit-rx-hs-gear = <4>;
        limit-rate = <1>; /* HS Rate-A */
        status = "ok";
};

&pm8550b_eusb2_repeater {
	qcom,param-override-seq =
		/* <value reg_offset> */
		/* Adjust HS trasmit amplitude */
		<0xb 0x51
		/* HS disconnect threshold */
		 0x6 0x53
		/* Squelch detection threshold */
		 0x4 0x54
		/* Tx pre-emphasis tuning */
		 0x6 0x57>;

	qcom,host-param-override-seq =
		/* <value reg_offset> */
		/* Adjust HS trasmit amplitude */
		<0xa 0x51
		/* HS disconnect threshold */
		 0x6 0x53
		/* Squelch detection threshold */
		 0x5 0x54
		/* Tx pre-emphasis tuning */
		 0x6 0x57>;
};

&BOB2 {
	regulator-min-microvolt = <2704000>;
	regulator-max-microvolt = <3208000>;
	qcom,init-voltage = <3100000>;
	regulator-boot-on;
};
