162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * OMAP5 thermal driver.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2011-2012 Texas Instruments Inc.
662306a36Sopenharmony_ci * Contact:
762306a36Sopenharmony_ci *	Eduardo Valentin <eduardo.valentin@ti.com>
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#include "ti-thermal.h"
1162306a36Sopenharmony_ci#include "ti-bandgap.h"
1262306a36Sopenharmony_ci#include "omap5xxx-bandgap.h"
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci/*
1562306a36Sopenharmony_ci * OMAP5430 has three instances of thermal sensor for MPU, GPU & CORE,
1662306a36Sopenharmony_ci * need to describe the individual registers and bit fields.
1762306a36Sopenharmony_ci */
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci/*
2062306a36Sopenharmony_ci * OMAP5430 MPU thermal sensor register offset and bit-fields
2162306a36Sopenharmony_ci */
2262306a36Sopenharmony_cistatic struct temp_sensor_registers
2362306a36Sopenharmony_ciomap5430_mpu_temp_sensor_registers = {
2462306a36Sopenharmony_ci	.temp_sensor_ctrl = OMAP5430_TEMP_SENSOR_MPU_OFFSET,
2562306a36Sopenharmony_ci	.bgap_tempsoff_mask = OMAP5430_BGAP_TEMPSOFF_MASK,
2662306a36Sopenharmony_ci	.bgap_eocz_mask = OMAP5430_BGAP_TEMP_SENSOR_EOCZ_MASK,
2762306a36Sopenharmony_ci	.bgap_dtemp_mask = OMAP5430_BGAP_TEMP_SENSOR_DTEMP_MASK,
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci	.bgap_mask_ctrl = OMAP5430_BGAP_CTRL_OFFSET,
3062306a36Sopenharmony_ci	.mask_hot_mask = OMAP5430_MASK_HOT_MPU_MASK,
3162306a36Sopenharmony_ci	.mask_cold_mask = OMAP5430_MASK_COLD_MPU_MASK,
3262306a36Sopenharmony_ci	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
3362306a36Sopenharmony_ci	.mask_freeze_mask = OMAP5430_MASK_FREEZE_MPU_MASK,
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
3662306a36Sopenharmony_ci	.counter_mask = OMAP5430_COUNTER_MASK,
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_MPU_OFFSET,
3962306a36Sopenharmony_ci	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
4062306a36Sopenharmony_ci	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci	.tshut_threshold = OMAP5430_BGAP_TSHUT_MPU_OFFSET,
4362306a36Sopenharmony_ci	.tshut_hot_mask = OMAP5430_TSHUT_HOT_MASK,
4462306a36Sopenharmony_ci	.tshut_cold_mask = OMAP5430_TSHUT_COLD_MASK,
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci	.bgap_status = OMAP5430_BGAP_STATUS_OFFSET,
4762306a36Sopenharmony_ci	.status_hot_mask = OMAP5430_HOT_MPU_FLAG_MASK,
4862306a36Sopenharmony_ci	.status_cold_mask = OMAP5430_COLD_MPU_FLAG_MASK,
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci	.ctrl_dtemp_1 = OMAP5430_BGAP_DTEMP_MPU_1_OFFSET,
5162306a36Sopenharmony_ci	.ctrl_dtemp_2 = OMAP5430_BGAP_DTEMP_MPU_2_OFFSET,
5262306a36Sopenharmony_ci	.bgap_efuse = OMAP5430_FUSE_OPP_BGAP_MPU,
5362306a36Sopenharmony_ci};
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci/*
5662306a36Sopenharmony_ci * OMAP5430 GPU thermal sensor register offset and bit-fields
5762306a36Sopenharmony_ci */
5862306a36Sopenharmony_cistatic struct temp_sensor_registers
5962306a36Sopenharmony_ciomap5430_gpu_temp_sensor_registers = {
6062306a36Sopenharmony_ci	.temp_sensor_ctrl = OMAP5430_TEMP_SENSOR_GPU_OFFSET,
6162306a36Sopenharmony_ci	.bgap_tempsoff_mask = OMAP5430_BGAP_TEMPSOFF_MASK,
6262306a36Sopenharmony_ci	.bgap_eocz_mask = OMAP5430_BGAP_TEMP_SENSOR_EOCZ_MASK,
6362306a36Sopenharmony_ci	.bgap_dtemp_mask = OMAP5430_BGAP_TEMP_SENSOR_DTEMP_MASK,
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci	.bgap_mask_ctrl = OMAP5430_BGAP_CTRL_OFFSET,
6662306a36Sopenharmony_ci	.mask_hot_mask = OMAP5430_MASK_HOT_GPU_MASK,
6762306a36Sopenharmony_ci	.mask_cold_mask = OMAP5430_MASK_COLD_GPU_MASK,
6862306a36Sopenharmony_ci	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
6962306a36Sopenharmony_ci	.mask_freeze_mask = OMAP5430_MASK_FREEZE_GPU_MASK,
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
7262306a36Sopenharmony_ci	.counter_mask = OMAP5430_COUNTER_MASK,
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_GPU_OFFSET,
7562306a36Sopenharmony_ci	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
7662306a36Sopenharmony_ci	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci	.tshut_threshold = OMAP5430_BGAP_TSHUT_GPU_OFFSET,
7962306a36Sopenharmony_ci	.tshut_hot_mask = OMAP5430_TSHUT_HOT_MASK,
8062306a36Sopenharmony_ci	.tshut_cold_mask = OMAP5430_TSHUT_COLD_MASK,
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci	.bgap_status = OMAP5430_BGAP_STATUS_OFFSET,
8362306a36Sopenharmony_ci	.status_hot_mask = OMAP5430_HOT_GPU_FLAG_MASK,
8462306a36Sopenharmony_ci	.status_cold_mask = OMAP5430_COLD_GPU_FLAG_MASK,
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci	.ctrl_dtemp_1 = OMAP5430_BGAP_DTEMP_GPU_1_OFFSET,
8762306a36Sopenharmony_ci	.ctrl_dtemp_2 = OMAP5430_BGAP_DTEMP_GPU_2_OFFSET,
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci	.bgap_efuse = OMAP5430_FUSE_OPP_BGAP_GPU,
9062306a36Sopenharmony_ci};
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ci/*
9362306a36Sopenharmony_ci * OMAP5430 CORE thermal sensor register offset and bit-fields
9462306a36Sopenharmony_ci */
9562306a36Sopenharmony_cistatic struct temp_sensor_registers
9662306a36Sopenharmony_ciomap5430_core_temp_sensor_registers = {
9762306a36Sopenharmony_ci	.temp_sensor_ctrl = OMAP5430_TEMP_SENSOR_CORE_OFFSET,
9862306a36Sopenharmony_ci	.bgap_tempsoff_mask = OMAP5430_BGAP_TEMPSOFF_MASK,
9962306a36Sopenharmony_ci	.bgap_eocz_mask = OMAP5430_BGAP_TEMP_SENSOR_EOCZ_MASK,
10062306a36Sopenharmony_ci	.bgap_dtemp_mask = OMAP5430_BGAP_TEMP_SENSOR_DTEMP_MASK,
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci	.bgap_mask_ctrl = OMAP5430_BGAP_CTRL_OFFSET,
10362306a36Sopenharmony_ci	.mask_hot_mask = OMAP5430_MASK_HOT_CORE_MASK,
10462306a36Sopenharmony_ci	.mask_cold_mask = OMAP5430_MASK_COLD_CORE_MASK,
10562306a36Sopenharmony_ci	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
10662306a36Sopenharmony_ci	.mask_freeze_mask = OMAP5430_MASK_FREEZE_CORE_MASK,
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
10962306a36Sopenharmony_ci	.counter_mask = OMAP5430_COUNTER_MASK,
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_CORE_OFFSET,
11262306a36Sopenharmony_ci	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
11362306a36Sopenharmony_ci	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci	.tshut_threshold = OMAP5430_BGAP_TSHUT_CORE_OFFSET,
11662306a36Sopenharmony_ci	.tshut_hot_mask = OMAP5430_TSHUT_HOT_MASK,
11762306a36Sopenharmony_ci	.tshut_cold_mask = OMAP5430_TSHUT_COLD_MASK,
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci	.bgap_status = OMAP5430_BGAP_STATUS_OFFSET,
12062306a36Sopenharmony_ci	.status_hot_mask = OMAP5430_HOT_CORE_FLAG_MASK,
12162306a36Sopenharmony_ci	.status_cold_mask = OMAP5430_COLD_CORE_FLAG_MASK,
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci	.ctrl_dtemp_1 = OMAP5430_BGAP_DTEMP_CORE_1_OFFSET,
12462306a36Sopenharmony_ci	.ctrl_dtemp_2 = OMAP5430_BGAP_DTEMP_CORE_2_OFFSET,
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci	.bgap_efuse = OMAP5430_FUSE_OPP_BGAP_CORE,
12762306a36Sopenharmony_ci};
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci/* Thresholds and limits for OMAP5430 MPU temperature sensor */
13062306a36Sopenharmony_cistatic struct temp_sensor_data omap5430_mpu_temp_sensor_data = {
13162306a36Sopenharmony_ci	.tshut_hot = OMAP5430_MPU_TSHUT_HOT,
13262306a36Sopenharmony_ci	.tshut_cold = OMAP5430_MPU_TSHUT_COLD,
13362306a36Sopenharmony_ci	.t_hot = OMAP5430_MPU_T_HOT,
13462306a36Sopenharmony_ci	.t_cold = OMAP5430_MPU_T_COLD,
13562306a36Sopenharmony_ci	.min_freq = OMAP5430_MPU_MIN_FREQ,
13662306a36Sopenharmony_ci	.max_freq = OMAP5430_MPU_MAX_FREQ,
13762306a36Sopenharmony_ci};
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci/* Thresholds and limits for OMAP5430 GPU temperature sensor */
14062306a36Sopenharmony_cistatic struct temp_sensor_data omap5430_gpu_temp_sensor_data = {
14162306a36Sopenharmony_ci	.tshut_hot = OMAP5430_GPU_TSHUT_HOT,
14262306a36Sopenharmony_ci	.tshut_cold = OMAP5430_GPU_TSHUT_COLD,
14362306a36Sopenharmony_ci	.t_hot = OMAP5430_GPU_T_HOT,
14462306a36Sopenharmony_ci	.t_cold = OMAP5430_GPU_T_COLD,
14562306a36Sopenharmony_ci	.min_freq = OMAP5430_GPU_MIN_FREQ,
14662306a36Sopenharmony_ci	.max_freq = OMAP5430_GPU_MAX_FREQ,
14762306a36Sopenharmony_ci};
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci/* Thresholds and limits for OMAP5430 CORE temperature sensor */
15062306a36Sopenharmony_cistatic struct temp_sensor_data omap5430_core_temp_sensor_data = {
15162306a36Sopenharmony_ci	.tshut_hot = OMAP5430_CORE_TSHUT_HOT,
15262306a36Sopenharmony_ci	.tshut_cold = OMAP5430_CORE_TSHUT_COLD,
15362306a36Sopenharmony_ci	.t_hot = OMAP5430_CORE_T_HOT,
15462306a36Sopenharmony_ci	.t_cold = OMAP5430_CORE_T_COLD,
15562306a36Sopenharmony_ci	.min_freq = OMAP5430_CORE_MIN_FREQ,
15662306a36Sopenharmony_ci	.max_freq = OMAP5430_CORE_MAX_FREQ,
15762306a36Sopenharmony_ci};
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci/*
16062306a36Sopenharmony_ci * OMAP54xx ES2.0 : Temperature values in milli degree celsius
16162306a36Sopenharmony_ci * ADC code values from 540 to 945
16262306a36Sopenharmony_ci */
16362306a36Sopenharmony_cistatic int
16462306a36Sopenharmony_ciomap5430_adc_to_temp[
16562306a36Sopenharmony_ci	OMAP5430_ADC_END_VALUE - OMAP5430_ADC_START_VALUE + 1] = {
16662306a36Sopenharmony_ci	/* Index 540 - 549 */
16762306a36Sopenharmony_ci	-40000, -40000, -40000, -40000, -39800, -39400, -39000, -38600, -38200,
16862306a36Sopenharmony_ci	-37800,
16962306a36Sopenharmony_ci	/* Index 550 - 559 */
17062306a36Sopenharmony_ci	-37400, -37000, -36600, -36200, -35800, -35300, -34700, -34200, -33800,
17162306a36Sopenharmony_ci	-33400,
17262306a36Sopenharmony_ci	/* Index 560 - 569 */
17362306a36Sopenharmony_ci	-33000, -32600, -32200, -31800, -31400, -31000, -30600, -30200, -29800,
17462306a36Sopenharmony_ci	-29400,
17562306a36Sopenharmony_ci	/* Index 570 - 579 */
17662306a36Sopenharmony_ci	-29000, -28600, -28200, -27700, -27100, -26600, -26200, -25800, -25400,
17762306a36Sopenharmony_ci	-25000,
17862306a36Sopenharmony_ci	/* Index 580 - 589 */
17962306a36Sopenharmony_ci	-24600, -24200, -23800, -23400, -23000, -22600, -22200, -21600, -21400,
18062306a36Sopenharmony_ci	-21000,
18162306a36Sopenharmony_ci	/* Index 590 - 599 */
18262306a36Sopenharmony_ci	-20500, -19900, -19400, -19000, -18600, -18200, -17800, -17400, -17000,
18362306a36Sopenharmony_ci	-16600,
18462306a36Sopenharmony_ci	/* Index 600 - 609 */
18562306a36Sopenharmony_ci	-16200, -15800, -15400, -15000, -14600, -14200, -13800,	-13400, -13000,
18662306a36Sopenharmony_ci	-12500,
18762306a36Sopenharmony_ci	/* Index 610 - 619 */
18862306a36Sopenharmony_ci	-11900, -11400, -11000, -10600, -10200, -9800, -9400, -9000, -8600,
18962306a36Sopenharmony_ci	-8200,
19062306a36Sopenharmony_ci	/* Index 620 - 629 */
19162306a36Sopenharmony_ci	-7800, -7400, -7000, -6600, -6200, -5800, -5400, -5000, -4500, -3900,
19262306a36Sopenharmony_ci	/* Index 630 - 639 */
19362306a36Sopenharmony_ci	-3400, -3000, -2600, -2200, -1800, -1400, -1000, -600, -200, 200,
19462306a36Sopenharmony_ci	/* Index 640 - 649 */
19562306a36Sopenharmony_ci	600, 1000, 1400, 1800, 2200, 2600, 3000, 3400, 3900, 4500,
19662306a36Sopenharmony_ci	/* Index 650 - 659 */
19762306a36Sopenharmony_ci	5000, 5400, 5800, 6200, 6600, 7000, 7400, 7800, 8200, 8600,
19862306a36Sopenharmony_ci	/* Index 660 - 669 */
19962306a36Sopenharmony_ci	9000, 9400, 9800, 10200, 10600, 11000, 11400, 11800, 12200, 12700,
20062306a36Sopenharmony_ci	/* Index 670 - 679 */
20162306a36Sopenharmony_ci	13300, 13800, 14200, 14600, 15000, 15400, 15800, 16200, 16600, 17000,
20262306a36Sopenharmony_ci	/* Index 680 - 689 */
20362306a36Sopenharmony_ci	17400, 17800, 18200, 18600, 19000, 19400, 19800, 20200, 20600, 21100,
20462306a36Sopenharmony_ci	/* Index 690 - 699 */
20562306a36Sopenharmony_ci	21400, 21900, 22500, 23000, 23400, 23800, 24200, 24600, 25000, 25400,
20662306a36Sopenharmony_ci	/* Index 700 - 709 */
20762306a36Sopenharmony_ci	25800, 26200, 26600, 27000, 27400, 27800, 28200, 28600, 29000, 29400,
20862306a36Sopenharmony_ci	/* Index 710 - 719 */
20962306a36Sopenharmony_ci	29800, 30200, 30600, 31000, 31400, 31900, 32500, 33000, 33400, 33800,
21062306a36Sopenharmony_ci	/* Index 720 - 729 */
21162306a36Sopenharmony_ci	34200, 34600, 35000, 35400, 35800, 36200, 36600, 37000, 37400, 37800,
21262306a36Sopenharmony_ci	/* Index 730 - 739 */
21362306a36Sopenharmony_ci	38200, 38600, 39000, 39400, 39800, 40200, 40600, 41000, 41400, 41800,
21462306a36Sopenharmony_ci	/* Index 740 - 749 */
21562306a36Sopenharmony_ci	42200, 42600, 43100, 43700, 44200, 44600, 45000, 45400, 45800, 46200,
21662306a36Sopenharmony_ci	/* Index 750 - 759 */
21762306a36Sopenharmony_ci	46600, 47000, 47400, 47800, 48200, 48600, 49000, 49400, 49800, 50200,
21862306a36Sopenharmony_ci	/* Index 760 - 769 */
21962306a36Sopenharmony_ci	50600, 51000, 51400, 51800, 52200, 52600, 53000, 53400, 53800, 54200,
22062306a36Sopenharmony_ci	/* Index 770 - 779 */
22162306a36Sopenharmony_ci	54600, 55000, 55400, 55900, 56500, 57000, 57400, 57800, 58200, 58600,
22262306a36Sopenharmony_ci	/* Index 780 - 789 */
22362306a36Sopenharmony_ci	59000, 59400, 59800, 60200, 60600, 61000, 61400, 61800, 62200, 62600,
22462306a36Sopenharmony_ci	/* Index 790 - 799 */
22562306a36Sopenharmony_ci	63000, 63400, 63800, 64200, 64600, 65000, 65400, 65800, 66200, 66600,
22662306a36Sopenharmony_ci	/* Index 800 - 809 */
22762306a36Sopenharmony_ci	67000, 67400, 67800, 68200, 68600, 69000, 69400, 69800, 70200, 70600,
22862306a36Sopenharmony_ci	/* Index 810 - 819 */
22962306a36Sopenharmony_ci	71000, 71500, 72100, 72600, 73000, 73400, 73800, 74200, 74600, 75000,
23062306a36Sopenharmony_ci	/* Index 820 - 829 */
23162306a36Sopenharmony_ci	75400, 75800, 76200, 76600, 77000, 77400, 77800, 78200, 78600, 79000,
23262306a36Sopenharmony_ci	/* Index 830 - 839 */
23362306a36Sopenharmony_ci	79400, 79800, 80200, 80600, 81000, 81400, 81800, 82200, 82600, 83000,
23462306a36Sopenharmony_ci	/* Index 840 - 849 */
23562306a36Sopenharmony_ci	83400, 83800, 84200, 84600, 85000, 85400, 85800, 86200, 86600, 87000,
23662306a36Sopenharmony_ci	/* Index 850 - 859 */
23762306a36Sopenharmony_ci	87400, 87800, 88200, 88600, 89000, 89400, 89800, 90200, 90600, 91000,
23862306a36Sopenharmony_ci	/* Index 860 - 869 */
23962306a36Sopenharmony_ci	91400, 91800, 92200, 92600, 93000, 93400, 93800, 94200, 94600, 95000,
24062306a36Sopenharmony_ci	/* Index 870 - 879 */
24162306a36Sopenharmony_ci	95400, 95800, 96200, 96600, 97000, 97500, 98100, 98600, 99000, 99400,
24262306a36Sopenharmony_ci	/* Index 880 - 889 */
24362306a36Sopenharmony_ci	99800, 100200, 100600, 101000, 101400, 101800, 102200, 102600, 103000,
24462306a36Sopenharmony_ci	103400,
24562306a36Sopenharmony_ci	/* Index 890 - 899 */
24662306a36Sopenharmony_ci	103800, 104200, 104600, 105000, 105400, 105800, 106200, 106600, 107000,
24762306a36Sopenharmony_ci	107400,
24862306a36Sopenharmony_ci	/* Index 900 - 909 */
24962306a36Sopenharmony_ci	107800, 108200, 108600, 109000, 109400, 109800, 110200, 110600, 111000,
25062306a36Sopenharmony_ci	111400,
25162306a36Sopenharmony_ci	/* Index 910 - 919 */
25262306a36Sopenharmony_ci	111800, 112200, 112600, 113000, 113400, 113800, 114200, 114600, 115000,
25362306a36Sopenharmony_ci	115400,
25462306a36Sopenharmony_ci	/* Index 920 - 929 */
25562306a36Sopenharmony_ci	115800, 116200, 116600, 117000, 117400, 117800, 118200, 118600, 119000,
25662306a36Sopenharmony_ci	119400,
25762306a36Sopenharmony_ci	/* Index 930 - 939 */
25862306a36Sopenharmony_ci	119800, 120200, 120600, 121000, 121400, 121800, 122400, 122600, 123000,
25962306a36Sopenharmony_ci	123400,
26062306a36Sopenharmony_ci	/* Index 940 - 945 */
26162306a36Sopenharmony_ci	123800, 124200, 124600, 124900, 125000, 125000,
26262306a36Sopenharmony_ci};
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci/* OMAP54xx ES2.0 data */
26562306a36Sopenharmony_ciconst struct ti_bandgap_data omap5430_data = {
26662306a36Sopenharmony_ci	.features = TI_BANDGAP_FEATURE_TSHUT_CONFIG |
26762306a36Sopenharmony_ci			TI_BANDGAP_FEATURE_FREEZE_BIT |
26862306a36Sopenharmony_ci			TI_BANDGAP_FEATURE_TALERT |
26962306a36Sopenharmony_ci			TI_BANDGAP_FEATURE_COUNTER_DELAY |
27062306a36Sopenharmony_ci			TI_BANDGAP_FEATURE_HISTORY_BUFFER,
27162306a36Sopenharmony_ci	.fclock_name = "l3instr_ts_gclk_div",
27262306a36Sopenharmony_ci	.div_ck_name = "l3instr_ts_gclk_div",
27362306a36Sopenharmony_ci	.conv_table = omap5430_adc_to_temp,
27462306a36Sopenharmony_ci	.adc_start_val = OMAP5430_ADC_START_VALUE,
27562306a36Sopenharmony_ci	.adc_end_val = OMAP5430_ADC_END_VALUE,
27662306a36Sopenharmony_ci	.expose_sensor = ti_thermal_expose_sensor,
27762306a36Sopenharmony_ci	.remove_sensor = ti_thermal_remove_sensor,
27862306a36Sopenharmony_ci	.report_temperature = ti_thermal_report_sensor_temperature,
27962306a36Sopenharmony_ci	.sensors = {
28062306a36Sopenharmony_ci		{
28162306a36Sopenharmony_ci		.registers = &omap5430_mpu_temp_sensor_registers,
28262306a36Sopenharmony_ci		.ts_data = &omap5430_mpu_temp_sensor_data,
28362306a36Sopenharmony_ci		.domain = "cpu",
28462306a36Sopenharmony_ci		.register_cooling = ti_thermal_register_cpu_cooling,
28562306a36Sopenharmony_ci		.unregister_cooling = ti_thermal_unregister_cpu_cooling,
28662306a36Sopenharmony_ci		.slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_5430_CPU,
28762306a36Sopenharmony_ci		.constant_pcb = OMAP_GRADIENT_CONST_W_PCB_5430_CPU,
28862306a36Sopenharmony_ci		},
28962306a36Sopenharmony_ci		{
29062306a36Sopenharmony_ci		.registers = &omap5430_gpu_temp_sensor_registers,
29162306a36Sopenharmony_ci		.ts_data = &omap5430_gpu_temp_sensor_data,
29262306a36Sopenharmony_ci		.domain = "gpu",
29362306a36Sopenharmony_ci		.slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_5430_GPU,
29462306a36Sopenharmony_ci		.constant_pcb = OMAP_GRADIENT_CONST_W_PCB_5430_GPU,
29562306a36Sopenharmony_ci		},
29662306a36Sopenharmony_ci		{
29762306a36Sopenharmony_ci		.registers = &omap5430_core_temp_sensor_registers,
29862306a36Sopenharmony_ci		.ts_data = &omap5430_core_temp_sensor_data,
29962306a36Sopenharmony_ci		.domain = "core",
30062306a36Sopenharmony_ci		},
30162306a36Sopenharmony_ci	},
30262306a36Sopenharmony_ci	.sensor_count = 3,
30362306a36Sopenharmony_ci};
304