From 96b2de93030c1f87ebfe05ecfb69682cf4d7f06a Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 13 Dec 2017 20:07:26 -0700 Subject: mainboard/google/kahlee: Update overcurrent pins The overcurrent pins on kahlee weren't mapped correctly, causing the USB-A port to stop working. None of the EHCI only ports are used for external connectors, so all of the overcurrent pins should go to the XHCI connections. This is also true of the Grunt board. On Grunt, this also means that we don't need OC3, as it doesn't map to anything in the XHCI controller, as it's coming from an internal hub. BUG=b:70636233 TEST=Build & boot Kahlee, verify USB-A port is working again. Change-Id: I53336a18a26bd9be27c7265fddbcd780632656bf Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/22860 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin Reviewed-by: Marc Jones Reviewed-by: Daniel Kurtz --- src/mainboard/google/kahlee/variants/baseboard/gpio.c | 11 ++++------- src/mainboard/google/kahlee/variants/kahlee/gpio.c | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c index c2ec65f2af..250fcc106e 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c +++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c @@ -324,18 +324,15 @@ const __attribute__((weak)) struct sci_source *get_gpe_table(size_t *num) int __attribute__((weak)) variant_get_xhci_oc_map(uint16_t *map) { - *map = USB_OC0 << OC_PORT0_SHIFT; /* USB-C Port0 = OC0 */ - *map |= USB_OC1 << OC_PORT1_SHIFT; /* USB-C Port1 = OC1 */ - *map |= USB_OC_DISABLE << OC_PORT2_SHIFT; + *map = USB_OC0 << OC_PORT0_SHIFT; /* USB-C Port0/4 = OC0 */ + *map |= USB_OC1 << OC_PORT1_SHIFT; /* USB-C Port1/5 = OC1 */ + *map |= USB_OC2 << OC_PORT2_SHIFT; /* USB-A HUB Port2/6 = OC2 */ *map |= USB_OC_DISABLE << OC_PORT3_SHIFT; return 0; } int __attribute__((weak)) variant_get_ehci_oc_map(uint16_t *map) { - *map = USB_OC2 << OC_PORT0_SHIFT; /* USB-A Port0 = OC2 */ - *map |= USB_OC3 << OC_PORT1_SHIFT; /* USB-A Port1 = OC3 */ - *map |= USB_OC_DISABLE << OC_PORT2_SHIFT; - *map |= USB_OC_DISABLE << OC_PORT3_SHIFT; + *map = USB_OC_DISABLE_ALL; return 0; } diff --git a/src/mainboard/google/kahlee/variants/kahlee/gpio.c b/src/mainboard/google/kahlee/variants/kahlee/gpio.c index 14424b7b98..e5e15e610d 100644 --- a/src/mainboard/google/kahlee/variants/kahlee/gpio.c +++ b/src/mainboard/google/kahlee/variants/kahlee/gpio.c @@ -151,18 +151,15 @@ const struct sci_source *get_gpe_table(size_t *num) int variant_get_xhci_oc_map(uint16_t *map) { - *map = USB_OC0 << OC_PORT0_SHIFT; /* USB-C Port0 = OC0 */ - *map |= USB_OC1 << OC_PORT1_SHIFT; /* USB-C Port1 = OC1 */ - *map |= USB_OC_DISABLE << OC_PORT2_SHIFT; + *map = USB_OC2 << OC_PORT0_SHIFT; /* USB-A Port0/4 = OC2 */ + *map |= USB_OC0 << OC_PORT1_SHIFT; /* USB-C Port1/5 = OC0 */ + *map |= USB_OC1 << OC_PORT2_SHIFT; /* USB-C Port2/6 = OC1 */ *map |= USB_OC_DISABLE << OC_PORT3_SHIFT; return 0; } int variant_get_ehci_oc_map(uint16_t *map) { - *map = USB_OC2 << OC_PORT0_SHIFT; /* USB-A Port0 = OC2 */ - *map |= USB_OC_DISABLE << OC_PORT1_SHIFT; - *map |= USB_OC_DISABLE << OC_PORT2_SHIFT; - *map |= USB_OC_DISABLE << OC_PORT3_SHIFT; + *map = USB_OC_DISABLE_ALL; return 0; } -- cgit v1.2.3