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

&mdss_mdp {
	#cooling-cells = <2>;
};

&thermal_zones {
	pm8150b-bcl-lvl0 {
		cooling-maps {
			vbat_cpu4 {
				trip = <&b_bcl_lvl0>;
				cooling-device = <&cpu4_isolate 1 1>;
			};

			vbat_cpu5 {
				trip = <&b_bcl_lvl0>;
				cooling-device = <&cpu5_isolate 1 1>;
			};

			vbat_gpu0 {
				trip = <&b_bcl_lvl0>;
				cooling-device = <&msm_gpu 2 2>;
			};
		};
	};

	pm8150b-bcl-lvl1 {
		cooling-maps {
			vbat_cpu6 {
				trip = <&b_bcl_lvl1>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vbat_cpu7 {
				trip = <&b_bcl_lvl1>;
				cooling-device = <&cpu7_isolate 1 1>;
			};

			vbat_gpu1 {
				trip = <&b_bcl_lvl1>;
				cooling-device = <&msm_gpu 4 4>;
			};
		};
	};

	pm8150b-bcl-lvl2 {
		cooling-maps {
			vbat_gpu2 {
				trip = <&b_bcl_lvl2>;
				cooling-device = <&msm_gpu THERMAL_MAX_LIMIT
							THERMAL_MAX_LIMIT>;
			};
		};
	};

	pm8150l-bcl-lvl0 {
		disable-thermal-zone;
		cooling-maps {
			vph_cpu4 {
				trip = <&l_bcl_lvl0>;
				cooling-device = <&cpu4_isolate 1 1>;
			};

			vph_cpu5 {
				trip = <&l_bcl_lvl0>;
				cooling-device = <&cpu5_isolate 1 1>;
			};

			vph_gpu0 {
				trip = <&l_bcl_lvl0>;
				cooling-device = <&msm_gpu 2 2>;
			};
		};
	};

	pm8150l-bcl-lvl1 {
		disable-thermal-zone;
		cooling-maps {
			vph_cpu6 {
				trip = <&l_bcl_lvl1>;
				cooling-device = <&cpu6_isolate 1 1>;
			};

			vph_cpu7 {
				trip = <&l_bcl_lvl1>;
				cooling-device = <&cpu7_isolate 1 1>;
			};

			vph_gpu1 {
				trip = <&l_bcl_lvl1>;
				cooling-device = <&msm_gpu 4 4>;
			};
		};
	};

	pm8150l-bcl-lvl2 {
		disable-thermal-zone;
		cooling-maps {
			vph_gpu2 {
				trip = <&l_bcl_lvl2>;
				cooling-device = <&msm_gpu THERMAL_MAX_LIMIT
							THERMAL_MAX_LIMIT>;
			};
		};
	};

    //#ifdef OPLUS_FEATURE_THERMAL
    skin-msm-therm-usr {
        polling-delay-passive = <0>;
        polling-delay = <0>;
        thermal-governor = "user_space";
        thermal-sensors = <&pm8150l_adc_tm ADC_AMUX_THM2_PU2>;
        wake-capable-sensor;
        trips {
            active-config0 {
                temperature = <125000>;
                hysteresis = <1000>;
                type = "passive";
            };
            active-config1 {
                temperature = <125000>;
                hysteresis = <1000>;
                type = "passive";
            };
        };
    };
    //#endif

    //#ifdef OPLUS_FEATURE_THERMAL
    cpu-gold-0-0-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 7>;
        thermal-governor = "step_wise";
        trips {
            cg00_config: cg00-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg00_cdev {
                trip = <&cg00_config>;
                cooling-device = <&CPU4 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
        };
    };

    cpu-gold-0-1-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 8>;
        thermal-governor = "step_wise";
        trips {
            cg01_config: cg01-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg01_cdev {
                trip = <&cg01_config>;
                cooling-device = <&CPU4 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
        };
    };

    cpu-gold-1-0-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 9>;
        thermal-governor = "step_wise";
        trips {
            cg10_config: cg10-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg10_cdev {
                trip = <&cg10_config>;
                cooling-device = <&CPU5 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
        };
    };

    cpu-gold-1-1-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 10>;
        thermal-governor = "step_wise";
        trips {
            cg11_config: cg11-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg11_cdev {
                trip = <&cg11_config>;
                cooling-device = <&CPU4 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
        };
    };

    cpu-gold-2-0-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 11>;
        thermal-governor = "step_wise";
        trips {
            cg20_config: cg20-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg20_cdev {
                trip = <&cg20_config>;
                cooling-device = <&CPU4 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
        };
    };

    cpu-gold-2-1-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 12>;
        thermal-governor = "step_wise";
        trips {
            cg21_config: cg21-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg21_cdev {
                trip = <&cg21_config>;
                cooling-device = <&CPU4 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
        };
    };

    cpu-gold-3-0-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 13>;
        thermal-governor = "step_wise";
        trips {
            cg30_config: cg30-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg30_cdev {
                trip = <&cg30_config>;
                cooling-device = <&CPU7 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
        };
    };

    cpu-gold-3-1-step {
        polling-delay-passive = <10>;
        polling-delay = <0>;
        thermal-sensors = <&tsens0 14>;
        thermal-governor = "step_wise";
        trips {
            cg31_config: cg31-config {
                temperature = <85000>;
                hysteresis = <3000>;
                type = "passive";
            };
        };

        cooling-maps {
            cg31_cdev {
                trip = <&cg31_config>;
                cooling-device = <&CPU7 THERMAL_NO_LIMIT
                            (THERMAL_MAX_LIMIT - 8)>;
            };
    };
};
    //#endif OPLUS_FEATURE_THERMAL
};
