summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMantravadi Karthik <mkarthik@nvidia.com>2020-03-27 11:59:22 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2020-06-11 17:23:53 -0400
commit4c608d479ed156b1b3d73ca6002501d24e1bb538 (patch)
tree43ef559080e4ccdf3bcb759bdf27983d3a7f650a /include
parent67a2aadcc6eaa1d7e1361d508d3123bd8bbac576 (diff)
thermal: Kernel driver for OC event handling
Why? In case of an OC(Over Current) event in Tegra SOC, BPMP gets an interrupt indicating the same. However, there is no indication to ccplex and userspace about the same. This driver provides the interface between BPMP OC implementation and userspace. How? Once there is an EDP OC interrupt to BPMP, BPMP writes to a Shared mailbox register dedicated for BPMP and CCPLEX communication for EDP OC. Once the interrupt is received, Kernel reads the OC status registers to realize the state of the EDP OC HW. The kernel driver provides interfaces for Userspace to poll for the status/interrupts count. Bug 1688327 Change-Id: Iec57849b2be8343bc9d8c617bffd44ab63c8fa9d Signed-off-by: Mantravadi Karthik <mkarthik@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2319540 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/thermal/tegra194-soctherm.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/include/dt-bindings/thermal/tegra194-soctherm.h b/include/dt-bindings/thermal/tegra194-soctherm.h
new file mode 100644
index 000000000..5476bae4d
--- /dev/null
+++ b/include/dt-bindings/thermal/tegra194-soctherm.h
@@ -0,0 +1,65 @@
1/*
2 * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17
18
19#ifndef BPMP_ABI_MACH_T194_SOCTHERM_H
20#define BPMP_ABI_MACH_T194_SOCTHERM_H
21
22/**
23 * @file
24 * @defgroup bpmp_soctherm_ids Soctherm ID's
25 * @{
26 * @defgroup bpmp_soctherm_throt_ids Throttle Identifiers
27 * @defgroup bpmp_soctherm_edp_oc_ids EDP/OC Identifiers
28 * @defgroup bpmp_soctherm_throt_modes Throttle Modes
29 * @}
30 */
31
32/**
33 * @addtogroup bpmp_soctherm_throt_ids
34 * @{
35 */
36#define SOCTHERM_THROT_VEC_LITE 0U
37#define SOCTHERM_THROT_VEC_HEAVY 1U
38#define SOCTHERM_THROT_VEC_OC1 2U
39#define SOCTHERM_THROT_VEC_OC2 3U
40#define SOCTHERM_THROT_VEC_OC3 4U
41#define SOCTHERM_THROT_VEC_OC4 5U
42#define SOCTHERM_THROT_VEC_OC5 6U
43#define SOCTHERM_THROT_VEC_OC6 7U
44#define SOCTHERM_THROT_VEC_INVALID 8U
45/** @} */
46
47/**
48 * @addtogroup bpmp_soctherm_edp_oc_ids
49 * @{
50 */
51#define SOCTHERM_EDP_OC1 0U
52#define SOCTHERM_EDP_OC2 1U
53#define SOCTHERM_EDP_OC3 2U
54#define SOCTHERM_EDP_OC4 3U
55#define SOCTHERM_EDP_OC5 4U
56#define SOCTHERM_EDP_OC6 5U
57#define SOCTHERM_EDP_OC_INVALID 6U
58/** @} */
59
60/**
61 * @addtogroup bpmp_soctherm_throt_modes
62 */
63#define SOCTHERM_EDP_OC_MODE_BRIEF 2U
64
65#endif