diff options
author | Philip Chen <philipchen@google.com> | 2018-01-26 18:51:10 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-30 17:47:15 -0800 |
commit | 5e63c7b22ef48c193f00f627e1a843aa534b5b9e (patch) | |
tree | 136f2705c3b6b16b75240555adf5d02ee5da4002 /driver/charger/rt946x.c | |
parent | df229ee8e6c474c0169133aeb04b515e17dafdcc (diff) | |
download | chrome-ec-5e63c7b22ef48c193f00f627e1a843aa534b5b9e.tar.gz |
charger/rt946x: Reset VBUS by default
In the system, RT946x is always powered by the battery.
So even in battery cutoff mode, the reg values on RT946X are not reset.
We don't want RT946x to supply VBUS when DUT boots, which could mess up
PD state. So we need to disable VBUS output when RT946x initializes.
BUG=b:72228350
BRANCH=none
TEST=Confirm OPA_MODE (bit0 in reg 0x01) is clear after RT946x
finishes initialization
Change-Id: I32795b3bea64860b164c14b06aa1cd2551ebd8a0
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/890028
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Diffstat (limited to 'driver/charger/rt946x.c')
-rw-r--r-- | driver/charger/rt946x.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/driver/charger/rt946x.c b/driver/charger/rt946x.c index f59eba4887..95af454b68 100644 --- a/driver/charger/rt946x.c +++ b/driver/charger/rt946x.c @@ -333,6 +333,12 @@ static int rt946x_init_setting(void) { int rv = 0; +#ifdef CONFIG_CHARGER_OTG + /* Disable boost-mode output voltage */ + rv = charger_enable_otg_power(0); + if (rv) + return rv; +#endif /* Disable BC12 detection */ rv = rt946x_enable_bc12_detection(0); if (rv) @@ -365,6 +371,7 @@ static int rt946x_init_setting(void) rv = rt946x_set_ircmp_res(rt946x_charger_init_setting.ircmp_res); if (rv) return rv; + return rt946x_init_irq(); } |