diff mbox

[4/5] thermal: exynos: fixed the efuse min/max value for exynos5422

Message ID 1531822342-4293-4-git-send-email-linux.amoon@gmail.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Anand Moon July 17, 2018, 10:12 a.m. UTC
e-fuse range min~max range is 16~76. if e-fuse value is out of
this range, then thermal sensor may not sense thermal data properly.

CC: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Krzysztof Kozlowski July 17, 2018, 12:28 p.m. UTC | #1
On 17 July 2018 at 12:12, Anand Moon <linux.amoon@gmail.com> wrote:
> e-fuse range min~max range is 16~76. if e-fuse value is out of

s/e-fuse/Fuse/
s/if/If/

Can you share the sources confirming that fuse values are between 16 and 76?

Best regards,
Krzysztof

> this range, then thermal sensor may not sense thermal data properly.
>
> CC: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  drivers/thermal/samsung/exynos_tmu.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> index 4a2733c..6481d91 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -940,11 +940,13 @@ static int exynos_map_dt_data(struct platform_device *pdev)
>                 data->reference_voltage = 16;
>                 data->efuse_value = 55;
>                 if (data->soc != SOC_ARCH_EXYNOS5420 &&
> -                   data->soc != SOC_ARCH_EXYNOS5420_TRIMINFO)
> +                   data->soc != SOC_ARCH_EXYNOS5420_TRIMINFO) {
> +                       data->min_efuse_value = 16;
> +                       data->max_efuse_value = 76;
> +               } else {
>                         data->min_efuse_value = 40;
> -               else
> -                       data->min_efuse_value = 0;
> -               data->max_efuse_value = 100;
> +                       data->max_efuse_value = 100;
> +               }
>                 break;
>         case SOC_ARCH_EXYNOS5433:
>                 data->tmu_set_trip_temp = exynos5433_tmu_set_trip_temp;
> --
> 2.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Anand Moon July 17, 2018, 7:58 p.m. UTC | #2
Hi Krzysztof,

On 17 July 2018 at 17:58, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On 17 July 2018 at 12:12, Anand Moon <linux.amoon@gmail.com> wrote:
>> e-fuse range min~max range is 16~76. if e-fuse value is out of
>
> s/e-fuse/Fuse/
> s/if/If/
>
> Can you share the sources confirming that fuse values are between 16 and 76?
>
Below is my patch :
https://github.com/hardkernel/linux/commit/52c4c9b295930bc53b215d38e274aeb0780917f1

e-Fuse range min/max values are from exynos5422 user manual.

Best Regards
-Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krzysztof Kozlowski July 17, 2018, 8:07 p.m. UTC | #3
On 17 July 2018 at 21:58, Anand Moon <linux.amoon@gmail.com> wrote:
> Hi Krzysztof,
>
> On 17 July 2018 at 17:58, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> On 17 July 2018 at 12:12, Anand Moon <linux.amoon@gmail.com> wrote:
>>> e-fuse range min~max range is 16~76. if e-fuse value is out of
>>
>> s/e-fuse/Fuse/
>> s/if/If/
>>
>> Can you share the sources confirming that fuse values are between 16 and 76?
>>
> Below is my patch :
> https://github.com/hardkernel/linux/commit/52c4c9b295930bc53b215d38e274aeb0780917f1
>
> e-Fuse range min/max values are from exynos5422 user manual.

Indeed. Can you mention in commit msg, User Manual as the reference of this?

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 4a2733c..6481d91 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -940,11 +940,13 @@  static int exynos_map_dt_data(struct platform_device *pdev)
 		data->reference_voltage = 16;
 		data->efuse_value = 55;
 		if (data->soc != SOC_ARCH_EXYNOS5420 &&
-		    data->soc != SOC_ARCH_EXYNOS5420_TRIMINFO)
+		    data->soc != SOC_ARCH_EXYNOS5420_TRIMINFO) {
+			data->min_efuse_value = 16;
+			data->max_efuse_value = 76;
+		} else {
 			data->min_efuse_value = 40;
-		else
-			data->min_efuse_value = 0;
-		data->max_efuse_value = 100;
+			data->max_efuse_value = 100;
+		}
 		break;
 	case SOC_ARCH_EXYNOS5433:
 		data->tmu_set_trip_temp = exynos5433_tmu_set_trip_temp;