Pan Sheng-Liang has uploaded this change for review. ( https://review.coreboot.org/23881
Change subject: mainboard/google/coral: Add USB2 phy setting override for Sante/Lava/Blue/Bruce/Astronaut ......................................................................
mainboard/google/coral: Add USB2 phy setting override for Sante/Lava/Blue/Bruce/Astronaut
Due to there are some chances USB devices can not be detected. USB2 port#1 and #4 PHY register need to be overridden.
port#1: PERPORTPETXISET = 4 PERPORTTXISET = 4 IUSBTXEMPHASISEN= 1 PERPORTTXPEHALF= 0
port#4: PERPORTPETXISET = 7 PERPORTTXISET = 7 IUSBTXEMPHASISEN= 1 PERPORTTXPEHALF= 0
BUG=b:72623892 BRANCH=master TEST=emerge-coral coreboot chromeos-bootimage
Change-Id: I401905685cc3078df657919b162272c3de320296 Signed-off-by: Pan Sheng-Liang Sheng-Liang.Pan@quantatw.com --- M src/mainboard/google/reef/variants/coral/mainboard.c 1 file changed, 56 insertions(+), 53 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/23881/1
diff --git a/src/mainboard/google/reef/variants/coral/mainboard.c b/src/mainboard/google/reef/variants/coral/mainboard.c index a45afc7..97c4c0e 100644 --- a/src/mainboard/google/reef/variants/coral/mainboard.c +++ b/src/mainboard/google/reef/variants/coral/mainboard.c @@ -19,7 +19,6 @@ #include <soc/cpu.h> #include <soc/intel/apollolake/chip.h> #include <soc/intel/common/vbt.h> -#include <soc/gpio.h>
enum { SKU_0_ASTRONAUT = 0, @@ -28,8 +27,13 @@ SKU_3_SANTA = 3, SKU_4_LAVA = 4, SKU_5_LAVA = 5, + SKU_6_BLUE = 6, + SKU_7_BLUE = 7, + SKU_8_BRUCE = 8, SKU_9_LAVA = 9, SKU_10_LAVA = 10, + SKU_11_BRUCE = 11, + SKU_12_BLUE = 12, SKU_61_ASTRONAUT = 61, SKU_62_ASTRONAUT = 62, SKU_160_NASHER = 160, @@ -71,25 +75,63 @@ switch (sku_id) { case SKU_0_ASTRONAUT: case SKU_1_ASTRONAUT: - cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; - cfg->usb2eye[1].Usb20PerPortTxiSet = 2; - break; + case SKU_61_ASTRONAUT: + case SKU_62_ASTRONAUT: + cfg->usb2eye[1].Usb20PerPortPeTxiSet = 4; + cfg->usb2eye[1].Usb20PerPortTxiSet = 4; + cfg->usb2eye[1].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[1].Usb20PerPortTxPeHalf = 0; + cfg->usb2eye[4].Usb20PerPortPeTxiSet = 7; + cfg->usb2eye[4].Usb20PerPortTxiSet = 7; + cfg->usb2eye[4].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[4].Usb20PerPortTxPeHalf = 0; + break; case SKU_2_SANTA: case SKU_3_SANTA: - cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; - cfg->usb2eye[1].Usb20PerPortTxiSet = 2; - break; + cfg->usb2eye[1].Usb20PerPortPeTxiSet = 4; + cfg->usb2eye[1].Usb20PerPortTxiSet = 4; + cfg->usb2eye[1].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[1].Usb20PerPortTxPeHalf = 0; + cfg->usb2eye[4].Usb20PerPortPeTxiSet = 7; + cfg->usb2eye[4].Usb20PerPortTxiSet = 7; + cfg->usb2eye[4].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[4].Usb20PerPortTxPeHalf = 0; + break; case SKU_4_LAVA: case SKU_5_LAVA: case SKU_9_LAVA: case SKU_10_LAVA: - cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; - cfg->usb2eye[1].Usb20PerPortTxiSet = 2; - break; - case SKU_61_ASTRONAUT: - case SKU_62_ASTRONAUT: - cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; - cfg->usb2eye[1].Usb20PerPortTxiSet = 5; + cfg->usb2eye[1].Usb20PerPortPeTxiSet = 4; + cfg->usb2eye[1].Usb20PerPortTxiSet = 4; + cfg->usb2eye[1].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[1].Usb20PerPortTxPeHalf = 0; + cfg->usb2eye[4].Usb20PerPortPeTxiSet = 7; + cfg->usb2eye[4].Usb20PerPortTxiSet = 7; + cfg->usb2eye[4].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[4].Usb20PerPortTxPeHalf = 0; + break; + case SKU_6_BLUE: + case SKU_7_BLUE: + case SKU_12_BLUE: + cfg->usb2eye[1].Usb20PerPortPeTxiSet = 4; + cfg->usb2eye[1].Usb20PerPortTxiSet = 4; + cfg->usb2eye[1].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[1].Usb20PerPortTxPeHalf = 0; + cfg->usb2eye[4].Usb20PerPortPeTxiSet = 7; + cfg->usb2eye[4].Usb20PerPortTxiSet = 7; + cfg->usb2eye[4].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[4].Usb20PerPortTxPeHalf = 0; + break; + case SKU_8_BRUCE: + case SKU_11_BRUCE: + cfg->usb2eye[1].Usb20PerPortPeTxiSet = 4; + cfg->usb2eye[1].Usb20PerPortTxiSet = 4; + cfg->usb2eye[1].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[1].Usb20PerPortTxPeHalf = 0; + cfg->usb2eye[4].Usb20PerPortPeTxiSet = 7; + cfg->usb2eye[4].Usb20PerPortTxiSet = 7; + cfg->usb2eye[4].Usb20IUsbTxEmphasisEn = 1; + cfg->usb2eye[4].Usb20PerPortTxPeHalf = 0; break; default: break; @@ -101,14 +143,6 @@ int sku_id = variant_board_sku();
switch (sku_id) { - case SKU_0_ASTRONAUT: - case SKU_1_ASTRONAUT: - return "vbt-astronaut.bin"; - break; - case SKU_2_SANTA: - case SKU_3_SANTA: - return "vbt-santa.bin"; - break; case SKU_160_NASHER: case SKU_161_NASHER: case SKU_162_NASHER: @@ -123,34 +157,3 @@ break; } } - -static const struct pad_config nasher_gpio_tables[] = { - /* AVS_DMIC_CLK_A1 */ - PAD_CFG_NF_IOSSTATE(GPIO_79, NATIVE, DEEP, NF1, Tx1RXDCRx0), - /* AVS_DMIC_CLK_B1 */ - PAD_CFG_NF_IOSSTATE(GPIO_80, NATIVE, DEEP, NF1, Tx1RXDCRx0), -}; - -const struct pad_config *variant_sku_gpio_table(size_t *num) -{ - int sku_id = variant_board_sku(); - const struct pad_config *board_gpio_tables; - - switch (sku_id) { - case SKU_160_NASHER: - case SKU_161_NASHER: - case SKU_162_NASHER: - case SKU_163_NASHER360: - case SKU_164_NASHER360: - case SKU_165_NASHER360: - case SKU_166_NASHER360: - *num = ARRAY_SIZE(nasher_gpio_tables); - board_gpio_tables = nasher_gpio_tables; - break; - default: - *num = 0; - board_gpio_tables = NULL; - break; - } - return board_gpio_tables; -}