From: Tim Harvey <tharvey@gateworks.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 07/14] imx: ventana: make OTG VBUS power enable board specific
Date: Mon, 13 Mar 2017 08:51:07 -0700 [thread overview]
Message-ID: <1489420274-2691-8-git-send-email-tharvey@gateworks.com> (raw)
In-Reply-To: <1489420274-2691-1-git-send-email-tharvey@gateworks.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
board/gateworks/gw_ventana/common.c | 16 ++++++++++++----
board/gateworks/gw_ventana/common.h | 2 +-
board/gateworks/gw_ventana/gw_ventana.c | 8 +++++---
3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index 49d6e52..a33c112 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -586,6 +586,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
.rs485en = IMX_GPIO_NR(3, 24),
.dioi2c_en = IMX_GPIO_NR(4, 5),
.pcie_sson = IMX_GPIO_NR(1, 20),
+ .otgpwr_en = IMX_GPIO_NR(3, 22),
},
/* GW51xx */
@@ -604,6 +605,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
.gps_shdn = IMX_GPIO_NR(1, 2),
.vidin_en = IMX_GPIO_NR(5, 20),
.wdis = IMX_GPIO_NR(7, 12),
+ .otgpwr_en = IMX_GPIO_NR(3, 22),
},
/* GW52xx */
@@ -626,6 +628,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
.wdis = IMX_GPIO_NR(7, 12),
.msata_en = GP_MSATA_SEL,
.rs232_en = GP_RS232_EN,
+ .otgpwr_en = IMX_GPIO_NR(3, 22),
},
/* GW53xx */
@@ -647,6 +650,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
.wdis = IMX_GPIO_NR(7, 12),
.msata_en = GP_MSATA_SEL,
.rs232_en = GP_RS232_EN,
+ .otgpwr_en = IMX_GPIO_NR(3, 22),
},
/* GW54xx */
@@ -670,6 +674,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
.wdis = IMX_GPIO_NR(5, 17),
.msata_en = GP_MSATA_SEL,
.rs232_en = GP_RS232_EN,
+ .otgpwr_en = IMX_GPIO_NR(3, 22),
},
/* GW551x */
@@ -715,6 +720,7 @@ struct ventana gpio_cfg[GW_UNKNOWN] = {
.pcie_rst = IMX_GPIO_NR(1, 0),
.vidin_en = IMX_GPIO_NR(5, 20),
.wdis = IMX_GPIO_NR(7, 12),
+ .otgpwr_en = IMX_GPIO_NR(3, 22),
},
};
@@ -725,10 +731,6 @@ void setup_iomux_gpio(int board, struct ventana_board_info *info)
/* iomux common to all Ventana boards */
SETUP_IOMUX_PADS(gw_gpio_pads);
- /* OTG power off */
- gpio_request(GP_USB_OTG_PWR, "usbotg_pwr");
- gpio_direction_output(GP_USB_OTG_PWR, 0);
-
if (board >= GW_UNKNOWN)
return;
@@ -818,6 +820,12 @@ void setup_iomux_gpio(int board, struct ventana_board_info *info)
gpio_direction_output(gpio_cfg[board].wdis, 1);
}
+ /* OTG power off */
+ if (gpio_cfg[board].otgpwr_en) {
+ gpio_request(gpio_cfg[board].otgpwr_en, "usbotg_pwr");
+ gpio_direction_output(gpio_cfg[board].otgpwr_en, 0);
+ }
+
/* sense vselect pin to see if we support uhs-i */
gpio_request(GP_SD3_VSELECT, "sd3_vselect");
gpio_direction_input(GP_SD3_VSELECT);
diff --git a/board/gateworks/gw_ventana/common.h b/board/gateworks/gw_ventana/common.h
index 3d7aff1..6939233 100644
--- a/board/gateworks/gw_ventana/common.h
+++ b/board/gateworks/gw_ventana/common.h
@@ -13,7 +13,6 @@
/* GPIO's common to all baseboards */
#define GP_PHY_RST IMX_GPIO_NR(1, 30)
-#define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22)
#define GP_SD3_CD IMX_GPIO_NR(7, 0)
#define GP_RS232_EN IMX_GPIO_NR(2, 11)
#define GP_MSATA_SEL IMX_GPIO_NR(2, 8)
@@ -79,6 +78,7 @@ struct ventana {
int wdis;
int msata_en;
int rs232_en;
+ int otgpwr_en;
/* various features */
bool usd_vsel;
};
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 22a3c8e..3f9d2f7 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -175,9 +175,11 @@ int board_ehci_hcd_init(int port)
int board_ehci_power(int port, int on)
{
- if (port)
- return 0;
- gpio_set_value(GP_USB_OTG_PWR, on);
+ /* enable OTG VBUS */
+ if (!port && board_type < GW_UNKNOWN) {
+ if (gpio_cfg[board_type].otgpwr_en)
+ gpio_set_value(gpio_cfg[board_type].otgpwr_en, on);
+ }
return 0;
}
#endif /* CONFIG_USB_EHCI_MX6 */
--
2.7.4
next prev parent reply other threads:[~2017-03-13 15:51 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 15:51 [U-Boot] [PATCH 00/14] Gateworks Ventana add support for new boards Tim Harvey
2017-03-13 15:51 ` [U-Boot] [PATCH 01/14] imx: ventana: add additional DRAM configurations Tim Harvey
2017-03-17 11:00 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 02/14] imx: ventana: config: add gzwrite support Tim Harvey
2017-03-17 11:00 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 03/14] imx: ventana: move mmc_init to common Tim Harvey
2017-03-17 11:00 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 04/14] imx: ventana: use mmc_root in boot scripts Tim Harvey
2017-03-17 11:01 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 05/14] imx: ventana: change name of rs232_en to indicate polarity Tim Harvey
2017-03-17 11:01 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 06/14] imx: ventana: fix hwconfig Tim Harvey
2017-03-17 11:02 ` Stefano Babic
2017-03-13 15:51 ` Tim Harvey [this message]
2017-03-17 11:02 ` [U-Boot] [PATCH 07/14] imx: ventana: make OTG VBUS power enable board specific Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 08/14] imx: ventana: make SD3_VSELECT " Tim Harvey
2017-03-17 11:02 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 09/14] imx: ventana: add EMMC configuration Tim Harvey
2017-03-13 15:51 ` [U-Boot] [PATCH 10/14] drivers: net: add MV88E6xx to Kconfig Tim Harvey
2017-03-17 10:59 ` Stefano Babic
2017-03-17 13:13 ` Tim Harvey
2017-03-17 13:27 ` Stefano Babic
2017-03-17 14:29 ` [U-Boot] [PATCH v2 10/14] drivers: net: phy: add MV88E6xx options " Tim Harvey
2017-03-19 17:05 ` Stefano Babic
2017-03-19 17:47 ` Joe Hershberger
2017-03-17 14:30 ` [U-Boot] [PATCH v2 11/14] imx: ventana: add GW5904 support Tim Harvey
2017-03-17 14:31 ` [U-Boot] [PATCH v2 12/14] imx: ventana: add GW560x support Tim Harvey
2017-03-13 15:51 ` [U-Boot] [PATCH 11/14] imx: ventana: add GW5904 support Tim Harvey
2017-03-17 11:09 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 12/14] imx: ventana: add GW560x support Tim Harvey
2017-03-17 11:12 ` Stefano Babic
2017-03-13 15:51 ` [U-Boot] [PATCH 13/14] imx: ventana: add GW5903 support Tim Harvey
2017-03-17 11:13 ` Stefano Babic
2017-03-17 14:32 ` [U-Boot] [PATCH v2 " Tim Harvey
2017-03-13 15:51 ` [U-Boot] [PATCH 14/14] imx: ventana: config: add EMMC boot options Tim Harvey
2017-03-17 11:00 ` [U-Boot] [PATCH 00/14] Gateworks Ventana add support for new boards Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489420274-2691-8-git-send-email-tharvey@gateworks.com \
--to=tharvey@gateworks.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.