#include "pm8150.dtsi"

&pm8150_vadc {
	xo_therm {
		reg = <ADC5_XO_THERM_100K_PU>;
		label = "xo_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <1>;
		qcom,pre-scaling = <1 1>;
	};

	amux_therm1 {
		reg = <ADC5_AMUX_THM1_100K_PU>;
		label = "amux_therm1";
		qcom,ratiometric;
		qcom,hw-settle-time = <1>;
		qcom,pre-scaling = <1 1>;
	};
};

&pm8150_adc_tm {
	xo_therm {
		reg = <0>;
		io-channels = <&pm8150_vadc ADC5_XO_THERM_100K_PU>;
		qcom,ratiometric;
		qcom,hw-settle-time = <1>;
	};

	amux_therm1 {
		reg = <1>;
		io-channels = <&pm8150_vadc ADC5_AMUX_THM1_100K_PU>;
		qcom,ratiometric;
		qcom,hw-settle-time = <1>;
	};
};

&thermal_zones {
	sys-therm-0 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8150_adc_tm 0>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			active-config1 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	sys_therm-1 {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8150_adc_tm 1>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			active-config1 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};

&soc {
	reboot_reason {
		compatible = "qcom,reboot-reason";
		nvmem-cells = <&restart_reason>;
		nvmem-cell-names = "restart_reason";
	};
};

&pm8150_gpios {
	usb_vbus_det {
		usb_vbus_det_default: usb_vbus_det_default {
			pins = "gpio7";
			function = "normal";
			input-enable;
			bias-pull-up;
			power-source = <0>;
		};
	};
};
