diff options
author | Kevin Chiu <Kevin.Chiu@quantatw.com> | 2017-10-16 16:38:08 +0800 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-10-18 16:01:30 +0000 |
commit | 53660ed499fa2a523de4d7619fd1067f64f564fb (patch) | |
tree | f5f74cd6b2b07263a295e9951728c01755367be3 /src/mainboard | |
parent | c869cd2f44f9880e1757cb83be0aa23d351fa99c (diff) |
google/snappy: Override USB2 strength by SKUID
14" BigDaddy needs to override USB2 TxiSet additionally to
enhance driving strength.
Otherwise EA test will fail on USB2 eye pattern.
BUG=b:67820719
BRANCH=reef
TEST=emerge-snappy coreboot
Change-Id: I674c121a71866a5d44439eeb49e07f917d816de8
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/22037
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/reef/variants/snappy/mainboard.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/mainboard/google/reef/variants/snappy/mainboard.c b/src/mainboard/google/reef/variants/snappy/mainboard.c index 2767df245e..ac76a88a98 100644 --- a/src/mainboard/google/reef/variants/snappy/mainboard.c +++ b/src/mainboard/google/reef/variants/snappy/mainboard.c @@ -17,6 +17,22 @@ #include <baseboard/variants.h> #include <ec/google/chromeec/ec.h> #include <vendorcode/google/chromeos/cros_vpd.h> +#include <soc/cpu.h> +#include <soc/intel/apollolake/chip.h> + +/* 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, +}; void variant_board_ec_set_skuid(void) { @@ -63,3 +79,24 @@ uint8_t variant_board_sku(void) return board_sku_num; } + +void mainboard_devtree_update(struct device *dev) +{ + /* Override dev tree settings per board */ + struct soc_intel_apollolake_config *cfg = dev->chip_info; + uint8_t sku_id; + + sku_id = variant_board_sku(); + + switch (sku_id) { + case SKU_BIGDADDY_KBDBKLIGHT: + case SKU_BIGDADDY: + cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; + cfg->usb2eye[1].Usb20PerPortTxiSet = 7; + cfg->usb2eye[1].Usb20IUsbTxEmphasisEn = 3; + cfg->usb2eye[1].Usb20PerPortTxPeHalf = 0; + break; + default: + break; + } +} |