[coreboot-gerrit] New patch to review for coreboot: google/gru: Add USB 2.0 PHY tuning for Kevin PHY0 and PHY1

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Oct 6 21:55:04 CEST 2016


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16911

-gerrit

commit 76b6f9fa614372542b1b2af6f33bc52f0cd0b06d
Author: William wu <wulf at rock-chips.com>
Date:   Thu Sep 29 15:18:41 2016 +0800

    google/gru: Add USB 2.0 PHY tuning for Kevin PHY0 and PHY1
    
    We found that Kevin board PHY0 and PHY1 eye-diagram margin
    is not enough to make compliance test pass, and the PHY0 USB
    SI is worse than PHY1, because of the higher PCB impedance.
    
    For PHY0, we can't improve the eye-diagram by SW PHY tuning,
    so we need to reduce the RBIAS resistance from 133 ohm to 115
    ohm, it can help to increase the eye-height.
    
    For PHY1, we can improve the eye-diagram by setting the max
    pre-emphasis level.
    
    And after the above change, the USB2 signal amplitude will
    become larger at the test point near to SOC USB2 PHY, in order
    to avoid mis-trigger the disconnect detection (650mV), we need
    to disable pre-emphasize in eop state.
    
    BRANCH=None
    BUG=chrome-os-partner:53863
    TEST=do USB 2.0 compliance test for Kevin C0 and C1 port.
    
    Change-Id: I95c0acd79623aeca9a0ae077b1dd3836d91fe561
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: de3cdef128966d76e7d8e2ebd641763b911c3ad5
    Original-Change-Id: I00cb325b9938e4276cc77b5d6f5faa7023379608
    Original-Signed-off-by: William wu <wulf at rock-chips.com>
    Original-Reviewed-on: https://chromium-review.googlesource.com/390615
    Original-Commit-Ready: Julius Werner <jwerner at chromium.org>
    Original-Tested-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-by: Julius Werner <jwerner at chromium.org>
---
 src/mainboard/google/gru/mainboard.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index ae2c339..22081c2 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -236,9 +236,17 @@ static void setup_usb(void)
 	/* Set max ODT compensation voltage and current tuning reference. */
 	write32(&rk3399_grf->usbphy0_ctrl[3], 0x0fff02e3);
 	write32(&rk3399_grf->usbphy1_ctrl[3], 0x0fff02e3);
-	/* Set max pre-emphasis level, only on Kevin PHY0. */
-	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN))
+	/* Set max pre-emphasis level, only on Kevin PHY0 and PHY1,
+	 * and disable the pre-emphasize in eop state to avoid
+	 * mis-trigger the disconnect detection. */
+	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN)) {
 		write32(&rk3399_grf->usbphy0_ctrl[12], 0xffff00a7);
+		write32(&rk3399_grf->usbphy1_ctrl[12], 0xffff00a7);
+		write32(&rk3399_grf->usbphy0_ctrl[0], 0x00010000);
+		write32(&rk3399_grf->usbphy1_ctrl[0], 0x00010000);
+		write32(&rk3399_grf->usbphy0_ctrl[13], 0x00010000);
+		write32(&rk3399_grf->usbphy1_ctrl[13], 0x00010000);
+	}
 
 	setup_usb_otg0();
 	setup_usb_otg1();



More information about the coreboot-gerrit mailing list