diff options
author | Harry Pan <harry.pan@intel.com> | 2017-10-13 00:54:04 +0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2017-10-17 16:39:02 +0000 |
commit | 5b2a89db08d649b75f47737c1d6cdcd89f8134ee (patch) | |
tree | 8b70fcc1b309360851a6959931f6f4bd4d78b430 | |
parent | 705d0e754f9ecf5ba32eb11a6292b2f220695f54 (diff) | |
download | chrome-ec-5b2a89db08d649b75f47737c1d6cdcd89f8134ee.tar.gz |
snappy: override DP EQ setting for bigdaddy boards
As to PS8751 of bigdaddy daughter boards requires different DP EQ
setting, apply overriding once the sku_id is set.
Such that, every time PS8751 resumes from low power mode, it would
apply the customized DP EQ setting.
BUG=b:67674524
BRANCH=reef
TEST=evaluate DP jitter test on bigdaddy boards.
Alternately, use ectools to read PS8751 reg offset 0xd3 as 0x98
Change-Id: I90ccea46ee18d87d4deaeb3cf2b479414563d452
Signed-off-by: Harry Pan <harry.pan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/716936
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | board/snappy/board.c | 10 | ||||
-rw-r--r-- | board/snappy/board.h | 14 |
2 files changed, 23 insertions, 1 deletions
diff --git a/board/snappy/board.c b/board/snappy/board.c index 255ce1f659..89bca7347d 100644 --- a/board/snappy/board.c +++ b/board/snappy/board.c @@ -259,6 +259,14 @@ const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); static int ps8751_tune_mux(const struct usb_mux *mux) { + uint32_t sku = system_get_sku_id(); + + /* b/67674524: Override BigDaddy DP EQ to 4.5db */ + if (sku == SKU_BIGDADDY_KBDBKLIGHT || sku == SKU_BIGDADDY) { + i2c_write8(mux->port_addr, TCPC_PORT1_I2C_ADDR, + PS8751_REG_MUX_DP_EQ_CONFIGURATION, 0x98); + } + /* Snappy specific signal reconditioning */ i2c_write8(mux->port_addr, TCPC_PORT1_I2C_ADDR, PS8751_REG_MUX_USB_C2SS_EQ, 0x50); @@ -1128,7 +1136,7 @@ uint32_t board_override_feature_flags0(uint32_t flags0) * device is one of them and return the default value - with backlight * here. */ - if (sku == 2) + if (sku == SKU_BIGDADDY_KBDBKLIGHT) return flags0; /* Report that there is no keyboard backlight */ diff --git a/board/snappy/board.h b/board/snappy/board.h index 98cb381a25..d0aad15de7 100644 --- a/board/snappy/board.h +++ b/board/snappy/board.h @@ -286,6 +286,20 @@ enum snappy_board_version { BOARD_VERSION_COUNT, }; +/* SKU ID enumeration */ +enum snappy_sku { + SKU_UNKNOWN = -1, + SKU_RESERVED0, + SKU_RESERVED1, + SKU_BIGDADDY_KBDBKLIGHT, + SKU_RESERVED3, + SKU_RESERVED4, + SKU_BIGDADDY, + SKU_RESERVED6, + SKU_ALAN, + SKU_SNAPPY, +}; + /* start as a sink in case we have no other power supply/battery */ #define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED |