/* Copyright (c) 2014-2018, 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.
 */

/*
 * As a general rule, only version-specific property overrides should be placed
 * inside this file. Common device definitions should be placed inside the
 * msm8996.dtsi file.
 */

#include "msm8996-v3.dtsi"
/ {
	model = "Qualcomm Technologies, Inc. MSM 8996pro";
	qcom,msm-id = <305 0x10000>;

	chosen {
		bootargs = "sched_enable_hmp=1 sched_enable_power_aware=1 app_setting.use_32bit_app_setting_pro=1 kpti=1";
	};
};

&apc_apm {
	compatible = "qcom,msm8996pro-apm";
	/delete-property/ qcom,clock-source-override;
};

&pm8994_s11 {
	/delete-property/ qcom,recal-mask;
};

&apcc_cpr {
	compatible = "qcom,cpr3-msm8996pro-hmss-regulator";
	qcom,cpr-interrupt-affinity = <&CPU0 &CPU1>;
};

&apc0_pwrcl_vreg {
	regulator-min-microvolt = <1>;
	regulator-max-microvolt = <20>;

	qcom,cpr-fuse-corners = <5>;
	qcom,cpr-fuse-combos = <24>;
	qcom,cpr-speed-bins = <3>;
	qcom,cpr-speed-bin-corners = <20 20 19>;
	qcom,cpr-corners =
		/* Speed bin 0 */
		<20 20 20 20 20 20 20 20>,

		/* Speed bin 1 */
		<20 20 20 20 20 20 20 20>,

		/* Speed bin 2 */
		<19 19 19 19 19 19 19 19>;

	qcom,cpr-corner-fmax-map =
		/* Speed bin 0 */
		<1 6 9 14 19>,
		<1 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,

		/* Speed bin 1 */
		<1 6 9 14 19>,
		<1 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,

		/* Speed bin 2 */
		<1 6 9 14 19>,
		<1 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>,
		<3 6 9 14 19>;

	qcom,cpr-voltage-ceiling =
		/* Speed bin 0 */
		<670000  670000  670000  670000  670000  670000  745000  745000
		 745000  905000  905000  905000  905000  905000 1140000 1140000
		1140000 1140000 1140000 1140000>,

		/* Speed bin 1 */
		<670000  670000  670000  670000  670000  670000  745000  745000
		 745000  905000  905000  905000  905000  905000 1140000 1140000
		1140000 1140000 1140000 1140000>,

		/* Speed bin 2 */
		<670000  670000  670000  670000  670000  670000  745000  745000
		 745000  905000  905000  905000  905000  905000 1140000 1140000
		1140000 1140000 1140000>;

	qcom,cpr-voltage-floor =
		/* Speed bin 0 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000>,

		/* Speed bin 1 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000>,

		/* Speed bin 2 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000>;

	qcom,cpr-floor-to-ceiling-max-range =
		/* Speed bin 0 */
		<80000   80000   80000   80000   80000   80000   80000   80000
		 80000   80000   80000   80000   80000   80000   80000   80000
		 80000   80000   80000   80000>,

		/* Speed bin 1 */
		<80000   80000   80000   80000   80000   80000   80000   80000
		 80000   80000   80000   80000   80000   80000   80000   80000
		 80000   80000   80000   80000>,

		/* Speed bin 2 */
		<80000   80000   80000   80000   80000   80000   80000   80000
		 80000   80000   80000   80000   80000   80000   80000   80000
		 80000   80000   80000>;

	qcom,corner-frequencies =
		/* Speed bin 0 */
		<307200000  384000000  460800000  537600000  614400000
		 691200000  768000000  844800000  902400000  979200000
		1056000000 1132800000 1209600000 1286400000 1363200000
		1440000000 1516800000 1593600000 1785600000 2188800000>,

		/* Speed bin 1 */
		<307200000  384000000  460800000  537600000  614400000
		 691200000  768000000  844800000  902400000  979200000
		1056000000 1132800000 1209600000 1286400000 1363200000
		1440000000 1516800000 1593600000 1785600000 1996800000>,

		/* Speed bin 2 */
		<307200000  384000000  460800000  537600000  614400000
		 691200000  768000000  844800000  902400000  979200000
		1056000000 1132800000 1209600000 1286400000 1363200000
		1440000000 1516800000 1593600000 1785600000>;

	qcom,cpr-ro-scaling-factor =
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 2889 2528 2740 2426 2310 2040 2519 2257 2668 2372 0 0 0 0>;

	qcom,cpr-open-loop-voltage-fuse-adjustment =
		/* Speed bin 0 */
		<(-45000)       0        0  (-25000)       0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,

		/* Speed bin 1 */
		<(-45000)       0        0  (-25000)       0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,

		/* Speed bin 2 */
		<(-45000)       0        0  (-25000)       0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >;

	qcom,cpr-closed-loop-voltage-fuse-adjustment =
		/* Speed bin 0 */
		<(-55000) (-25000)  (-5000) (-20000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,

		/* Speed bin 1 */
		<(-55000) (-25000)  (-5000) (-20000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,

		/* Speed bin 2 */
		<(-55000) (-25000)  (-5000) (-20000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>,
		<      0  (-15000) (-15000) (-15000) (-15000)>;

	qcom,cpr-open-loop-voltage-adjustment =
		/* Speed bin 0 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-17000) (-19000) (-21000) (-23000) (-25000)
		 (-26000) (-27000) (-27000) (-28000) (-30000)  120000>,

		/* Speed bin 1 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-17000) (-19000) (-21000) (-23000) (-25000)
		 (-26000) (-27000) (-27000) (-28000) (-30000)   70000>,

		/* Speed bin 2 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-17000) (-19000) (-21000) (-23000) (-25000)
		 (-26000) (-27000) (-27000) (-28000) (-30000)>;

	qcom,cpr-open-loop-voltage-min-diff =
		/* Speed bin 0 */
	       <0 0 0 0 (-50000) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>,

		/* Speed bin 1 */
	       <0 0 0 0 (-50000) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>,

		/* Speed bin 2 */
	       <0 0 0 0 (-50000) 0 0 0 0 0 0 0 0 0 0 0 0 0 0>;

	qcom,cpr-closed-loop-voltage-adjustment =
		/* Speed bin 0 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-17000) (-19000) (-21000) (-23000) (-25000)
		 (-26000) (-27000) (-27000) (-28000) (-30000)  110000>,

		/* Speed bin 1 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-17000) (-19000) (-21000) (-23000) (-25000)
		 (-26000) (-27000) (-27000) (-28000) (-30000)   60000>,

		/* Speed bin 2 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-17000) (-19000) (-21000) (-23000) (-25000)
		 (-26000) (-27000) (-27000) (-28000) (-30000)>;

	qcom,cpr-aging-max-voltage-adjustment = <15000>;
	qcom,cpr-aging-ref-corner = <14 14 14>;
	qcom,cpr-aging-ro-scaling-factor = <3200>;
	qcom,allow-aging-voltage-adjustment = <1>;
	qcom,allow-aging-open-loop-voltage-adjustment = <1>;

	qcom,ldo-min-headroom-voltage = <80000>;
};

&apc0_cbf_vreg {
	regulator-min-microvolt = <1>;
	regulator-max-microvolt = <19>;
	qcom,is-cbf-regulator;

	qcom,proxy-consumer-voltage = <14 19>;

	qcom,cpr-fuse-corners = <5>;
	qcom,cpr-fuse-combos = <24>;
	qcom,cpr-speed-bins = <3>;
	qcom,cpr-speed-bin-corners = <19 19 19>;
	qcom,cpr-corners =
		/* Speed bin 0 */
		<19 19 19 19 19 19 19 19>,

		/* Speed bin 1 */
		<19 19 19 19 19 19 19 19>,

		/* Speed bin 2 */
		<19 19 19 19 19 19 19 19>;

	qcom,cpr-corner-fmax-map =
		/* Speed bin 0 */
		<1 4 7 14 19>,

		/* Speed bin 1 */
		<1 4 7 14 19>,

		/* Speed bin 2 */
		<1 4 7 14 19>;

	qcom,cpr-voltage-ceiling =
		/* Speed bin 0 */
		<670000  670000  670000  670000  745000  745000  745000  905000
		 905000  905000  905000  905000  905000  905000 1140000 1140000
		1140000 1140000 1140000>,

		/* Speed bin 1 */
		<670000  670000  670000  670000  745000  745000  745000  905000
		 905000  905000  905000  905000  905000  905000 1140000 1140000
		1140000 1140000 1140000>,

		/* Speed bin 2 */
		<670000  670000  670000  670000  745000  745000  745000  905000
		 905000  905000  905000  905000  905000  905000 1140000 1140000
		1140000 1140000 1140000>;

	qcom,cpr-voltage-floor =
		/* Speed bin 0 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000>,

		/* Speed bin 1 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000>,

		/* Speed bin 2 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000>;

	qcom,cpr-floor-to-ceiling-max-range =
		 /* Speed bin 0 */
		 <80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000>,

		/* Speed bin 1 */
		 <80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000>,

		/* Speed bin 2 */
		 <80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000>;

	qcom,corner-frequencies =
		/* Speed bin 0 */
		<192000000  307200000  384000000  441600000  537600000
		 614400000  691200000  768000000  844800000  902400000
		 979200000 1056000000 1132800000 1190400000 1286400000
		1363200000 1440000000 1516800000 1593600000>,

		/* Speed bin 1 */
		<192000000  307200000  384000000  441600000  537600000
		 614400000  691200000  768000000  844800000  902400000
		 979200000 1056000000 1132800000 1190400000 1286400000
		1363200000 1440000000 1516800000 1593600000>,

		/* Speed bin 2 */
		<192000000  307200000  384000000  441600000  537600000
		 614400000  691200000  768000000  844800000  902400000
		 979200000 1056000000 1132800000 1190400000 1286400000
		1363200000 1440000000 1516800000 1593600000>;

	qcom,cpr-ro-scaling-factor =
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 2889 2528 2740 2426 2310 2040 2519 2257 2668 2372 0 0 0 0>;

	qcom,cpr-open-loop-voltage-fuse-adjustment =
		/* Speed bin 0 */
		<(-40000)       0        0  (-10000) (-50000)>,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,

		/* Speed bin 1 */
		<(-40000)       0        0  (-10000) (-50000)>,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,

		/* Speed bin 2 */
		<(-40000)       0        0  (-10000) (-50000)>,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >,
		<      0        0        0    15000        0 >;

	qcom,cpr-closed-loop-voltage-fuse-adjustment =
		/* Speed bin 0 */
		<(-45000) (-25000)   10000  (-10000) (-40000)>,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,

		/* Speed bin 1 */
		<(-45000) (-25000)   10000  (-10000) (-40000)>,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,

		/* Speed bin 2 */
		<(-45000) (-25000)   10000  (-10000) (-40000)>,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >,
		<(-15000) (-10000)    5000    20000        0 >;

	qcom,cpr-aging-max-voltage-adjustment = <15000>;
	qcom,cpr-aging-ref-corner = <14 14 14>;
	qcom,cpr-aging-ro-scaling-factor = <3200>;
	qcom,allow-aging-voltage-adjustment = <1>;
	qcom,allow-aging-open-loop-voltage-adjustment = <1>;
};

&apc1_vreg {
	regulator-min-microvolt = <1>;
	regulator-max-microvolt = <27>;

	qcom,cpr-fuse-corners = <5>;
	qcom,cpr-fuse-combos = <24>;
	qcom,cpr-speed-bins = <3>;
	qcom,cpr-speed-bin-corners = <27 25 25>;
	qcom,cpr-corners =
		/* Speed bin 0 */
		<27 27 27 27 27 27 27 27>,

		/* Speed bin 1 */
		<25 25 25 25 25 25 25 25>,

		/* Speed bin 2 */
		<25 25 25 25 25 25 25 25>;

	qcom,cpr-corner-fmax-map =
		/* Speed bin 0 */
		<1 7 10 15 27>,
		<1 7 10 15 27>,
		<4 7 10 15 27>,
		<4 7 10 15 27>,
		<4 7 10 15 27>,
		<4 7 10 15 27>,
		<4 7 10 15 27>,
		<4 7 10 15 27>,

		/* Speed bin 1 */
		<1 7 10 15 25>,
		<1 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,

		/* Speed bin 2 */
		<1 7 10 15 25>,
		<1 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>,
		<4 7 10 15 25>;

	qcom,cpr-voltage-ceiling =
		/* Speed bin 0 */
		<670000  670000  670000  670000  670000  670000  670000  745000
		 745000  745000  905000  905000  905000  905000  905000 1140000
		1140000 1140000 1140000 1140000 1140000 1140000 1140000 1140000
		1140000 1140000 1140000>,

		/* Speed bin 1 */
		<670000  670000  670000  670000  670000  670000  670000  745000
		 745000  745000  905000  905000  905000  905000  905000 1140000
		1140000 1140000 1140000 1140000 1140000 1140000 1140000 1140000
		1140000>,

		/* Speed bin 2 */
		<670000  670000  670000  670000  670000  670000  670000  745000
		 745000  745000  905000  905000  905000  905000  905000 1140000
		1140000 1140000 1140000 1140000 1140000 1140000 1140000 1140000
		1140000>;

	qcom,cpr-voltage-floor =
		/* Speed bin 0 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000>,

		/* Speed bin 1 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000>,

		/* Speed bin 2 */
		<470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000  470000  470000  470000  470000  470000  470000  470000
		 470000>;

	qcom,cpr-floor-to-ceiling-max-range =
		 /* Speed bin 0 */
		 <80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000>,

		 /* Speed bin 1 */
		 <80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000>,

		 /* Speed bin 2 */
		 <80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000   80000   80000   80000   80000   80000   80000   80000
		  80000>;

	qcom,corner-frequencies =
		/* Speed bin 0 */
		<307200000  384000000  460800000  537600000  614400000
		 691200000  748800000  825600000  902400000  979200000
		1056000000 1132800000 1209600000 1286400000 1363200000
		1440000000 1516800000 1593600000 1670400000 1747200000
		1824000000 1900800000 1977600000 2054400000 2150400000
		2246400000 2342400000>,

		/* Speed bin 1 */
		<307200000  384000000  460800000  537600000  614400000
		 691200000  748800000  825600000  902400000  979200000
		1056000000 1132800000 1209600000 1286400000 1363200000
		1440000000 1516800000 1593600000 1670400000 1747200000
		1824000000 1900800000 1977600000 2054400000 2150400000>,

		/* Speed bin 2 */
		<307200000  384000000  460800000  537600000  614400000
		 691200000  748800000  825600000  902400000  979200000
		1056000000 1132800000 1209600000 1286400000 1363200000
		1440000000 1516800000 1593600000 1670400000 1747200000
		1824000000 1900800000 1977600000 2054400000 2150400000>;

	qcom,cpr-ro-scaling-factor =
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 3112 2666 2947 2543 2271 1979 2623 2317 2772 2450 0 0 0 0>,
		<0 0 2889 2528 2740 2426 2310 2040 2519 2257 2668 2372 0 0 0 0>;

	qcom,cpr-open-loop-voltage-fuse-adjustment =
		/* Speed bin 0 */
		<(-45000)       0    15000  (-20000)       0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,

		/* Speed bin 1 */
		<(-45000)       0    15000  (-20000)       0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,

		/* Speed bin 2 */
		<(-45000)       0    15000  (-20000)       0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >,
		<      0        0        0        0        0 >;

	qcom,cpr-closed-loop-voltage-fuse-adjustment =
		/* Speed bin 0 */
		<(-55000) (-20000)   15000  (-15000) (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,

		/* Speed bin 1 */
		<(-55000) (-20000)   15000  (-15000) (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,

		/* Speed bin 2 */
		<(-55000) (-20000)   15000  (-15000) (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>,
		<      0  (-10000) (-15000)       0  (-10000)>;

	qcom,cpr-open-loop-voltage-adjustment =
		/* Speed bin 0 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-15000) (-17000) (-19000) (-21000) (-23000)
		 (-25000) (-25000) (-26000) (-26000) (-27000) (-27000) (-28000)
		 (-28000) (-29000) (-29000) (-30000) (-30000) (-30000)>,

		/* Speed bin 1 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-15000) (-17000) (-19000) (-21000) (-23000)
		 (-25000) (-25000) (-26000) (-26000) (-27000) (-27000) (-28000)
		 (-28000) (-29000) (-29000) (-30000)>,

		/* Speed bin 2 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-15000) (-17000) (-19000) (-21000) (-23000)
		 (-25000) (-25000) (-26000) (-26000) (-27000) (-27000) (-28000)
		 (-28000) (-29000) (-29000) (-30000)>;

	qcom,cpr-open-loop-voltage-min-diff =
		/* Speed bin 0 */
		<0 0 0 0 (-50000) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>,

		/* Speed bin 1 */
		<0 0 0 0 (-50000) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>,

		/* Speed bin 2 */
		<0 0 0 0 (-50000) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>;

	qcom,cpr-closed-loop-voltage-adjustment =
		/* Speed bin 0 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-15000) (-17000) (-19000) (-21000) (-23000)
		 (-25000) (-25000) (-26000) (-26000) (-27000) (-27000) (-28000)
		 (-28000) (-29000) (-29000) (-30000) (-30000) (-30000)>,

		/* Speed bin 1 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-15000) (-17000) (-19000) (-21000) (-23000)
		 (-25000) (-25000) (-26000) (-26000) (-27000) (-27000) (-28000)
		 (-28000) (-29000) (-29000) (-30000)>,

		/* Speed bin 1 */
		<(-15000) (-15000) (-15000) (-15000) (-15000) (-15000) (-15000)
		 (-15000) (-15000) (-15000) (-17000) (-19000) (-21000) (-23000)
		 (-25000) (-25000) (-26000) (-26000) (-27000) (-27000) (-28000)
		 (-28000) (-29000) (-29000) (-30000)>;

	qcom,cpr-aging-max-voltage-adjustment = <15000>;
	qcom,cpr-aging-ref-corner = <15 15 15>;
	qcom,cpr-aging-ro-scaling-factor = <3200>;
	qcom,allow-aging-voltage-adjustment = <1>;
	qcom,allow-aging-open-loop-voltage-adjustment = <1>;

	qcom,cpr-dynamic-floor-corner = <1>;
	qcom,ldo-min-headroom-voltage = <130000>;
};

&pmi8994_s2 {
	regulator-max-microvolt = <1065000>;
};

&pm8004_s2 {
	regulator-max-microvolt = <1065000>;
};

&gfx_cpr {
	compatible = "qcom,cpr3-msm8996pro-mmss-regulator";
};

&gfx_vreg {
	regulator-min-microvolt = <2>;
	regulator-max-microvolt = <9>;

	qcom,cpr-fuse-corners = <4>;
	qcom,cpr-fuse-combos = <24>;
	qcom,cpr-speed-bins = <3>;
	qcom,cpr-speed-bin-corners = <9 9 9>;
	qcom,cpr-corners =
		/* Speed bin 0 */
		<9 9 9 9 9 9 9 9>,

		/* Speed bin 1 */
		<9 9 9 9 9 9 9 9>,

		/* Speed bin 2 */
		<9 9 9 9 9 9 9 9>;

	qcom,cpr-corner-fmax-map =
		/* Speed bin 0 */
		<2 4 6 9>,

		/* Speed bin 1 */
		<2 4 6 9>,

		/* Speed bin 2 */
		<2 4 6 9>;

	qcom,cpr-voltage-ceiling =
		/* Speed bin 0 */
		<400000  670000  670000  745000  825000  905000  960000 1015000
		1065000>,

		/* Speed bin 1 */
		<400000  670000  670000  745000  825000  905000  960000 1015000
		1065000>,

		/* Speed bin 2 */
		<400000  670000  670000  745000  825000  905000  960000 1015000
		1065000>;

	qcom,cpr-voltage-floor =
		/* Speed bin 0 */
		<400000  520000  520000  520000  520000  520000  520000  520000
		 520000>,

		/* Speed bin 1 */
		<400000  520000  520000  520000  520000  520000  520000  520000
		 520000>,

		/* Speed bin 2 */
		<400000  520000  520000  520000  520000  520000  520000  520000
		 520000>;

	qcom,mem-acc-voltage =
		/* Speed bin 0 */
		<1 1 1 1 2 2 2 2 2>,

		/* Speed bin 1 */
		<1 1 1 1 2 2 2 2 2>,

		/* Speed bin 2 */
		<1 1 1 1 2 2 2 2 2>;

	qcom,corner-frequencies =
		/* Speed bin 0 */
		<0 133000000 214000000 315000000 401800000 510000000 560000000
		   624000000 652800000>,

		/* Speed bin 1 */
		<0 133000000 214000000 315000000 401800000 510000000 560000000
		   624000000 652800000>,

		/* Speed bin 2 */
		<0 133000000 214000000 315000000 401800000 510000000 560000000
		   624000000 652800000>;

	qcom,cpr-target-quotients =
		/* Speed bin 0 */
		<0 0 0 0 0 0    0    0    0    0    0    0 0 0 0 0>,
		<0 0 0 0 0 0  185  179  291  299  304  319 0 0 0 0>,
		<0 0 0 0 0 0  287  273  425  426  443  453 0 0 0 0>,
		<0 0 0 0 0 0  414  392  584  576  608  612 0 0 0 0>,
		<0 0 0 0 0 0  459  431  684  644  692  679 0 0 0 0>,
		<0 0 0 0 0 0  577  543  798  768  823  810 0 0 0 0>,
		<0 0 0 0 0 0  669  629  886  864  924  911 0 0 0 0>,
		<0 0 0 0 0 0  771  725  984  970 1036 1024 0 0 0 0>,
		<0 0 0 0 0 0  908  868 1118 1106 1179 1174 0 0 0 0>,

		/* Speed bin 1 */
		<0 0 0 0 0 0    0    0    0    0    0    0 0 0 0 0>,
		<0 0 0 0 0 0  185  179  291  299  304  319 0 0 0 0>,
		<0 0 0 0 0 0  287  273  425  426  443  453 0 0 0 0>,
		<0 0 0 0 0 0  414  392  584  576  608  612 0 0 0 0>,
		<0 0 0 0 0 0  459  431  684  644  692  679 0 0 0 0>,
		<0 0 0 0 0 0  577  543  798  768  823  810 0 0 0 0>,
		<0 0 0 0 0 0  669  629  886  864  924  911 0 0 0 0>,
		<0 0 0 0 0 0  771  725  984  970 1036 1024 0 0 0 0>,
		<0 0 0 0 0 0  908  868 1118 1106 1179 1174 0 0 0 0>,

		/* Speed bin 2 */
		<0 0 0 0 0 0    0    0    0    0    0    0 0 0 0 0>,
		<0 0 0 0 0 0  185  179  291  299  304  319 0 0 0 0>,
		<0 0 0 0 0 0  287  273  425  426  443  453 0 0 0 0>,
		<0 0 0 0 0 0  414  392  584  576  608  612 0 0 0 0>,
		<0 0 0 0 0 0  459  431  684  644  692  679 0 0 0 0>,
		<0 0 0 0 0 0  577  543  798  768  823  810 0 0 0 0>,
		<0 0 0 0 0 0  669  629  886  864  924  911 0 0 0 0>,
		<0 0 0 0 0 0  771  725  984  970 1036 1024 0 0 0 0>,
		<0 0 0 0 0 0  908  868 1118 1106 1179 1174 0 0 0 0>;

	qcom,cpr-ro-scaling-factor =
		/* Speed bin 0 */
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,

		/* Speed bin 1 */
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,

		/* Speed bin 2 */
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>,
		<0 0 0 0 0 0 2035 1917 1959 2131 2246 2253 0 0 0 0>;

	qcom,cpr-open-loop-voltage-fuse-adjustment =
		/* Speed bin 0 */
		<(-85000) (-15000) (-15000) (-40000)>,

		/* Speed bin 1 */
		<(-85000) (-15000) (-15000) (-40000)>,

		/* Speed bin 2 */
		<(-85000) (-15000) (-15000) (-40000)>;

	qcom,cpr-closed-loop-voltage-adjustment =
		/* Speed bin 0 */
		<0 0 30000 10000 10000 45000 25000 25000 (-35000)>,

		/* Speed bin 1 */
		<0 0 30000 10000 10000 45000 25000 25000 (-35000)>,

		/* Speed bin 2 */
		<0 0 30000 10000 10000 45000 25000 25000 (-35000)>;

	qcom,cpr-floor-to-ceiling-max-range =
		/* Speed bin 0 */
		<0 70000 70000 75000 80000 90000 95000 100000 100000>,

		/* Speed bin 1 */
		<0 70000 70000 75000 80000 90000 95000 100000 100000>,

		/* Speed bin 2 */
		<0 70000 70000 75000 80000 90000 95000 100000 100000>;

	qcom,cpr-fused-closed-loop-voltage-adjustment-map =
		/* Speed bin 0 */
		<0 2 2 2 2 0 0 4 4>,

		/* Speed bin 1 */
		<0 2 2 2 2 0 0 4 4>,

		/* Speed bin 2 */
		<0 2 2 2 2 0 0 4 4>;

	qcom,cpr-aging-max-voltage-adjustment = <15000>;
	qcom,cpr-aging-ref-corner = <6>;
	qcom,cpr-aging-ro-scaling-factor = <2950>;
	qcom,allow-aging-voltage-adjustment = <1>;
	qcom,allow-aging-open-loop-voltage-adjustment = <1>;
};

&kryo0_vreg {
	qcom,ldo-headroom-voltage = <80000>;
};

&kryo1_vreg {
	qcom,ldo-headroom-voltage = <130000>;
};

&clock_cpu {
	compatible = "qcom,cpu-clock-8996-pro";
	qcom,pwrcl-speedbin0-v0 =
		<          0  0 >,
		<  307200000  1 >,
		<  384000000  2 >,
		<  460800000  3 >,
		<  537600000  4 >,
		<  614400000  5 >,
		<  691200000  6 >,
		<  768000000  7 >,
		<  844800000  8 >,
		<  902400000  9 >,
		<  979200000 10 >,
		< 1056000000 11 >,
		< 1132800000 12 >,
		< 1209600000 13 >,
		< 1286400000 14 >,
		< 1363200000 15 >,
		< 1440000000 16 >,
		< 1516800000 17 >,
		< 1593600000 18 >,
		< 2188800000 20 >;
	qcom,pwrcl-speedbin1-v0 =
		<          0  0 >,
		<  307200000  1 >,
		<  384000000  2 >,
		<  460800000  3 >,
		<  537600000  4 >,
		<  614400000  5 >,
		<  691200000  6 >,
		<  768000000  7 >,
		<  844800000  8 >,
		<  902400000  9 >,
		<  979200000 10 >,
		< 1056000000 11 >,
		< 1132800000 12 >,
		< 1209600000 13 >,
		< 1286400000 14 >,
		< 1363200000 15 >,
		< 1440000000 16 >,
		< 1516800000 17 >,
		< 1593600000 18 >,
		< 1996800000 20 >;
	qcom,pwrcl-speedbin2-v0 =
		<          0  0 >,
		<  307200000  1 >,
		<  384000000  2 >,
		<  460800000  3 >,
		<  537600000  4 >,
		<  614400000  5 >,
		<  691200000  6 >,
		<  768000000  7 >,
		<  844800000  8 >,
		<  902400000  9 >,
		<  979200000 10 >,
		< 1056000000 11 >,
		< 1132800000 12 >,
		< 1209600000 13 >,
		< 1286400000 14 >,
		< 1363200000 15 >,
		< 1440000000 16 >,
		< 1516800000 17 >,
		< 1593600000 18 >;
	qcom,perfcl-speedbin0-v0 =
		<          0  0 >,
		<  307200000  1 >,
		<  384000000  2 >,
		<  460800000  3 >,
		<  537600000  4 >,
		<  614400000  5 >,
		<  691200000  6 >,
		<  748800000  7 >,
		<  825600000  8 >,
		<  902400000  9 >,
		<  979200000 10 >,
		< 1056000000 11 >,
		< 1132800000 12 >,
		< 1209600000 13 >,
		< 1286400000 14 >,
		< 1363200000 15 >,
		< 1440000000 16 >,
		< 1516800000 17 >,
		< 1593600000 18 >,
		< 1670400000 19 >,
		< 1747200000 20 >,
		< 1824000000 21 >,
		< 1900800000 22 >,
		< 1977600000 23 >,
		< 2054400000 24 >,
		< 2150400000 25 >,
		< 2246400000 26 >,
		< 2342400000 27 >;
	qcom,perfcl-speedbin1-v0 =
		<          0  0 >,
		<  307200000  1 >,
		<  384000000  2 >,
		<  460800000  3 >,
		<  537600000  4 >,
		<  614400000  5 >,
		<  691200000  6 >,
		<  748800000  7 >,
		<  825600000  8 >,
		<  902400000  9 >,
		<  979200000 10 >,
		< 1056000000 11 >,
		< 1132800000 12 >,
		< 1209600000 13 >,
		< 1286400000 14 >,
		< 1363200000 15 >,
		< 1440000000 16 >,
		< 1516800000 17 >,
		< 1593600000 18 >,
		< 1670400000 19 >,
		< 1747200000 20 >,
		< 1824000000 21 >,
		< 1900800000 22 >,
		< 1977600000 23 >,
		< 2054400000 24 >,
		< 2150400000 25 >;
	qcom,perfcl-speedbin2-v0 =
		<          0  0 >,
		<  307200000  1 >,
		<  384000000  2 >,
		<  460800000  3 >,
		<  537600000  4 >,
		<  614400000  5 >,
		<  691200000  6 >,
		<  748800000  7 >,
		<  825600000  8 >,
		<  902400000  9 >,
		<  979200000 10 >,
		< 1056000000 11 >,
		< 1132800000 12 >,
		< 1209600000 13 >,
		< 1286400000 14 >,
		< 1363200000 15 >,
		< 1440000000 16 >,
		< 1516800000 17 >,
		< 1593600000 18 >,
		< 1670400000 19 >,
		< 1747200000 20 >,
		< 1824000000 21 >,
		< 1900800000 22 >;
	qcom,cbf-speedbin0-v0 =
		<	   0  0 >,
		<  192000000  1 >,
		<  307200000  2 >,
		<  384000000  3 >,
		<  441600000  4 >,
		<  537600000  5 >,
		<  614400000  6 >,
		<  691200000  7 >,
		<  768000000  8 >,
		<  844800000  9 >,
		<  902400000 10 >,
		<  979200000 11 >,
		< 1056000000 12 >,
		< 1132800000 13 >,
		< 1190400000 14 >,
		< 1286400000 15 >,
		< 1363200000 16 >,
		< 1440000000 17 >,
		< 1516800000 18 >,
		< 1593600000 19 >;
	qcom,cbf-speedbin1-v0 =
		<	   0  0 >,
		<  192000000  1 >,
		<  307200000  2 >,
		<  384000000  3 >,
		<  441600000  4 >,
		<  537600000  5 >,
		<  614400000  6 >,
		<  691200000  7 >,
		<  768000000  8 >,
		<  844800000  9 >,
		<  902400000 10 >,
		<  979200000 11 >,
		< 1056000000 12 >,
		< 1132800000 13 >,
		< 1190400000 14 >,
		< 1286400000 15 >,
		< 1363200000 16 >,
		< 1440000000 17 >,
		< 1516800000 18 >,
		< 1593600000 19 >;
	qcom,cbf-speedbin2-v0 =
		<          0  0 >,
		<  192000000  1 >,
		<  307200000  2 >,
		<  384000000  3 >,
		<  441600000  4 >,
		<  537600000  5 >,
		<  614400000  6 >,
		<  691200000  7 >,
		<  768000000  8 >,
		<  844800000  9 >,
		<  902400000 10 >,
		<  979200000 11 >,
		< 1056000000 12 >,
		< 1132800000 13 >,
		< 1190400000 14 >,
		< 1286400000 15 >,
		< 1363200000 16 >,
		< 1440000000 17 >,
		< 1516800000 18 >,
		< 1593600000 19 >;
};

&clock_mmss {
	compatible = "qcom,mmsscc-8996-pro";
	reg = <0x8c0000 0xb00c>,
	      < 0x7013c 0x8 >;
	reg-names = "cc_base", "efuse";
};

&clock_gpu {
	compatible = "qcom,gpucc-8996-pro";
	qcom,gfxfreq-speedbin0 =
		<	   0  0  0 >,
		<  133000000  2  4 >,
		<  214000000  3  4 >,
		<  315000000  4  4 >,
		<  401800000  5  5 >,
		<  510000000  6  5 >,
		<  560000000  7  7 >,
		<  624000000  8  7 >,
		<  652800000  9  7 >;
	qcom,gfxfreq-mx-speedbin0 =
		<	   0  0 >,
		<  133000000  4 >,
		<  214000000  4 >,
		<  315000000  4 >,
		<  401800000  5 >,
		<  510000000  5 >,
		<  560000000  7 >,
		<  624000000  7 >,
		<  652800000  7 >;

	qcom,gfxfreq-speedbin1 =
		<	   0  0  0 >,
		<  133000000  2  4 >,
		<  214000000  3  4 >,
		<  315000000  4  4 >,
		<  401800000  5  5 >,
		<  510000000  6  5 >,
		<  560000000  7  7 >,
		<  624000000  8  7 >;
	qcom,gfxfreq-mx-speedbin1 =
		<	   0  0 >,
		<  133000000  4 >,
		<  214000000  4 >,
		<  315000000  4 >,
		<  401800000  5 >,
		<  510000000  5 >,
		<  560000000  7 >,
		<  624000000  7 >;
	qcom,gfxfreq-speedbin2 =
		<          0  0  0 >,
		<  133000000  2  4 >,
		<  214000000  3  4 >,
		<  315000000  4  4 >,
		<  401800000  5  5 >,
		<  510000000  6  5 >;
	qcom,gfxfreq-mx-speedbin2 =
		<          0  0 >,
		<  133000000  4 >,
		<  214000000  4 >,
		<  315000000  4 >,
		<  401800000  5 >,
		<  510000000  5 >;
};

&msm_cpufreq {
	qcom,cpufreq-table-0 =
		<  307200 >,
		<  384000 >,
		<  460800 >,
		<  537600 >,
		<  614400 >,
		<  691200 >,
		<  768000 >,
		<  844800 >,
		<  902400 >,
		<  979200 >,
		< 1056000 >,
		< 1132800 >,
		< 1209600 >,
		< 1286400 >,
		< 1363200 >,
		< 1440000 >,
		< 1516800 >,
		< 1593600 >,
		< 1996800 >,
		< 2188800 >;
	qcom,cpufreq-table-2 =
		<  307200 >,
		<  384000 >,
		<  460800 >,
		<  537600 >,
		<  614400 >,
		<  691200 >,
		<  748800 >,
		<  825600 >,
		<  902400 >,
		<  979200 >,
		< 1056000 >,
		< 1132800 >,
		< 1209600 >,
		< 1286400 >,
		< 1363200 >,
		< 1440000 >,
		< 1516800 >,
		< 1593600 >,
		< 1670400 >,
		< 1747200 >,
		< 1824000 >,
		< 1900800 >,
		< 1977600 >,
		< 2054400 >,
		< 2150400 >,
		< 2246400 >,
		< 2342400 >;
};

&m4m_cache {
	freq-tbl-khz =
		<  192000 >,
		<  307200 >,
		<  384000 >,
		<  441600 >,
		<  537600 >,
		<  614400 >,
		<  691200 >,
		<  768000 >,
		<  844800 >,
		<  902400 >,
		<  979200 >,
		< 1056000 >,
		< 1132800 >,
		< 1190400 >,
		< 1286400 >,
		< 1363200 >,
		< 1440000 >,
		< 1516800 >,
		< 1593600 >;
};

&devfreq_cpufreq {
	m4m-cpufreq {
		cpu-to-dev-map-0 =
			<  307200  192000 >,
			<  384000  192000 >,
			<  460800  192000 >,
			<  537600  192000 >,
			<  614400  192000 >,
			<  691200  307200 >,
			<  768000  307200 >,
			<  844800  384000 >,
			<  902400  441600 >,
			<  979200  537600 >,
			< 1056000  614400 >,
			< 1132800  691200 >,
			< 1209600  768000 >,
			< 1286400  844800 >,
			< 1363200  902400 >,
			< 1440000  979200 >,
			< 1516800 1132800 >,
			< 1593600 1190400 >,
			< 1996800 1516800 >,
			< 2188800 1593600 >;
		cpu-to-dev-map-2 =
			<  307200  192000 >,
			<  384000  192000 >,
			<  460800  192000 >,
			<  537600  192000 >,
			<  614400  192000 >,
			<  691200  307200 >,
			<  748800  307200 >,
			<  825600  384000 >,
			<  902400  441600 >,
			<  979200  441600 >,
			< 1056000  537600 >,
			< 1132800  614400 >,
			< 1209600  691200 >,
			< 1286400  768000 >,
			< 1363200  844800 >,
			< 1440000  902400 >,
			< 1516800  979200 >,
			< 1593600 1056000 >,
			< 1670400 1132800 >,
			< 1747200 1190400 >,
			< 1824000 1286400 >,
			< 1900800 1363200 >,
			< 1977600 1440000 >,
			< 2054400 1516800 >,
			< 2150400 1593600 >,
			< 2246400 1593600 >,
			< 2342400 1593600 >;
	};

	mincpubw-cpufreq {
		cpu-to-dev-map-0 =
			< 1593600 1525 >;
		cpu-to-dev-map-2 =
			< 2054400 1525 >,
			< 2150400 5195 >;
	};
};

&soc {
	qcom,msm-thermal {
		qcom,poll-ms = <50>;
		qcom,limit-temp = <80>;
		qcom,core-limit-temp = <90>;
		msm_thermal_freq: qcom,vdd-apps-rstr {
			qcom,max-freq-level = <1209600>;
			qcom,levels = <1056000 1516800 1516800>;
		};
		qcom,vdd-gfx-rstr{
			qcom,levels = <6 8 9>; /* Nominal, Turbo, Turbo_L1 */
		};
	};
};

/* GPU overrides */
&msm_gpu {
	/* Updated chip ID */
	qcom,chipid = <0x05030004>;

	/delete-property/ qcom,gpu-quirk-critical-packets;

	qcom,gpu-speed-bin = <0x413c 0x30000000 28>;

	qcom,gpu-pwrlevel-bins {
		#address-cells = <1>;
		#size-cells = <0>;

		compatible="qcom,gpu-pwrlevel-bins";

		qcom,gpu-pwrlevels-0 {
			#address-cells = <1>;
			#size-cells = <0>;

			qcom,speed-bin = <0>;

			qcom,initial-pwrlevel = <6>;

			qcom,gpu-pwrlevel@0 {
				reg = <0>;
				qcom,gpu-freq = <652800000>;
				qcom,bus-freq = <12>;
				qcom,bus-min = <12>;
				qcom,bus-max = <12>;
			};

			qcom,gpu-pwrlevel@1 {
				reg = <1>;
				qcom,gpu-freq = <624000000>;
				qcom,bus-freq = <12>;
				qcom,bus-min = <11>;
				qcom,bus-max = <12>;
			};

			qcom,gpu-pwrlevel@2 {
				reg = <2>;
				qcom,gpu-freq = <560000000>;
				qcom,bus-freq = <11>;
				qcom,bus-min = <9>;
				qcom,bus-max = <12>;
			};

			qcom,gpu-pwrlevel@3 {
				reg = <3>;
				qcom,gpu-freq = <510000000>;
				qcom,bus-freq = <9>;
				qcom,bus-min = <8>;
				qcom,bus-max = <11>;
			};

			qcom,gpu-pwrlevel@4 {
				reg = <4>;
				qcom,gpu-freq = <401800000>;
				qcom,bus-freq = <8>;
				qcom,bus-min = <7>;
				qcom,bus-max = <9>;
			};

			qcom,gpu-pwrlevel@5 {
				reg = <5>;
				qcom,gpu-freq = <315000000>;
				qcom,bus-freq = <6>;
				qcom,bus-min = <5>;
				qcom,bus-max = <7>;
			};

			qcom,gpu-pwrlevel@6 {
				reg = <6>;
				qcom,gpu-freq = <214000000>;
				qcom,bus-freq = <4>;
				qcom,bus-min = <3>;
				qcom,bus-max = <5>;
			};

			qcom,gpu-pwrlevel@7 {
				reg = <7>;
				qcom,gpu-freq = <133000000>;
				qcom,bus-freq = <3>;
				qcom,bus-min = <2>;
				qcom,bus-max = <4>;
			};

			qcom,gpu-pwrlevel@8 {
				reg = <8>;
				qcom,gpu-freq = <27000000>;
				qcom,bus-freq = <0>;
				qcom,bus-min = <0>;
				qcom,bus-max = <0>;
			};
		};

		qcom,gpu-pwrlevels-1 {
			#address-cells = <1>;
			#size-cells = <0>;

			qcom,speed-bin = <1>;

			qcom,initial-pwrlevel = <5>;

			qcom,gpu-pwrlevel@0 {
				reg = <0>;
				qcom,gpu-freq = <624000000>;
				qcom,bus-freq = <12>;
				qcom,bus-min = <11>;
				qcom,bus-max = <12>;
			};

			qcom,gpu-pwrlevel@1 {
				reg = <1>;
				qcom,gpu-freq = <560000000>;
				qcom,bus-freq = <11>;
				qcom,bus-min = <9>;
				qcom,bus-max = <12>;
			};

			qcom,gpu-pwrlevel@2 {
				reg = <2>;
				qcom,gpu-freq = <510000000>;
				qcom,bus-freq = <9>;
				qcom,bus-min = <8>;
				qcom,bus-max = <11>;
			};

			qcom,gpu-pwrlevel@3 {
				reg = <3>;
				qcom,gpu-freq = <401800000>;
				qcom,bus-freq = <8>;
				qcom,bus-min = <7>;
				qcom,bus-max = <9>;
			};

			qcom,gpu-pwrlevel@4 {
				reg = <4>;
				qcom,gpu-freq = <315000000>;
				qcom,bus-freq = <6>;
				qcom,bus-min = <5>;
				qcom,bus-max = <7>;
			};

			qcom,gpu-pwrlevel@5 {
				reg = <5>;
				qcom,gpu-freq = <214000000>;
				qcom,bus-freq = <4>;
				qcom,bus-min = <3>;
				qcom,bus-max = <5>;
			};

			qcom,gpu-pwrlevel@6 {
				reg = <6>;
				qcom,gpu-freq = <133000000>;
				qcom,bus-freq = <3>;
				qcom,bus-min = <2>;
				qcom,bus-max = <4>;
			};

			qcom,gpu-pwrlevel@7 {
				reg = <7>;
				qcom,gpu-freq = <27000000>;
				qcom,bus-freq = <0>;
				qcom,bus-min = <0>;
				qcom,bus-max = <0>;
			};
		};

		qcom,gpu-pwrlevels-2 {
			#address-cells = <1>;
			#size-cells = <0>;

			qcom,speed-bin = <2>;

			qcom,initial-pwrlevel = <3>;

			qcom,gpu-pwrlevel@0 {
				reg = <0>;
				qcom,gpu-freq = <510000000>;
				qcom,bus-freq = <11>;
				qcom,bus-min = <11>;
				qcom,bus-max = <11>;
			};

			qcom,gpu-pwrlevel@1 {
				reg = <1>;
				qcom,gpu-freq = <401800000>;
				qcom,bus-freq = <8>;
				qcom,bus-min = <7>;
				qcom,bus-max = <9>;
			};

			qcom,gpu-pwrlevel@2 {
				reg = <2>;
				qcom,gpu-freq = <315000000>;
				qcom,bus-freq = <6>;
				qcom,bus-min = <5>;
				qcom,bus-max = <7>;
			};

			qcom,gpu-pwrlevel@3 {
				reg = <3>;
				qcom,gpu-freq = <214000000>;
				qcom,bus-freq = <4>;
				qcom,bus-min = <3>;
				qcom,bus-max = <5>;
			};

			qcom,gpu-pwrlevel@4 {
				reg = <4>;
				qcom,gpu-freq = <133000000>;
				qcom,bus-freq = <3>;
				qcom,bus-min = <2>;
				qcom,bus-max = <4>;
			};

			qcom,gpu-pwrlevel@5 {
				reg = <5>;
				qcom,gpu-freq = <27000000>;
				qcom,bus-freq = <0>;
				qcom,bus-min = <0>;
				qcom,bus-max = <0>;
			};
		};
	};
};

&qusb_phy0 {
	qcom,qusb-phy-init-seq = <0xD0 0x80
				0xB3 0x84
				0x83 0x88
				0xC0 0x8C
				0x02 0x90
				0x30 0x08
				0x79 0x0C
				0x21 0x10
				0x14 0x9C
				0x9F 0x1C
				0x00 0x18>;
};

&qusb_phy1 {
	qcom,qusb-phy-init-seq = <0xD0 0x80
				0xB3 0x84
				0x83 0x88
				0xC0 0x8C
				0x02 0x90
				0x30 0x08
				0x79 0x0C
				0x21 0x10
				0x14 0x9C
				0x9F 0x1C
				0x00 0x18>;
};
