[coreboot-gerrit] Change in coreboot[master]: mainboard/google/kahlee: Update overcurrent pins

Martin Roth (Code Review) gerrit at coreboot.org
Thu Dec 14 04:18:22 CET 2017


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 at 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;
 }

-- 
To view, visit https://review.coreboot.org/22860
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I53336a18a26bd9be27c7265fddbcd780632656bf
Gerrit-Change-Number: 22860
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171214/27a28923/attachment.html>


More information about the coreboot-gerrit mailing list