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-17 05:34:17 +0000 |
commit | 4cad5a9afbe6df65436cae5664c63c69ff528bb3 (patch) | |
tree | 82108128056fd6ea45f517fa36ff54064ea41a9b | |
parent | 1ceeb46590a1f37b98d9999edd4d1c60610bf404 (diff) | |
download | chrome-ec-4cad5a9afbe6df65436cae5664c63c69ff528bb3.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>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2359609
Commit-Queue: Henry Sun <henrysun@google.com>
Reviewed-by: Henry Sun <henrysun@google.com>
-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 f3c0d9dbb4..453e14e388 100644 --- a/driver/ppc/syv682x.c +++ b/driver/ppc/syv682x.c @@ -528,7 +528,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 405e1cec93..d60cae8137 100644 --- a/include/config.h +++ b/include/config.h @@ -3377,6 +3377,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 providing VCONN */ #undef CONFIG_USBC_PPC_VCONN |