Commit 8f146191 authored by Marek Vasut's avatar Marek Vasut Committed by Eric Miao

[ARM] pxa/colibri270: Add UHC support

Signed-off-by: default avatarMarek Vasut <marek.vasut@gmail.com>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 12d94208
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <mach/pxa27x.h> #include <mach/pxa27x.h>
#include <mach/colibri.h> #include <mach/colibri.h>
#include <mach/mmc.h> #include <mach/mmc.h>
#include <mach/ohci.h>
#include <mach/pxa27x-udc.h>
#include "generic.h" #include "generic.h"
#include "devices.h" #include "devices.h"
...@@ -58,6 +60,12 @@ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = { ...@@ -58,6 +60,12 @@ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
/* FFUART */ /* FFUART */
GPIO39_FFUART_TXD, GPIO39_FFUART_TXD,
GPIO34_FFUART_RXD, GPIO34_FFUART_RXD,
/* UHC */
GPIO88_USBH1_PWR,
GPIO89_USBH1_PEN,
GPIO119_USBH2_PWR,
GPIO120_USBH2_PEN,
}; };
/****************************************************************************** /******************************************************************************
...@@ -172,6 +180,31 @@ static void __init colibri_pxa270_mmc_init(void) ...@@ -172,6 +180,31 @@ static void __init colibri_pxa270_mmc_init(void)
static inline void colibri_pxa270_mmc_init(void) {} static inline void colibri_pxa270_mmc_init(void) {}
#endif #endif
/******************************************************************************
* USB Host
******************************************************************************/
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
static int colibri_pxa270_ohci_init(struct device *dev)
{
UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
return 0;
}
static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
.port_mode = PMM_PERPORT_MODE,
.flags = ENABLE_PORT1 | ENABLE_PORT2 |
POWER_CONTROL_LOW | POWER_SENSE_LOW,
.init = colibri_pxa270_ohci_init,
};
static void __init colibri_pxa270_uhc_init(void)
{
pxa_set_ohci_info(&colibri_pxa270_ohci_info);
}
#else
static inline void colibri_pxa270_uhc_init(void) {}
#endif
static void __init colibri_pxa270_init(void) static void __init colibri_pxa270_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
...@@ -182,6 +215,7 @@ static void __init colibri_pxa270_init(void) ...@@ -182,6 +215,7 @@ static void __init colibri_pxa270_init(void)
colibri_pxa270_nor_init(); colibri_pxa270_nor_init();
colibri_pxa270_eth_init(); colibri_pxa270_eth_init();
colibri_pxa270_mmc_init(); colibri_pxa270_mmc_init();
colibri_pxa270_uhc_init();
} }
MACHINE_START(COLIBRI, "Toradex Colibri PXA270") MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment