#include "pm8775.dtsi"

&pm8775_1 {
	/delete-node/ pon_pbs@800;
	/delete-node/ pon_hlos@1200;

	pon_hlos@1200 {
		compatible = "qcom,pm8998-pon";
		reg = <0x1200>, <0x800>;
		reg-names = "pon_hlos", "pon_pbs";

		pwrkey {
			compatible = "qcom,pmk8350-pwrkey";
			interrupts = <0x0 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_POWER>;
		};

		resin {
			compatible = "qcom,pmk8350-resin";
			interrupts = <0x0 0x12 0x6 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_VOLUMEDOWN>;
		};
	};
};

&pm8775_2 {
	/delete-node/ pon_pbs@800;
	/delete-node/ pon_hlos@1200;

	pon_hlos@1200 {
		compatible = "qcom,pm8998-pon";
		reg = <0x1200>, <0x800>;
		reg-names = "pon_hlos", "pon_pbs";

		pwrkey {
			compatible = "qcom,pmk8350-pwrkey";
			interrupts = <0x2 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_POWER>;
		};

		resin {
			compatible = "qcom,pmk8350-resin";
			interrupts = <0x2 0x12 0x6 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_VOLUMEDOWN>;
		};
	};
};

&pm8775_3 {
	/delete-node/ pon_pbs@800;
	/delete-node/ pon_hlos@1200;

	pon_hlos@1200 {
		compatible = "qcom,pm8998-pon";
		reg = <0x1200>, <0x800>;
		reg-names = "pon_hlos", "pon_pbs";

		pwrkey {
			compatible = "qcom,pmk8350-pwrkey";
			interrupts = <0x4 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_POWER>;
		};

		resin {
			compatible = "qcom,pmk8350-resin";
			interrupts = <0x4 0x12 0x6 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_VOLUMEDOWN>;
		};
	};
};

&pm8775_4 {
	/delete-node/ pon_pbs@800;
	/delete-node/ pon_hlos@1200;

	pon_hlos@1200 {
		compatible = "qcom,pm8998-pon";
		reg = <0x1200>, <0x800>;
		reg-names = "pon_hlos", "pon_pbs";

		pwrkey {
			compatible = "qcom,pmk8350-pwrkey";
			interrupts = <0x6 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_POWER>;
		};

		resin {
			compatible = "qcom,pmk8350-resin";
			interrupts = <0x6 0x12 0x6 IRQ_TYPE_EDGE_BOTH>;
			linux,code = <KEY_VOLUMEDOWN>;
		};
	};
};

&soc {
	pmic-pon-log {
		compatible = "qcom,pmic-pon-log";
		nvmem = <&pm8775_1_sdam_5>;
		nvmem-names = "pon_log";
	};
};

&thermal_zones {
	pm8775_1_temp_alarm: pm8775_1_tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8775_1_tz>;

		trips {
			pm8775_1_trip0: trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_1_trip1: trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_1_trip2: trip2 {
				temperature = <155000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};

	pm8775_2_temp_alarm: pm8775_2_tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8775_2_tz>;

		trips {
			pm8775_2_trip0: trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_2_trip1: trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_2_trip2: trip2 {
				temperature = <155000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};

	pm8775_3_temp_alarm: pm8775_3_tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8775_3_tz>;

		trips {
			pm8775_3_trip0: trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_3_trip1: trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_3_trip2: trip2 {
				temperature = <155000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};

	pm8775_4_temp_alarm: pm8775_4_tz {
		polling-delay-passive = <100>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8775_4_tz>;

		trips {
			pm8775_4_trip0: trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_4_trip1: trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};

			pm8775_4_trip2: trip2 {
				temperature = <155000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};
};
