// SPDX-License-Identifier: GPL-2.0-only

#include <dt-bindings/thermal/thermal.h>
#include "ipq8074-cpr-regulator.dtsi"

&cpu0 {
	cpu-supply = <&apc_vreg>;
	voltage-tolerance = <1>;
};

&cpu1 {
	cpu-supply = <&apc_vreg>;
	voltage-tolerance = <1>;
};

&cpu2 {
	cpu-supply = <&apc_vreg>;
	voltage-tolerance = <1>;
};

&cpu3 {
	cpu-supply = <&apc_vreg>;
	voltage-tolerance = <1>;
};

&cpu0_thermal {
	trips {
		cpu0_passive: cpu-passive {
			temperature = <95000>;
			hysteresis = <2000>;
			type = "passive";
		};
	};

	cooling-maps {
		map0 {
			trip = <&cpu0_passive>;
			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
		};
	};
};

&cpu1_thermal {
	trips {
		cpu1_passive: cpu-passive {
			temperature = <95000>;
			hysteresis = <2000>;
			type = "passive";
		};
	};

	cooling-maps {
		map0 {
			trip = <&cpu1_passive>;
			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
		};
	};
};

&cpu2_thermal {
	trips {
		cpu2_passive: cpu-passive {
			temperature = <95000>;
			hysteresis = <2000>;
			type = "passive";
		};
	};

	cooling-maps {
		map0 {
			trip = <&cpu2_passive>;
			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
		};
	};
};

&cpu3_thermal {
	trips {
		cpu3_passive: cpu-passive {
			temperature = <95000>;
			hysteresis = <2000>;
			type = "passive";
		};
	};

	cooling-maps {
		map0 {
			trip = <&cpu3_passive>;
			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
		};
	};
};

&cluster_thermal {
	trips {
		cluster_passive: cluster-passive {
			temperature = <95000>;
			hysteresis = <2000>;
			type = "passive";
		};
	};

	cooling-maps {
		map0 {
			trip = <&cluster_passive>;
			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
					 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
		};
	};
};
