From: Eunseok Choi Date: Wed, 10 May 2017 12:15:29 +0000 (+0900) Subject: [9810] thermal: samsung: modify TMU calibration for NZVYT lot X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1bb38121e2e3af1527441ead6f80bbade993c7c2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [9810] thermal: samsung: modify TMU calibration for NZVYT lot Change-Id: I3b54e21a15b3fd9c5454e2e5c1ee08556f7f8667 Signed-off-by: Eunseok Choi --- diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index fc0a01e8956e..81ed6cebe47e 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_EXYNOS_MCINFO @@ -954,6 +955,7 @@ static void exynos78XX_tmu_control(struct platform_device *pdev, bool on) static int exynos9810_tmu_initialize(struct platform_device *pdev) { +#define NZVYT_LOTID 0x152633 struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; struct exynos_tmu_platform_data *pdata = data->pdata; @@ -968,6 +970,9 @@ static int exynos9810_tmu_initialize(struct platform_device *pdev) trim_info = readl(data->base + EXYNOS_TMU_REG_TRIMINFO(0)); cal_type = (trim_info >> EXYNOS_TMU_CALIB_SEL_SHIFT) & EXYNOS_TMU_CALIB_SEL_MASK; + if (exynos_soc_info.lot_id == NZVYT_LOTID) + cal_type = TYPE_ONE_POINT_TRIMMING; + for (sensor = 0; sensor < TOTAL_SENSORS; sensor++) { if (!(data->sensors & (1 << sensor))) @@ -978,6 +983,9 @@ static int exynos9810_tmu_initialize(struct platform_device *pdev) temp_error1 = trim_info & EXYNOS_TMU_TEMP_MASK; temp_error2 = (trim_info >> EXYNOS_TMU_TRIMINFO_85_P0_SHIFT) & EXYNOS_TMU_TEMP_MASK; + if (exynos_soc_info.lot_id == NZVYT_LOTID) + temp_error1 = (temp_error1 >> 3) | 0x100; + /* Save sensor id */ data->sensor_info[count].sensor_num = sensor; dev_info(&pdev->dev, "Sensor number = %d\n", sensor);