aboutsummaryrefslogtreecommitdiff
path: root/src/superio/ite/common/env_ctrl_chip.h
diff options
context:
space:
mode:
authorKrystian Hebel <krystian.hebel@3mdeb.com>2019-02-26 11:19:58 +0100
committerFelix Held <felix-coreboot@felixheld.de>2019-03-02 19:32:38 +0000
commit97445f20edf9f0cda0ad184b42eed060095ff860 (patch)
treeab4788dace2a5a3fa636e56700967aed833ef52e /src/superio/ite/common/env_ctrl_chip.h
parent65b514c64551b8e7516c2bd66646ebf6eeec379a (diff)
superio/ite/common: add option for enabling 5 FANs
Some ITEs have more than 3 independent FAN controller outputs. As the initial implementation assumed only 3 outputs some registers are not consequently numbered. This change adds macros for accessing those registers. Additionally some chips have SmartGuardian always enabled, without the option for turning it off. For these chips bits that were responsible for ON/OFF control are either reserved or have different meaning. Another Kconfig option is added to disable ON/OFF functionality on platforms that do not support it. Change-Id: Icd60a16b6b5583a3b981bdc220aac472c2a8f40f Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/31616 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/superio/ite/common/env_ctrl_chip.h')
-rw-r--r--src/superio/ite/common/env_ctrl_chip.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/superio/ite/common/env_ctrl_chip.h b/src/superio/ite/common/env_ctrl_chip.h
index f8f2e1ef0e..68bf5a035f 100644
--- a/src/superio/ite/common/env_ctrl_chip.h
+++ b/src/superio/ite/common/env_ctrl_chip.h
@@ -3,6 +3,7 @@
*
* Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
* Copyright (C) 2016 secunet Security Networks AG
+ * Copyright (C) 2019 Protectli
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +20,12 @@
#define SUPERIO_ITE_ENV_CTRL_CHIP_H
#define ITE_EC_TMPIN_CNT 3
+
+#if IS_ENABLED(CONFIG_SUPERIO_ITE_ENV_CTRL_5FANS)
+#define ITE_EC_FAN_CNT 5
+#else
#define ITE_EC_FAN_CNT 3
+#endif
/* Supported thermal mode on TMPINx */
enum ite_ec_thermal_mode {
@@ -105,5 +111,7 @@ struct ite_ec_config {
#define FAN1 ec.fan[0]
#define FAN2 ec.fan[1]
#define FAN3 ec.fan[2]
+#define FAN4 ec.fan[3]
+#define FAN5 ec.fan[4]
#endif /* SUPERIO_ITE_ENV_CTRL_CHIP_H */