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

&soc {
	qmi-tmd-devices {
		compatible = "qcom,qmi-cooling-devices";

		modem {
			qcom,instance-id = <QMI_MODEM_INST_ID>;

			modem_lte_dsc: modem_lte_dsc {
				qcom,qmi-dev-name = "modem_lte_dsc";
				#cooling-cells = <2>;
			};

			modem_lte_sub1_dsc: modem_lte_sub1_dsc {
				qcom,qmi-dev-name = "modem_lte_sub1_dsc";
				#cooling-cells = <2>;
			};

			modem_nr_dsc: modem_nr_dsc {
				qcom,qmi-dev-name = "modem_nr_dsc";
				#cooling-cells = <2>;
			};

			modem_nr_sub1_dsc: modem_nr_sub1_dsc {
				qcom,qmi-dev-name = "modem_nr_sub1_dsc";
				#cooling-cells = <2>;
			};

			modem_nr_scg_dsc: modem_nr_scg_dsc {
				qcom,qmi-dev-name = "modem_nr_scg_dsc";
				#cooling-cells = <2>;
			};

			modem_nr_scg_sub1_dsc: modem_nr_scg_sub1_dsc {
				qcom,qmi-dev-name = "modem_nr_scg_sub1_dsc";
				#cooling-cells = <2>;
			};

			sdr0_lte_dsc: sdr0_lte_dsc {
				qcom,qmi-dev-name = "sdr0_lte_dsc";
				#cooling-cells = <2>;
			};

			sdr1_lte_dsc: sdr1_lte_dsc {
				qcom,qmi-dev-name = "sdr1_lte_dsc";
				#cooling-cells = <2>;
			};

			sdr0_nr_dsc: sdr0_nr_dsc {
				qcom,qmi-dev-name = "sdr0_nr_dsc";
				#cooling-cells = <2>;
			};

			sdr1_nr_dsc: sdr1_nr_dsc {
				qcom,qmi-dev-name = "sdr1_nr_dsc";
				#cooling-cells = <2>;
			};

			pa_lte_sdr0_dsc: pa_lte_sdr0_dsc {
				qcom,qmi-dev-name = "pa_lte_sdr0_dsc";
				#cooling-cells = <2>;
			};

			pa_lte_sdr1_dsc: pa_lte_sdr1_dsc {
				qcom,qmi-dev-name = "pa_lte_sdr1_dsc";
				#cooling-cells = <2>;
			};

			pa_lte_sdr0_sub1_dsc: pa_lte_sdr0_sub1_dsc {
				qcom,qmi-dev-name = "pa_lte_sdr0_sub1_dsc";
				#cooling-cells = <2>;
			};

			pa_lte_sdr1_sub1_dsc: pa_lte_sdr1_sub1_dsc {
				qcom,qmi-dev-name = "pa_lte_sdr1_sub1_dsc";
				#cooling-cells = <2>;
			};

			pa_nr_sdr0_dsc: pa_nr_sdr0_dsc {
				qcom,qmi-dev-name = "pa_nr_sdr0_dsc";
				#cooling-cells = <2>;
			};

			pa_nr_sdr1_dsc: pa_nr_sdr1_dsc {
				qcom,qmi-dev-name = "pa_nr_sdr1_dsc";
				#cooling-cells = <2>;
			};

			pa_nr_sdr0_sub1_dsc: pa_nr_sdr0_sub1_dsc {
				qcom,qmi-dev-name = "pa_nr_sdr0_sub1_dsc";
				#cooling-cells = <2>;
			};

			pa_nr_sdr1_sub1_dsc: pa_nr_sdr1_sub1_dsc {
				qcom,qmi-dev-name = "pa_nr_sdr1_sub1_dsc";
				#cooling-cells = <2>;
			};

			pa_nr_sdr0_scg_dsc: pa_nr_sdr0_scg {
				qcom,qmi-dev-name = "pa_nr_sdr0_scg_dsc";
				#cooling-cells = <2>;
			};

			pa_nr_sdr1_scg_dsc: pa_nr_sdr1_scg {
				qcom,qmi-dev-name = "pa_nr_sdr1_scg_dsc";
				#cooling-cells = <2>;
			};

			qmi_wlan: wlan {
				qcom,qmi-dev-name = "wlan";
				#cooling-cells = <2>;
			};

			modem_vdd: modem_vdd {
				qcom,qmi-dev-name = "cpuv_restriction_cold";
				#cooling-cells = <2>;
			};
		};
	};

	qmi_sensor: qmi-ts-sensors {
		compatible = "qcom,qmi-sensors";
		#thermal-sensor-cells = <1>;

		modem {
			qcom,instance-id = <QMI_MODEM_INST_ID>;
			qcom,qmi-sensor-names = "pa",
						"pa_1",
						"modem_bcl_warn",
						"modem_cfg",
						"lte_cc",
						"mcg_fr1_cc",
						"scg_fr1_cc",
						"sub1_modem_cfg",
						"sub1_lte_cc",
						"sub1_mcg_fr1_cc",
						"sub1_scg_fr1_cc",
						"sdr0_pa0",
						"sdr1_pa0",
						"sdr0",
						"sdr1";
		};
	};
};

&thermal_zones {
	pa {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_PA)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			thermal-hal-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pa1 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_PA_1)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			thermal-hal-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	bcl-warn {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_BCL_WARN)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			thermal-hal-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	modem-cfg {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_MODEM_CFG)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	lte-cc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_LTE_CC)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	mcg-fr1-cc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_MCG_FR1_CC)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	scg-fr1-cc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SCG_FR1_CC)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sub1-modem-cfg {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SUB1_MODEM_CFG)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sub1-lte-cc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SUB1_LTE_CC)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sub1_mcg_fr1_cc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SUB1_MCG_FR1_CC)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sub1_scg_fr1_cc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SUB1_SCG_FR1_CC)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sdr0-pa {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SDR0_PA)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			thermal-hal-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sdr1-pa {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SDR1_PA)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			thermal-hal-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sdr0 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SDR0)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			thermal-hal-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sdr1 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&qmi_sensor
				(QMI_MODEM_INST_ID+QMI_SDR1)>;
		trips {
			thermal-engine-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			thermal-hal-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};
