summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-01-17 02:57:17 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-01-17 02:57:17 +0000
commitbdabd31b55d0063d56bc77e8f6c833823fcf5c5e (patch)
tree14f3e69ea6a8d0f842efb5fd167ed8aa54cc4140 /sys/arch
parentf86c3396f5e0757a33490f4040e304e16b108e9b (diff)
More complete gpio reset sequences for SABRE Lite/Nitrogen6X.
From Patrick Wildt in Bitrig.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/armv7/imx/imxehci.c9
-rw-r--r--sys/arch/armv7/imx/imxenet.c14
2 files changed, 17 insertions, 6 deletions
diff --git a/sys/arch/armv7/imx/imxehci.c b/sys/arch/armv7/imx/imxehci.c
index 3896fca22c6..6bc4c2ec5ce 100644
--- a/sys/arch/armv7/imx/imxehci.c
+++ b/sys/arch/armv7/imx/imxehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxehci.c,v 1.5 2015/01/02 01:57:33 jsg Exp $ */
+/* $OpenBSD: imxehci.c,v 1.6 2015/01/17 02:57:16 jsg Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
@@ -139,6 +139,13 @@ imxehci_attach(struct device *parent, struct device *self, void *aux)
imxgpio_set_dir(EHCI_HUMMINGBOARD_USB_H1_PWR, IMXGPIO_DIR_OUT);
delay(10);
break;
+ case BOARD_ID_IMX6_SABRELITE:
+ imxgpio_clear_bit(EHCI_NITROGEN6X_USB_HUB_RST);
+ imxgpio_set_dir(EHCI_NITROGEN6X_USB_HUB_RST, IMXGPIO_DIR_OUT);
+ delay(1000 * 2);
+ imxgpio_set_bit(EHCI_NITROGEN6X_USB_HUB_RST);
+ delay(10);
+ break;
case BOARD_ID_IMX6_UTILITE:
imxgpio_clear_bit(EHCI_UTILITE_USB_HUB_RST);
imxgpio_set_dir(EHCI_UTILITE_USB_HUB_RST, IMXGPIO_DIR_OUT);
diff --git a/sys/arch/armv7/imx/imxenet.c b/sys/arch/armv7/imx/imxenet.c
index 357a9a703c5..67e9bca230d 100644
--- a/sys/arch/armv7/imx/imxenet.c
+++ b/sys/arch/armv7/imx/imxenet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxenet.c,v 1.9 2015/01/02 01:57:33 jsg Exp $ */
+/* $OpenBSD: imxenet.c,v 1.10 2015/01/17 02:57:16 jsg Exp $ */
/*
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
*
@@ -246,10 +246,14 @@ imxenet_attach(struct device *parent, struct device *self, void *args)
case BOARD_ID_IMX6_PHYFLEX:
case BOARD_ID_IMX6_SABRELITE:
/* phyFLEX i.MX6 and SABRE Lite PHY reset */
- imxgpio_set_dir(ENET_PHYFLEX_PHY_RST, IMXGPIO_DIR_OUT);
- delay(10);
- imxgpio_set_bit(ENET_PHYFLEX_PHY_RST);
- delay(10);
+ imxgpio_clear_bit(ENET_SABRELITE_PHY_RST);
+ imxgpio_set_dir(ENET_SABRELITE_PHY_RST, IMXGPIO_DIR_OUT);
+ imxgpio_clear_bit(ENET_NITROGEN6X_PHY_RST);
+ imxgpio_set_dir(ENET_NITROGEN6X_PHY_RST, IMXGPIO_DIR_OUT);
+ delay(1000 * 10);
+ imxgpio_set_bit(ENET_SABRELITE_PHY_RST);
+ imxgpio_set_bit(ENET_NITROGEN6X_PHY_RST);
+ delay(100);
break;
case BOARD_ID_IMX6_UDOO:
imxgpio_set_bit(ENET_UDOO_PWR);