9
0
Fork 0

ARM: pcm038: Add support for USB OTG device

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Alexander Shiyan 2013-05-06 17:35:39 +04:00 committed by Sascha Hauer
parent a7c13d74d4
commit af31b06816
1 changed files with 15 additions and 2 deletions

View File

@ -49,6 +49,7 @@
#define PCM038_GPIO_FEC_RST (GPIO_PORTC + 30)
#define PCM038_GPIO_SPI_CS0 (GPIO_PORTD + 28)
#define PCM970_GPIO_SPI_CS1 (GPIO_PORTD + 27)
#define PCM038_GPIO_OTG_STP (GPIO_PORTE + 1)
static struct fec_platform_data fec_info = {
.xcv_type = PHY_INTERFACE_MODE_MII,
@ -192,6 +193,11 @@ static int pcm038_power_init(void)
return 0;
}
struct imxusb_platformdata pcm038_otg_pdata = {
.mode = IMX_USB_MODE_DEVICE,
.flags = MXC_EHCI_MODE_ULPI | MXC_EHCI_INTERFACE_DIFF_UNI,
};
static int pcm038_devices_init(void)
{
int i;
@ -262,7 +268,7 @@ static int pcm038_devices_init(void)
PA29_PF_VSYNC,
PA30_PF_CONTRAST,
PA31_PF_OE_ACD,
/* OTG host */
/* USB OTG */
PC7_PF_USBOTG_DATA5,
PC8_PF_USBOTG_DATA6,
PC9_PF_USBOTG_DATA0,
@ -271,7 +277,7 @@ static int pcm038_devices_init(void)
PC12_PF_USBOTG_DATA4,
PC13_PF_USBOTG_DATA3,
PE0_PF_USBOTG_NXT,
PE1_PF_USBOTG_STP,
PCM038_GPIO_OTG_STP | GPIO_GPIO | GPIO_OUT,
PE2_PF_USBOTG_DIR,
PE24_PF_USBOTG_CLK,
PE25_PF_USBOTG_DATA7,
@ -317,6 +323,13 @@ static int pcm038_devices_init(void)
gpio_set_value(PCM038_GPIO_FEC_RST, 1);
imx27_add_fec(&fec_info);
/* Apply delay for STP line to stop ULPI */
gpio_direction_output(PCM038_GPIO_OTG_STP, 1);
mdelay(1);
imx_gpio_mode(PE1_PF_USBOTG_STP);
imx27_add_usbotg(&pcm038_otg_pdata);
switch (bootsource_get()) {
case BOOTSOURCE_NAND:
devfs_add_partition("nand0", 0x00000, 0x80000,