diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 35 | 
1 files changed, 29 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index df5a425a49d..5aef69521e3 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -42,6 +42,7 @@  #define ETH_KS8851_IRQ			34  #define ETH_KS8851_POWER_ON		48  #define ETH_KS8851_QUART		138 +#define OMAP4SDP_MDM_PWR_EN_GPIO	157  #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO	184  #define OMAP4_SFH7741_ENABLE_GPIO		188 @@ -225,12 +226,29 @@ static void __init omap_4430sdp_init_irq(void)  	omap_gpio_init();  } +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +	.port_mode[0]	= EHCI_HCD_OMAP_MODE_PHY, +	.port_mode[1]	= EHCI_HCD_OMAP_MODE_UNKNOWN, +	.port_mode[2]	= EHCI_HCD_OMAP_MODE_UNKNOWN, +	.phy_reset	= false, +	.reset_gpio_port[0]  = -EINVAL, +	.reset_gpio_port[1]  = -EINVAL, +	.reset_gpio_port[2]  = -EINVAL, +}; +  static struct omap_musb_board_data musb_board_data = {  	.interface_type		= MUSB_INTERFACE_UTMI, -	.mode			= MUSB_PERIPHERAL, +	.mode			= MUSB_OTG,  	.power			= 100,  }; +static struct twl4030_usb_data omap4_usbphy_data = { +	.phy_init	= omap4430_phy_init, +	.phy_exit	= omap4430_phy_exit, +	.phy_power	= omap4430_phy_power, +	.phy_set_clock	= omap4430_phy_set_clk, +}; +  static struct omap2_hsmmc_info mmc[] = {  	{  		.mmc		= 1, @@ -450,6 +468,7 @@ static struct twl4030_platform_data sdp4430_twldata = {  	.vaux1		= &sdp4430_vaux1,  	.vaux2		= &sdp4430_vaux2,  	.vaux3		= &sdp4430_vaux3, +	.usb		= &omap4_usbphy_data  };  static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = { @@ -514,11 +533,15 @@ static void __init omap_4430sdp_init(void)  	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));  	omap_serial_init();  	omap4_twl6030_hsmmc_init(mmc); -	/* OMAP4 SDP uses internal transceiver so register nop transceiver */ -	usb_nop_xceiv_register(); -	/* FIXME: allow multi-omap to boot until musb is updated for omap4 */ -	if (!cpu_is_omap44xx()) -		usb_musb_init(&musb_board_data); + +	/* Power on the ULPI PHY */ +	if (gpio_is_valid(OMAP4SDP_MDM_PWR_EN_GPIO)) { +		/* FIXME: Assumes pad is already muxed for GPIO mode */ +		gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); +		gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1); +	} +	usb_ehci_init(&ehci_pdata); +	usb_musb_init(&musb_board_data);  	status = omap_ethernet_init();  	if (status) {  |