aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorDmitry Lifshitz <lifshitz@compulab.co.il>2014-01-12 08:22:55 -0500
committerTony Lindgren <tony@atomide.com>2014-02-28 17:09:14 -0500
commitb62d91e5e1abe59f50b5861d26fdecec0e38eecf (patch)
tree277e76299301269fe097ad05086217966e318c0c /arch/arm/mach-omap2
parentfb45105a838f8806f908a9fdf1269355b5daac56 (diff)
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')
-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,
108 return 0; 108 return 0;
109} 109}
110 110
111static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
112{
113 int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name);
114
115 if (err) {
116 pr_err("SBC-T3x: %s reset gpio request failed: %d\n",
117 hub_name, err);
118 return;
119 }
120
121 gpio_export(gpio, 0);
122
123 udelay(10);
124 gpio_set_value(gpio, 1);
125 msleep(1);
126}
127
111static void __init omap3_sbc_t3730_twl_init(void) 128static void __init omap3_sbc_t3730_twl_init(void)
112{ 129{
113 twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback; 130 twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback;
@@ -115,12 +132,14 @@ static void __init omap3_sbc_t3730_twl_init(void)
115 132
116static void __init omap3_sbc_t3730_legacy_init(void) 133static void __init omap3_sbc_t3730_legacy_init(void)
117{ 134{
135 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
118 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 136); 136 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 136);
119 omap_ads7846_init(1, 57, 0, NULL); 137 omap_ads7846_init(1, 57, 0, NULL);
120} 138}
121 139
122static void __init omap3_sbc_t3530_legacy_init(void) 140static void __init omap3_sbc_t3530_legacy_init(void)
123{ 141{
142 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
124 omap_ads7846_init(1, 57, 0, NULL); 143 omap_ads7846_init(1, 57, 0, NULL);
125} 144}
126 145
@@ -198,6 +217,8 @@ static void __init omap3_sbc_t3517_wifi_init(void)
198 217
199static void __init omap3_sbc_t3517_legacy_init(void) 218static void __init omap3_sbc_t3517_legacy_init(void)
200{ 219{
220 omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub");
221 omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub");
201 am35xx_emac_reset(); 222 am35xx_emac_reset();
202 hsmmc2_internal_input_clk(); 223 hsmmc2_internal_input_clk();
203 omap3_sbc_t3517_wifi_init(); 224 omap3_sbc_t3517_wifi_init();