summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pdata-quirks.c
diff options
context:
space:
mode:
authorDmitry Lifshitz <lifshitz@compulab.co.il>2014-01-12 15:22:55 +0200
committerTony Lindgren <tony@atomide.com>2014-02-28 14:09:14 -0800
commitb62d91e5e1abe59f50b5861d26fdecec0e38eecf (patch)
tree277e76299301269fe097ad05086217966e318c0c /arch/arm/mach-omap2/pdata-quirks.c
parentfb45105a838f8806f908a9fdf1269355b5daac56 (diff)
downloadlinux-stable-b62d91e5e1abe59f50b5861d26fdecec0e38eecf.tar.gz
linux-stable-b62d91e5e1abe59f50b5861d26fdecec0e38eecf.tar.bz2
linux-stable-b62d91e5e1abe59f50b5861d26fdecec0e38eecf.zip
ARM: OMAP2+: make reset pulse for sbc-t3x usb hubs
sbc-t3x boards features two external USB ports on SB-T35 baseboard. The baseboardi USB hub reset signal should be de-asserted to make those ports functional. sbc-t3517 features additional (assembled on CoM) USB hub which also requires reset signal handling. Add quirks code to handle proper reset pulse signal. Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/pdata-quirks.c')
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 1ee831fc5d0e..3e1407c909f7 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -108,6 +108,23 @@ static int omap3_sbc_t3730_twl_callback(struct device *dev,
return 0;
}
+static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
+{
+ int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name);
+
+ if (err) {
+ pr_err("SBC-T3x: %s reset gpio request failed: %d\n",
+ hub_name, err);
+ return;
+ }
+
+ gpio_export(gpio, 0);
+
+ udelay(10);
+ gpio_set_value(gpio, 1);
+ msleep(1);
+}
+
static void __init omap3_sbc_t3730_twl_init(void)
{
twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback;
@@ -115,12 +132,14 @@ static void __init omap3_sbc_t3730_twl_init(void)
static void __init omap3_sbc_t3730_legacy_init(void)
{
+ omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 136);
omap_ads7846_init(1, 57, 0, NULL);
}
static void __init omap3_sbc_t3530_legacy_init(void)
{
+ omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
omap_ads7846_init(1, 57, 0, NULL);
}
@@ -198,6 +217,8 @@ static void __init omap3_sbc_t3517_wifi_init(void)
static void __init omap3_sbc_t3517_legacy_init(void)
{
+ omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub");
+ omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub");
am35xx_emac_reset();
hsmmc2_internal_input_clk();
omap3_sbc_t3517_wifi_init();