#include "qcom-ipq8064.dtsi"

/ {
	model = "Qualcomm IPQ8065";
	compatible = "qcom,ipq8065", "qcom,ipq8064";

	aliases {
		serial0 = &gsbi4_serial;
	};

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

	cpus {
		qcom,l2 {
			qcom,l2-cpufreq = <384000000 600000000 1400000000>;
		};
	};

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

		rsvd@41200000 {
			reg = <0x41200000 0x300000>;
			no-map;
		};
	};
};

&gsbi4 {
	qcom,mode = <GSBI_PROT_I2C_UART>;
	status = "okay";

	serial@16340000 {
		status = "okay";
	};
	/*
	* The i2c device on gsbi4 should not be enabled.
	* On ipq806x designs gsbi4 i2c is meant for exclusive
	* RPM usage. Turning this on in kernel manifests as
	* i2c failure for the RPM.
	*/
};

&pcie0 {
	compatible = "qcom,pcie-ipq8064-v2";
};

&pcie1 {
	compatible = "qcom,pcie-ipq8064-v2";
};

&pcie2 {
	compatible = "qcom,pcie-ipq8064-v2";
};

&sata {
	ports-implemented = <0x1>;
};

&smb208_s2a {
	regulator-min-microvolt = <775000>;
	regulator-max-microvolt = <1275000>;
};

&smb208_s2b {
	regulator-min-microvolt = <775000>;
	regulator-max-microvolt = <1275000>;
};

&ss_phy_0 {
	qcom,rx-eq = <2>;
	qcom,tx-deamp_3_5db = <32>;
	qcom,mpll = <5>;
};

&ss_phy_1 {
	qcom,rx-eq = <2>;
	qcom,tx-deamp_3_5db = <32>;
	qcom,mpll = <5>;
};

&opp_table0 {
	/* 
	 * On ipq8065 1.2 ghz freq is not present
	 * Remove it to make cpufreq work and not
	 * complain for missing definition
	 */

	/delete-node/opp-1200000000;

	opp-384000000 {
		opp-microvolt-speed0-pvs0-v0 = <975000>;
		opp-microvolt-speed0-pvs1-v0 = <950000>;
		opp-microvolt-speed0-pvs2-v0 = <925000>;
		opp-microvolt-speed0-pvs3-v0 = <900000>;
		opp-microvolt-speed0-pvs4-v0 = <875000>;
		opp-microvolt-speed0-pvs5-v0 = <825000>;
		opp-microvolt-speed0-pvs6-v0 = <775000>;
	};

	opp-600000000 {
		opp-microvolt-speed0-pvs0-v0 = <1000000>;
		opp-microvolt-speed0-pvs1-v0 = <975000>;
		opp-microvolt-speed0-pvs2-v0 = <950000>;
		opp-microvolt-speed0-pvs3-v0 = <925000>;
		opp-microvolt-speed0-pvs4-v0 = <900000>;
		opp-microvolt-speed0-pvs5-v0 = <850000>;
		opp-microvolt-speed0-pvs6-v0 = <800000>;
	};

	opp-800000000 {
		opp-microvolt-speed0-pvs0-v0 = <1050000>;
		opp-microvolt-speed0-pvs1-v0 = <1025000>;
		opp-microvolt-speed0-pvs2-v0 = <1000000>;
		opp-microvolt-speed0-pvs3-v0 = <975000>;
		opp-microvolt-speed0-pvs4-v0 = <950000>;
		opp-microvolt-speed0-pvs5-v0 = <900000>;
		opp-microvolt-speed0-pvs6-v0 = <850000>;
	};

	opp-1000000000 {
		opp-microvolt-speed0-pvs0-v0 = <1100000>;
		opp-microvolt-speed0-pvs1-v0 = <1075000>;
		opp-microvolt-speed0-pvs2-v0 = <1050000>;
		opp-microvolt-speed0-pvs3-v0 = <1025000>;
		opp-microvolt-speed0-pvs4-v0 = <1000000>;
		opp-microvolt-speed0-pvs5-v0 = <950000>;
		opp-microvolt-speed0-pvs6-v0 = <900000>;
	};

	opp-1400000000 {
		opp-microvolt-speed0-pvs0-v0 = <1175000>;
		opp-microvolt-speed0-pvs1-v0 = <1150000>;
		opp-microvolt-speed0-pvs2-v0 = <1125000>;
		opp-microvolt-speed0-pvs3-v0 = <1100000>;
		opp-microvolt-speed0-pvs4-v0 = <1075000>;
		opp-microvolt-speed0-pvs5-v0 = <1025000>;
		opp-microvolt-speed0-pvs6-v0 = <975000>;
	};

	opp-1725000000 {
		opp-hz = /bits/ 64 <1725000000>;
		opp-microvolt-speed0-pvs0-v0 = <1262500>;
		opp-microvolt-speed0-pvs1-v0 = <1225000>;
		opp-microvolt-speed0-pvs2-v0 = <1200000>;
		opp-microvolt-speed0-pvs3-v0 = <1175000>;
		opp-microvolt-speed0-pvs4-v0 = <1150000>;
		opp-microvolt-speed0-pvs5-v0 = <1100000>;
		opp-microvolt-speed0-pvs6-v0 = <1050000>;
		opp-supported-hw = <0x1>;
		clock-latency-ns = <100000>;
	};
};
