162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * DRA752 bandgap registers, bitfields and temperature definitions
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
662306a36Sopenharmony_ci * Contact:
762306a36Sopenharmony_ci *   Eduardo Valentin <eduardo.valentin@ti.com>
862306a36Sopenharmony_ci *   Tero Kristo <t-kristo@ti.com>
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * This is an auto generated file.
1162306a36Sopenharmony_ci */
1262306a36Sopenharmony_ci#ifndef __DRA752_BANDGAP_H
1362306a36Sopenharmony_ci#define __DRA752_BANDGAP_H
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci/**
1662306a36Sopenharmony_ci * *** DRA752 ***
1762306a36Sopenharmony_ci *
1862306a36Sopenharmony_ci * Below, in sequence, are the Register definitions,
1962306a36Sopenharmony_ci * the bitfields and the temperature definitions for DRA752.
2062306a36Sopenharmony_ci */
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci/**
2362306a36Sopenharmony_ci * DRA752 register definitions
2462306a36Sopenharmony_ci *
2562306a36Sopenharmony_ci * Registers are defined as offsets. The offsets are
2662306a36Sopenharmony_ci * relative to FUSE_OPP_BGAP_GPU on DRA752.
2762306a36Sopenharmony_ci * DRA752_BANDGAP_BASE		0x4a0021e0
2862306a36Sopenharmony_ci *
2962306a36Sopenharmony_ci * Register below are grouped by domain (not necessarily in offset order)
3062306a36Sopenharmony_ci */
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci/* DRA752.common register offsets */
3462306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_OFFSET		0x1a0
3562306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_1_OFFSET		0x1c8
3662306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_2_OFFSET		0x39c
3762306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_2_OFFSET		0x3b8
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci/* DRA752.core register offsets */
4062306a36Sopenharmony_ci#define DRA752_STD_FUSE_OPP_BGAP_CORE_OFFSET		0x8
4162306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_CORE_OFFSET			0x154
4262306a36Sopenharmony_ci#define DRA752_BANDGAP_THRESHOLD_CORE_OFFSET		0x1ac
4362306a36Sopenharmony_ci#define DRA752_DTEMP_CORE_1_OFFSET			0x20c
4462306a36Sopenharmony_ci#define DRA752_DTEMP_CORE_2_OFFSET			0x210
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci/* DRA752.iva register offsets */
4762306a36Sopenharmony_ci#define DRA752_STD_FUSE_OPP_BGAP_IVA_OFFSET		0x388
4862306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_IVA_OFFSET			0x398
4962306a36Sopenharmony_ci#define DRA752_BANDGAP_THRESHOLD_IVA_OFFSET		0x3a4
5062306a36Sopenharmony_ci#define DRA752_DTEMP_IVA_1_OFFSET			0x3d4
5162306a36Sopenharmony_ci#define DRA752_DTEMP_IVA_2_OFFSET			0x3d8
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci/* DRA752.mpu register offsets */
5462306a36Sopenharmony_ci#define DRA752_STD_FUSE_OPP_BGAP_MPU_OFFSET		0x4
5562306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_MPU_OFFSET			0x14c
5662306a36Sopenharmony_ci#define DRA752_BANDGAP_THRESHOLD_MPU_OFFSET		0x1a4
5762306a36Sopenharmony_ci#define DRA752_DTEMP_MPU_1_OFFSET			0x1e4
5862306a36Sopenharmony_ci#define DRA752_DTEMP_MPU_2_OFFSET			0x1e8
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci/* DRA752.dspeve register offsets */
6162306a36Sopenharmony_ci#define DRA752_STD_FUSE_OPP_BGAP_DSPEVE_OFFSET			0x384
6262306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_DSPEVE_OFFSET			0x394
6362306a36Sopenharmony_ci#define DRA752_BANDGAP_THRESHOLD_DSPEVE_OFFSET			0x3a0
6462306a36Sopenharmony_ci#define DRA752_DTEMP_DSPEVE_1_OFFSET				0x3c0
6562306a36Sopenharmony_ci#define DRA752_DTEMP_DSPEVE_2_OFFSET				0x3c4
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci/* DRA752.gpu register offsets */
6862306a36Sopenharmony_ci#define DRA752_STD_FUSE_OPP_BGAP_GPU_OFFSET		0x0
6962306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_GPU_OFFSET			0x150
7062306a36Sopenharmony_ci#define DRA752_BANDGAP_THRESHOLD_GPU_OFFSET		0x1a8
7162306a36Sopenharmony_ci#define DRA752_DTEMP_GPU_1_OFFSET			0x1f8
7262306a36Sopenharmony_ci#define DRA752_DTEMP_GPU_2_OFFSET			0x1fc
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci/**
7562306a36Sopenharmony_ci * Register bitfields for DRA752
7662306a36Sopenharmony_ci *
7762306a36Sopenharmony_ci * All the macros bellow define the required bits for
7862306a36Sopenharmony_ci * controlling temperature on DRA752. Bit defines are
7962306a36Sopenharmony_ci * grouped by register.
8062306a36Sopenharmony_ci */
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci/* DRA752.BANDGAP_STATUS_1 */
8362306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_1_HOT_CORE_MASK		BIT(5)
8462306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_1_COLD_CORE_MASK		BIT(4)
8562306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_1_HOT_GPU_MASK		BIT(3)
8662306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_1_COLD_GPU_MASK		BIT(2)
8762306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_1_HOT_MPU_MASK		BIT(1)
8862306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_1_COLD_MPU_MASK		BIT(0)
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci/* DRA752.BANDGAP_CTRL_2 */
9162306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_2_FREEZE_IVA_MASK			BIT(22)
9262306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_2_FREEZE_DSPEVE_MASK		BIT(21)
9362306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_2_MASK_HOT_IVA_MASK			BIT(3)
9462306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_2_MASK_COLD_IVA_MASK		BIT(2)
9562306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_2_MASK_HOT_DSPEVE_MASK		BIT(1)
9662306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_2_MASK_COLD_DSPEVE_MASK		BIT(0)
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci/* DRA752.BANDGAP_STATUS_2 */
9962306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_2_HOT_IVA_MASK			BIT(3)
10062306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_2_COLD_IVA_MASK			BIT(2)
10162306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_2_HOT_DSPEVE_MASK			BIT(1)
10262306a36Sopenharmony_ci#define DRA752_BANDGAP_STATUS_2_COLD_DSPEVE_MASK		BIT(0)
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci/* DRA752.BANDGAP_CTRL_1 */
10562306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_COUNTER_DELAY_MASK		(0x7 << 27)
10662306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_FREEZE_CORE_MASK			BIT(23)
10762306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_FREEZE_GPU_MASK			BIT(22)
10862306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_FREEZE_MPU_MASK			BIT(21)
10962306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_MASK_HOT_CORE_MASK		BIT(5)
11062306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_MASK_COLD_CORE_MASK		BIT(4)
11162306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_MASK_HOT_GPU_MASK			BIT(3)
11262306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_MASK_COLD_GPU_MASK		BIT(2)
11362306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_MASK_HOT_MPU_MASK			BIT(1)
11462306a36Sopenharmony_ci#define DRA752_BANDGAP_CTRL_1_MASK_COLD_MPU_MASK		BIT(0)
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci/* DRA752.TEMP_SENSOR */
11762306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_TMPSOFF_MASK		BIT(11)
11862306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_EOCZ_MASK		BIT(10)
11962306a36Sopenharmony_ci#define DRA752_TEMP_SENSOR_DTEMP_MASK		(0x3ff << 0)
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ci/* DRA752.BANDGAP_THRESHOLD */
12262306a36Sopenharmony_ci#define DRA752_BANDGAP_THRESHOLD_HOT_MASK		(0x3ff << 16)
12362306a36Sopenharmony_ci#define DRA752_BANDGAP_THRESHOLD_COLD_MASK		(0x3ff << 0)
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ci/**
12662306a36Sopenharmony_ci * Temperature limits and thresholds for DRA752
12762306a36Sopenharmony_ci *
12862306a36Sopenharmony_ci * All the macros bellow are definitions for handling the
12962306a36Sopenharmony_ci * ADC conversions and representation of temperature limits
13062306a36Sopenharmony_ci * and thresholds for DRA752. Definitions are grouped
13162306a36Sopenharmony_ci * by temperature domain.
13262306a36Sopenharmony_ci */
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci/* DRA752.common temperature definitions */
13562306a36Sopenharmony_ci/* ADC conversion table limits */
13662306a36Sopenharmony_ci#define DRA752_ADC_START_VALUE		540
13762306a36Sopenharmony_ci#define DRA752_ADC_END_VALUE		945
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci/* DRA752.GPU temperature definitions */
14062306a36Sopenharmony_ci/* bandgap clock limits */
14162306a36Sopenharmony_ci#define DRA752_GPU_MAX_FREQ				1500000
14262306a36Sopenharmony_ci#define DRA752_GPU_MIN_FREQ				1000000
14362306a36Sopenharmony_ci/* interrupts thresholds */
14462306a36Sopenharmony_ci#define DRA752_GPU_T_HOT				800
14562306a36Sopenharmony_ci#define DRA752_GPU_T_COLD				795
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci/* DRA752.MPU temperature definitions */
14862306a36Sopenharmony_ci/* bandgap clock limits */
14962306a36Sopenharmony_ci#define DRA752_MPU_MAX_FREQ				1500000
15062306a36Sopenharmony_ci#define DRA752_MPU_MIN_FREQ				1000000
15162306a36Sopenharmony_ci/* interrupts thresholds */
15262306a36Sopenharmony_ci#define DRA752_MPU_T_HOT				800
15362306a36Sopenharmony_ci#define DRA752_MPU_T_COLD				795
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci/* DRA752.CORE temperature definitions */
15662306a36Sopenharmony_ci/* bandgap clock limits */
15762306a36Sopenharmony_ci#define DRA752_CORE_MAX_FREQ				1500000
15862306a36Sopenharmony_ci#define DRA752_CORE_MIN_FREQ				1000000
15962306a36Sopenharmony_ci/* interrupts thresholds */
16062306a36Sopenharmony_ci#define DRA752_CORE_T_HOT				800
16162306a36Sopenharmony_ci#define DRA752_CORE_T_COLD				795
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ci/* DRA752.DSPEVE temperature definitions */
16462306a36Sopenharmony_ci/* bandgap clock limits */
16562306a36Sopenharmony_ci#define DRA752_DSPEVE_MAX_FREQ				1500000
16662306a36Sopenharmony_ci#define DRA752_DSPEVE_MIN_FREQ				1000000
16762306a36Sopenharmony_ci/* interrupts thresholds */
16862306a36Sopenharmony_ci#define DRA752_DSPEVE_T_HOT				800
16962306a36Sopenharmony_ci#define DRA752_DSPEVE_T_COLD				795
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ci/* DRA752.IVA temperature definitions */
17262306a36Sopenharmony_ci/* bandgap clock limits */
17362306a36Sopenharmony_ci#define DRA752_IVA_MAX_FREQ				1500000
17462306a36Sopenharmony_ci#define DRA752_IVA_MIN_FREQ				1000000
17562306a36Sopenharmony_ci/* interrupts thresholds */
17662306a36Sopenharmony_ci#define DRA752_IVA_T_HOT				800
17762306a36Sopenharmony_ci#define DRA752_IVA_T_COLD				795
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci#endif /* __DRA752_BANDGAP_H */
180