forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
thermal: armada: ap806: use firmware SiP services for thermal operations
This patch introduces support for ap806 thermal driver in case when SoC DFX region is marked as secure by the firmware. In such case accessing thermal registers, which are part of dfx register set, will not be possible from non-secure world. Due to above the ARM Trusted Firmware exposes thermal driver as a SiP service. This allows Linux thermal driver to initialise and perform various operations on thermal sensor with use of SMC calls. If during ap806 thermal initialisation the SMC is unhandled (old fw case), fallback to regmap handling. Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
- Loading branch information
1 parent
6370ad6
commit 0817606b4d4dda1aeb2b1acccdc15b15a6751746
Showing
2 changed files
with
141 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 */ | ||
| /* | ||
| * Copyright (C) 2019 Marvell International Ltd. | ||
| */ | ||
|
|
||
| #ifndef _SOC_MARVELL_ARMADA8K_FW_H | ||
| #define _SOC_MARVELL_ARMADA8K_FW_H | ||
|
|
||
| /* FW related definitions */ | ||
| #define MV_SIP_DFX 0x82000014 | ||
|
|
||
| #define MV_SIP_DFX_THERMAL_INIT 1 | ||
| #define MV_SIP_DFX_THERMAL_READ 2 | ||
| #define MV_SIP_DFX_THERMAL_IS_VALID 3 | ||
| #define MV_SIP_DFX_THERMAL_IRQ 4 | ||
| #define MV_SIP_DFX_THERMAL_THRESH 5 | ||
| #define MV_SIP_DFX_THERMAL_SEL_CHANNEL 6 | ||
|
|
||
| #endif /* _SOC_MARVELL_ARMADA8K_FW_H */ |