Martin Roth has uploaded this change for review. ( https://review.coreboot.org/22860
Change subject: mainboard/google/kahlee: Update overcurrent pins ......................................................................
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 martinroth@google.com --- M src/mainboard/google/kahlee/variants/baseboard/gpio.c M src/mainboard/google/kahlee/variants/kahlee/gpio.c 2 files changed, 8 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/22860/1
diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c index c2ec65f..250fcc1 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c +++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c @@ -324,18 +324,15 @@
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 14424b7..e5e15e6 100644 --- a/src/mainboard/google/kahlee/variants/kahlee/gpio.c +++ b/src/mainboard/google/kahlee/variants/kahlee/gpio.c @@ -151,18 +151,15 @@
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; }