Loading Documentation/devicetree/bindings/arm/msm/msm_thermal.txt +7 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,12 @@ Optional child nodes qcom,mx-restriction-temp and qcom,mx-restriction-temp-hysteresis should also be present. Also, if this property is defined, will have to define vdd-cx-supply = <&phandle_of_regulator>. - qcom,mx-restriction-sensor_id: sensor id, which needs to be monitored for requesting MX/CX retention voltage. If this optional property is defined, msm_thermal will monitor only this sensor, otherwise by default it will monitor all TSENS for this feature. If this property exists, then the properties, qcom,mx-restriction-temp, qcom,mx-restriction-temp-hysteresis and qcom,mx-retention-min should also be defined to enable this feature. - qcom,therm-reset-temp: Degree above which the KTM will initiate a secure watchdog reset. When this property is defined, KTM will monitor all the tsens from boot time and will initiate a secure watchdog reset if any of the Loading Loading @@ -269,6 +275,7 @@ Example: qcom,mx-restriction-temp = <5>; qcom,mx-restriction-temp-hysteresis = <10>; qcom,mx-retention-min = <710000>; qcom,mx-restriction-sensor_id = <2>; vdd-mx-supply = <&pma8084_s1>; qcom,cx-retention-min = <RPM_SMD_REGULATOR_LEVEL_RETENTION_PLUS>; vdd-cx-supply = <&pmd9635_s5_level>; Loading drivers/thermal/msm_thermal.c +11 −1 Original line number Diff line number Diff line Loading @@ -5791,6 +5791,13 @@ static int probe_vdd_mx(struct device_node *node, if (ret) goto read_node_done; /* * Monitor only this sensor if defined, otherwise monitor all tsens */ key = "qcom,mx-restriction-sensor_id"; if (of_property_read_u32(node, key, &data->vdd_mx_sensor_id)) data->vdd_mx_sensor_id = MONITOR_ALL_TSENS; vdd_mx = devm_regulator_get(&pdev->dev, "vdd-mx"); if (IS_ERR_OR_NULL(vdd_mx)) { ret = PTR_ERR(vdd_mx); Loading @@ -5817,7 +5824,7 @@ static int probe_vdd_mx(struct device_node *node, } ret = sensor_mgr_init_threshold(&thresh[MSM_VDD_MX_RESTRICTION], MONITOR_ALL_TSENS, data->vdd_mx_sensor_id, data->vdd_mx_temp_degC + data->vdd_mx_temp_hyst_degC, data->vdd_mx_temp_degC, vdd_mx_notify); Loading Loading @@ -6756,6 +6763,9 @@ static void thermal_mx_config_read(struct seq_file *m, void *data) if (vdd_cx) seq_printf(m, "cx retention value:%d\n", msm_thermal_info.vdd_cx_min); if (msm_thermal_info.vdd_mx_sensor_id != MONITOR_ALL_TSENS) seq_printf(m, "tsens sensor:tsens_tz_sensor%d\n", msm_thermal_info.vdd_mx_sensor_id); } } Loading include/linux/msm_thermal.h +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ struct msm_thermal_data { int32_t cx_phase_request_key; int32_t vdd_mx_temp_degC; int32_t vdd_mx_temp_hyst_degC; int32_t vdd_mx_sensor_id; int32_t therm_reset_temp_degC; }; Loading Loading
Documentation/devicetree/bindings/arm/msm/msm_thermal.txt +7 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,12 @@ Optional child nodes qcom,mx-restriction-temp and qcom,mx-restriction-temp-hysteresis should also be present. Also, if this property is defined, will have to define vdd-cx-supply = <&phandle_of_regulator>. - qcom,mx-restriction-sensor_id: sensor id, which needs to be monitored for requesting MX/CX retention voltage. If this optional property is defined, msm_thermal will monitor only this sensor, otherwise by default it will monitor all TSENS for this feature. If this property exists, then the properties, qcom,mx-restriction-temp, qcom,mx-restriction-temp-hysteresis and qcom,mx-retention-min should also be defined to enable this feature. - qcom,therm-reset-temp: Degree above which the KTM will initiate a secure watchdog reset. When this property is defined, KTM will monitor all the tsens from boot time and will initiate a secure watchdog reset if any of the Loading Loading @@ -269,6 +275,7 @@ Example: qcom,mx-restriction-temp = <5>; qcom,mx-restriction-temp-hysteresis = <10>; qcom,mx-retention-min = <710000>; qcom,mx-restriction-sensor_id = <2>; vdd-mx-supply = <&pma8084_s1>; qcom,cx-retention-min = <RPM_SMD_REGULATOR_LEVEL_RETENTION_PLUS>; vdd-cx-supply = <&pmd9635_s5_level>; Loading
drivers/thermal/msm_thermal.c +11 −1 Original line number Diff line number Diff line Loading @@ -5791,6 +5791,13 @@ static int probe_vdd_mx(struct device_node *node, if (ret) goto read_node_done; /* * Monitor only this sensor if defined, otherwise monitor all tsens */ key = "qcom,mx-restriction-sensor_id"; if (of_property_read_u32(node, key, &data->vdd_mx_sensor_id)) data->vdd_mx_sensor_id = MONITOR_ALL_TSENS; vdd_mx = devm_regulator_get(&pdev->dev, "vdd-mx"); if (IS_ERR_OR_NULL(vdd_mx)) { ret = PTR_ERR(vdd_mx); Loading @@ -5817,7 +5824,7 @@ static int probe_vdd_mx(struct device_node *node, } ret = sensor_mgr_init_threshold(&thresh[MSM_VDD_MX_RESTRICTION], MONITOR_ALL_TSENS, data->vdd_mx_sensor_id, data->vdd_mx_temp_degC + data->vdd_mx_temp_hyst_degC, data->vdd_mx_temp_degC, vdd_mx_notify); Loading Loading @@ -6756,6 +6763,9 @@ static void thermal_mx_config_read(struct seq_file *m, void *data) if (vdd_cx) seq_printf(m, "cx retention value:%d\n", msm_thermal_info.vdd_cx_min); if (msm_thermal_info.vdd_mx_sensor_id != MONITOR_ALL_TSENS) seq_printf(m, "tsens sensor:tsens_tz_sensor%d\n", msm_thermal_info.vdd_mx_sensor_id); } } Loading
include/linux/msm_thermal.h +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ struct msm_thermal_data { int32_t cx_phase_request_key; int32_t vdd_mx_temp_degC; int32_t vdd_mx_temp_hyst_degC; int32_t vdd_mx_sensor_id; int32_t therm_reset_temp_degC; }; Loading