summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2019-11-14 15:36:28 +1100
committerCommit Bot <commit-bot@chromium.org>2019-11-14 23:43:13 +0000
commit6e3c061c4baae0e3169ee5371462615f5153fbed (patch)
treea0914dfc1b4a628852da1743a288647b9e8336c2
parentf3a33b768e4d0710e4213c5a1c53669ce2fd3d73 (diff)
downloadchrome-ec-6e3c061c4baae0e3169ee5371462615f5153fbed.tar.gz
puff: Add config for power sensors.
Add config for INA3221 power monitor sensors. BRANCH=none BUG=b:144127082 TEST=EC buildall Change-Id: I87b3da86403b0ec7314b4084bc710c59f019930d Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1915481 Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
-rw-r--r--board/puff/board.c9
-rw-r--r--board/puff/board.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/board/puff/board.c b/board/puff/board.c
index 02ade160fd..77d632b9a3 100644
--- a/board/puff/board.c
+++ b/board/puff/board.c
@@ -10,6 +10,7 @@
#include "button.h"
#include "common.h"
#include "cros_board_info.h"
+#include "driver/ina3221.h"
#include "driver/ppc/sn5s330.h"
#include "driver/tcpm/anx7447.h"
#include "driver/tcpm/ps8xxx.h"
@@ -210,6 +211,14 @@ struct ec_thermal_config thermal_params[] = {
};
BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);
+/* Power sensors */
+const struct ina3221_t ina3221[] = {
+ { I2C_PORT_INA, 0x40, { "PP3300_G", "PP5000_A", "PP3300_WLAN" } },
+ { I2C_PORT_INA, 0x42, { "PP3300_A", "PP3300_SSD", "PP3300_LAN" } },
+ { I2C_PORT_INA, 0x43, { NULL, "PP1200_U", "PP2500_DRAM" } }
+};
+const unsigned int ina3221_count = ARRAY_SIZE(ina3221);
+
static void board_init(void)
{
}
diff --git a/board/puff/board.h b/board/puff/board.h
index f038650dfb..374ed9aebe 100644
--- a/board/puff/board.h
+++ b/board/puff/board.h
@@ -96,6 +96,7 @@
#define CONFIG_POWER_S0IX
#define CONFIG_POWER_S0IX_FAILURE_DETECTION
#define CONFIG_POWER_TRACK_HOST_SLEEP_STATE
+#define CONFIG_INA3221
/* TODO: (b/143501304) Use correct PD delay values */
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */