diff options
author | David Huang <david.huang@quanta.corp-partner.google.com> | 2020-07-23 16:23:07 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-14 15:02:18 +0000 |
commit | 4b197c32cb1b15ac0024e21bc550448899daabfc (patch) | |
tree | e46064bf333d99dea2b51bed1216f4014badc952 | |
parent | a8ce3ace8d774c8902c5a600c15d5f971ef99742 (diff) | |
download | chrome-ec-4b197c32cb1b15ac0024e21bc550448899daabfc.tar.gz |
syv682x: set CONFIG_SYV682X_HV_ILIM for set HV_ILIM
Use CONFIG_SYV682X_HV_ILIM for board define default support
HV_ILIM value.
BUG=b:161762373
BRANCH=master
TEST=Use ppc_dump <port> to check the setting correct.
Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com>
Change-Id: Ifc37fb273e769e3d3555a04fb1da13946821d19a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2315948
Reviewed-by: Marco Chen <marcochen@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Marco Chen <marcochen@chromium.org>
-rw-r--r-- | driver/ppc/syv682x.c | 2 | ||||
-rw-r--r-- | include/config.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/driver/ppc/syv682x.c b/driver/ppc/syv682x.c index c88ae9346b..fa73c75176 100644 --- a/driver/ppc/syv682x.c +++ b/driver/ppc/syv682x.c @@ -619,7 +619,7 @@ static int syv682x_init(int port) * select HV channel. */ regval = SYV682X_CONTROL_1_PWR_ENB | - (SYV682X_HV_ILIM_3_30 << SYV682X_HV_ILIM_BIT_SHIFT) | + (CONFIG_SYV682X_HV_ILIM << SYV682X_HV_ILIM_BIT_SHIFT) | /* !SYV682X_CONTROL_1_HV_DR */ SYV682X_CONTROL_1_CH_SEL; rv = write_reg(port, SYV682X_CONTROL_1_REG, regval); diff --git a/include/config.h b/include/config.h index 6b9af1479a..cd1976ff33 100644 --- a/include/config.h +++ b/include/config.h @@ -4261,6 +4261,12 @@ #undef CONFIG_USBC_PPC_SN5S330 #undef CONFIG_USBC_PPC_SYV682X +/* + * SYV682x PPC high voltage power path current limit. Default limit is + * 3.3A. See the syv682x header file for permissible values. + */ +#define CONFIG_SYV682X_HV_ILIM SYV682X_HV_ILIM_3_30 + /* PPC is capable of gating the SBU lines. */ #undef CONFIG_USBC_PPC_SBU |