summaryrefslogtreecommitdiff
path: root/board/lazor/board.h
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-08-31 16:26:46 -0700
committerCommit Bot <commit-bot@chromium.org>2020-09-02 01:45:20 +0000
commitfb769f0964178cc2e700eec363a8604312174a0b (patch)
tree4002537be9d92d2f419e89982f727d16e4d6c713 /board/lazor/board.h
parent20b99a7070220a3ef191ca20a4b1155b0acc4e18 (diff)
downloadchrome-ec-fb769f0964178cc2e700eec363a8604312174a0b.tar.gz
lazor/limozeen: Support DA9313 and LN9310 switchcaps
Dynamic detect the present of LN9310 by probing the I2C device. If LN9310 not present, fallback to use DA9313. Initialize the switchcap in different ways, like its enable pin, interrupt, power good, etc. BRANCH=None BUG=b:163867792, b:151393598 TEST=Built Lazor image, checked DA9313 detected, booted into kernel. Change-Id: I661282e27a09af1bf30e5b7acba32772a6a8885d Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2386482 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'board/lazor/board.h')
-rw-r--r--board/lazor/board.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/board/lazor/board.h b/board/lazor/board.h
index 865873ee45..27e8a2b847 100644
--- a/board/lazor/board.h
+++ b/board/lazor/board.h
@@ -22,6 +22,9 @@
/* Internal SPI flash on NPCX7 */
#define CONFIG_FLASH_SIZE (512 * 1024) /* 512KB internal spi flash */
+/* Switchcap */
+#define CONFIG_LN9310
+
/* Battery */
#define CONFIG_BATTERY_DEVICE_CHEMISTRY "LION"
#define CONFIG_BATTERY_REVIVE_DISCONNECT
@@ -62,6 +65,8 @@
/* GPIO alias */
#define GPIO_PMIC_RESIN_L GPIO_PM845_RESIN_L
+#define GPIO_SWITCHCAP_PG_INT_L GPIO_DA9313_GPIO0
+#define GPIO_SWITCHCAP_ON_L GPIO_SWITCHCAP_ON
#ifndef __ASSEMBLER__