Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d29fbcdd authored by Harry Yang's avatar Harry Yang
Browse files

power: smb5: configure WDOG_BARK_IRQ as a wakeup irq



The watchdog irq WDOG_BARK_IRQ is supposed to be able to wake up system
from sleep, but not configured so. Fix it.

Also correct register SNARL_BARK_BITE_WD_CFG_REG address.

CRs-Fixed: 2306080
Change-Id: I88577e67c5fd0dea2f29a3699e72e0396a64fe90
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent 4719c01d
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -291,11 +291,7 @@ static int smb5_chg_config_init(struct smb5 *chip)
#define MICRO_P1A			100000
#define MICRO_P1A			100000
#define MICRO_1PA			1000000
#define MICRO_1PA			1000000
#define OTG_DEFAULT_DEGLITCH_TIME_MS	50
#define OTG_DEFAULT_DEGLITCH_TIME_MS	50
#define MIN_WD_BARK_TIME		16
#define DEFAULT_WD_BARK_TIME		64
#define DEFAULT_WD_BARK_TIME		64
#define BITE_WDOG_TIMEOUT_8S		0x3
#define BARK_WDOG_TIMEOUT_MASK		GENMASK(3, 2)
#define BARK_WDOG_TIMEOUT_SHIFT		2
static int smb5_parse_dt(struct smb5 *chip)
static int smb5_parse_dt(struct smb5 *chip)
{
{
	struct smb_charger *chg = &chip->chg;
	struct smb_charger *chg = &chip->chg;
@@ -2348,6 +2344,7 @@ static struct smb_irq_info smb5_irqs[] = {
	[WDOG_BARK_IRQ] = {
	[WDOG_BARK_IRQ] = {
		.name		= "wdog-bark",
		.name		= "wdog-bark",
		.handler	= wdog_bark_irq_handler,
		.handler	= wdog_bark_irq_handler,
		.wake		= true,
	},
	},
	[AICL_FAIL_IRQ] = {
	[AICL_FAIL_IRQ] = {
		.name		= "aicl-fail",
		.name		= "aicl-fail",
+8 −5
Original line number Original line Diff line number Diff line
@@ -438,11 +438,6 @@ enum {
#define AICL_CMD_REG				(MISC_BASE + 0x44)
#define AICL_CMD_REG				(MISC_BASE + 0x44)
#define RERUN_AICL_BIT				BIT(0)
#define RERUN_AICL_BIT				BIT(0)


#define SNARL_BARK_BITE_WD_CFG_REG		(MISC_BASE + 0x43)
#define BITE_WDOG_DISABLE_CHARGING_CFG_BIT	BIT(7)
#define BARK_WDOG_TIMEOUT_MASK			GENMASK(3, 2)
#define BITE_WDOG_TIMEOUT_MASK			GENMASK(1, 0)

#define MISC_SMB_EN_CMD_REG			(MISC_BASE + 0x48)
#define MISC_SMB_EN_CMD_REG			(MISC_BASE + 0x48)
#define SMB_EN_OVERRIDE_VALUE_BIT		BIT(4)
#define SMB_EN_OVERRIDE_VALUE_BIT		BIT(4)
#define SMB_EN_OVERRIDE_BIT			BIT(3)
#define SMB_EN_OVERRIDE_BIT			BIT(3)
@@ -455,6 +450,14 @@ enum {
#define BARK_WDOG_INT_EN_BIT			BIT(6)
#define BARK_WDOG_INT_EN_BIT			BIT(6)
#define WDOG_TIMER_EN_ON_PLUGIN_BIT		BIT(1)
#define WDOG_TIMER_EN_ON_PLUGIN_BIT		BIT(1)


#define SNARL_BARK_BITE_WD_CFG_REG		(MISC_BASE + 0x53)
#define BITE_WDOG_DISABLE_CHARGING_CFG_BIT	BIT(7)
#define BARK_WDOG_TIMEOUT_MASK			GENMASK(3, 2)
#define BARK_WDOG_TIMEOUT_SHIFT			2
#define BITE_WDOG_TIMEOUT_MASK			GENMASK(1, 0)
#define BITE_WDOG_TIMEOUT_8S			0x3
#define MIN_WD_BARK_TIME			16

#define AICL_RERUN_TIME_CFG_REG			(MISC_BASE + 0x61)
#define AICL_RERUN_TIME_CFG_REG			(MISC_BASE + 0x61)
#define AICL_RERUN_TIME_12S_VAL			0x01
#define AICL_RERUN_TIME_12S_VAL			0x01