coreboot/src/mainboard
William wu 9f470b1930 google/gru: Tune USB 2.0 PHY to increase compatibility
When testing USB 2.0 compatibility with different kinds
of USB 2.0 devices on Kevin board, we find that some
USB HDDs (e.g. seagate SRD00F1 1TB HDD) and some smart
phones (e.g. galaxy A5 smart phone) can't be detected.
And according to the error log, this issue is related
to USB 2.0 PHY signal problem.

For the USB HDD, error log is:
[  592.557724] usb 5-1: new high-speed USB device number 2 using xhci-hcd
[  592.847735] usb 5-1: new high-speed USB device number 3 using xhci-hcd
[  593.473720] usb 5-1: new high-speed USB device number 6 using xhci-hcd
[  594.187717] usb 5-1: new high-speed USB device number 9 using xhci-hcd
[  595.020717] usb 5-1: new high-speed USB device number 13 using xhci-hcd
[  595.284730] usb 5-1: new high-speed USB device number 14 using xhci-hcd
[  595.574816] usb 5-1: new high-speed USB device number 15 using xhci-hcd

The log shows that HDD failed to high-speed handshake.

For the smart phone, error log is:
[ 1145.661625] usb 5-1: new high-speed USB device number 2 using xhci-hcd
[ 1145.771674] usb 5-1: device descriptor read/64, error -71
[ 1145.979752] usb 5-1: device descriptor read/64, error -71
[ 1146.187721] usb 5-1: new high-speed USB device number 3 using xhci-hcd
[ 1146.301754] usb 5-1: device descriptor read/64, error -71
[ 1146.509750] usb 5-1: device descriptor read/64, error -71
[ 1146.717722] usb 5-1: new high-speed USB device number 4 using xhci-hcd
[ 1146.724393] usb 5-1: Device not responding to setup address.
[ 1146.930795] usb 5-1: Device not responding to setup address.
[ 1147.137720] usb 5-1: device not accepting address 4, error -71
[ 1147.246644] usb 5-1: new high-speed USB device number 5 using xhci-hcd
[ 1147.253336] usb 5-1: Device not responding to setup address.
[ 1147.459786] usb 5-1: Device not responding to setup address.
[ 1147.665712] usb 5-1: device not accepting address 5, error -71
[ 1147.671789] usb usb5-port1: unable to enumerate USB device

The log shows that smart phone failed to read device
descriptor, error -71 may be caused by PHY signal problem.

This patch aims to tune USB 2.0 PHY with the following
parameters to support USB HDD, smart phone and some other
potential USB 2.0 devices.

1. Disable the pre-emphasize in chirp state to avoid
   high-speed handshake failure.

2. Bypass ODT auto compensation to enable set max driver
   strength manually. (Bit[42] of usbphy_ctrl register is
   1'b1 for bypass, and Bit[41:37] of usbphy_ctrl register
   is 5'b10000 for max driver strength).

3. Bypass ODT auto refresh, and set the max bias current
   tuning reference. (Bit[57] of usbphy_ctrl register is
   1'b1 for bypass, and Bit[52:50] of usbphy_ctrl register
   is 3b'100  for max bias current tuning reference).

We have done the USB 2.0 compliance test and compatibility test
with this patch, it works well.

BRANCH=gru
BUG=chrome-os-partner:59623
TEST=plug/unplug USB HDD or smart phone in Type-C port,
check if they can be detected successfully.

Change-Id: I275c2236b8e469bfd04e9184d007eb095657225e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7735c514d4
Original-Change-Id: I4e6c10faa1c03af9880a89afe4731a7065eb1e4e
Original-Signed-off-by: William wu <wulf@rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/409856
Original-Commit-Ready: Eddie Cai <eddie.cai.rk@gmail.com>
Original-Tested-by: Cindy Han <cindy.han@samsung.com>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/17566
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-29 17:44:10 +01:00
..
a-trend src/mainboard/a-trend - emulation: Add space around operators 2016-09-20 19:06:28 +02:00
aaeon
abit src/mainboard/a-trend - emulation: Add space around operators 2016-09-20 19:06:28 +02:00
adi Remove explicit select MMCONF_SUPPORT 2016-11-22 04:15:11 +01:00
adlink
advansus mainboard/advansus: Use C89 comments style & remove commented code 2016-10-10 17:13:14 +02:00
amd mainboard/amd/tilapia_fam10: Use C89 comments style & remove commented code 2016-10-24 20:32:21 +02:00
aopen mainboard/aopen: Use C89 comments style & remove commented code 2016-10-11 23:32:53 +02:00
apple intel sandy/ivy: Improve DIMM replacement detection 2016-11-20 21:24:13 +01:00
artecgroup mainboard/artecgroup: Use C89 comments style & remove commented code 2016-10-09 21:39:18 +02:00
asrock src/mainboard: Remove whitespace after sizeof 2016-10-07 18:06:34 +02:00
asus mb/asus/kcma-d8,kgpe-d16: use MAINBOARD_DO_NATIVE_VGA_INIT 2016-10-19 16:55:53 +02:00
avalue mainboard/avalue: Use C89 comments style & remove commented code 2016-10-10 17:12:59 +02:00
azza src/mainboard/a-trend - emulation: Add space around operators 2016-09-20 19:06:28 +02:00
bachmann
bap src/mainboard: Remove whitespace after sizeof 2016-10-07 18:06:34 +02:00
bcom src/mainboard/a-trend - emulation: Add space around operators 2016-09-20 19:06:28 +02:00
bifferos
biostar biostar/am1ml: transition away from device_t 2016-10-01 17:38:50 +02:00
broadcom mainboard/broadcom/blast: Use tabs for indents 2016-09-28 22:07:19 +02:00
compaq src/mainboard/a-trend - emulation: Add space around operators 2016-09-20 19:06:28 +02:00
cubietech
digitallogic mainboard/digitallogic/msm800sev: Use tabs for indents 2016-10-01 08:34:28 +02:00
dmp
ecs mainboard/*/*/irq_tables.c: Use tabs for indents 2016-09-26 13:22:39 +02:00
elmex src/mainboard: Remove unnecessary whitespace 2016-10-07 18:06:14 +02:00
emulation Remove explicit select MMCONF_SUPPORT 2016-11-22 04:15:11 +01:00
esd
getac mainboard/getac/p470: transition away from device_t 2016-11-09 23:47:26 +01:00
gigabyte mb/gigabyte/ga-945gcm-s2l: Configure SuperIO EC 2016-11-28 19:23:28 +01:00
gizmosphere
google google/gru: Tune USB 2.0 PHY to increase compatibility 2016-11-29 17:44:10 +01:00
hp Kconfig: Update default hex values to start with 0x 2016-10-02 19:08:15 +02:00
ibase mainboard/ibase/mb899: transition away from device_t 2016-11-09 23:47:34 +01:00
iei mainboard/iei/pm-lx2-800-r10: transition away from device_t 2016-11-09 23:47:46 +01:00
intel soc/intel/skylake: Add USB Port Over Current (OC) Pin programming 2016-11-28 19:00:36 +01:00
iwave src/mainboard/getac - kontron: Add space around operators 2016-09-20 21:54:45 +02:00
iwill mainboard/iwill/dk8_htx: Use tabs for indents 2016-09-29 23:51:01 +02:00
jetway mainboard/jetway/j7f2: transition away from device_t 2016-11-09 23:48:02 +01:00
kontron intel sandy/ivy: Improve DIMM replacement detection 2016-11-20 21:24:13 +01:00
lanner mainboard/lanner/em8510: Use tabs for indents 2016-09-29 23:51:19 +02:00
lenovo lenovo/x200/board_info.txt: Add SOIC-8 to ROM package 2016-11-21 21:50:02 +01:00
linutop
lippert src/mainboard: Remove unnecessary whitespace 2016-10-07 18:06:14 +02:00
lowrisc riscv: Unify SBI call implementations under arch/riscv/ 2016-11-07 16:47:49 +01:00
mitac
msi mainboard/ms7721: Add MSI MS-7721 (FM2-A57MA-E35) 2016-11-22 05:19:06 +01:00
nec
nokia
nvidia mainboard/nvidia/l1_2pvv: Use tabs for indents 2016-09-23 20:45:47 +02:00
packardbell mainboard/packardbell/ms2290: Use tabs for indents 2016-10-02 19:09:45 +02:00
pcengines pcengines/apu1: Add RS485 configuration 2016-10-28 16:56:55 +02:00
purism
rca mainboard/rca/rm4100: transition away from device_t 2016-11-10 16:55:42 +01:00
roda mainboard/roda/rk9: transition away from device_t 2016-11-10 16:57:06 +01:00
samsung intel sandy/ivy: Improve DIMM replacement detection 2016-11-20 21:24:13 +01:00
siemens mc_tcu3: Swap LVDS even and odd lanes for a certain hardware 2016-11-24 19:24:03 +01:00
soyo
sunw mainboard/sunw/ultra40/romstage.c: Use tabs for indents 2016-09-28 22:13:58 +02:00
supermicro mainboard/supermicro/h8qme_fam10: transition away from device_t 2016-11-10 17:00:01 +01:00
technexion mainboard/*/*/*/usb.asl: Use tabs for indents 2016-10-01 08:38:34 +02:00
thomson mainboard/thomson/ip1000: transition away from device_t 2016-11-10 17:00:59 +01:00
ti
traverse
tyan mainboard/tyan/s8226: transition away from device_t 2016-11-15 18:16:38 +01:00
via mainboard/via/vt8454c: transition away from device_t 2016-11-15 18:19:12 +01:00
winent Kconfig: Update default hex values to start with 0x 2016-10-02 19:08:15 +02:00
wyse mainboard/*/*/irq_tables.c: Use tabs for indents 2016-09-26 13:22:39 +02:00
Kconfig