Commit dbe20580 authored by Vikram Pandita's avatar Vikram Pandita Committed by Tony Lindgren

USB: Add OMAP EHCI glue layer

This patch adds OMAP EHCI glue layer and Menu config option.
Incorporated Paul Walmsley review comments on usage of
cm_{read,write}_mod_reg().
Signed-off-by: default avatarVikram Pandita <vikram.pandita@ti.com>
Acked-by: default avatarKamat, Nishant <nskamat@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e567965d
......@@ -49,6 +49,7 @@ config USB_ARCH_HAS_EHCI
boolean
default y if PPC_83xx
default y if SOC_AU1200
default y if ARCH_OMAP34XX
default PCI
# ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
......
......@@ -28,6 +28,25 @@ config USB_EHCI_HCD
To compile this driver as a module, choose M here: the
module will be called ehci-hcd.
choice
prompt "PHY/TLL mode"
depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX
---help---
Choose PHY or TLL mode of operation
config OMAP_EHCI_PHY_MODE
bool "PHY mode: ISP1504 on Port1/2 (NEW 3430ES2.0)"
depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX
---help---
EHCI PHY mode. Port1 and Port2 are connected to ISP1504 transcievers
config OMAP_EHCI_TLL_MODE
bool "TLL mode: (EXPERIMENTAL)"
depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX
---help---
OMAP EHCI controller has TLL mode of operation for all 3 ports.
Use this mode when no transciever is present
endchoice
config USB_EHCI_SPLIT_ISO
bool "Full speed ISO transactions (EXPERIMENTAL)"
......
......@@ -954,6 +954,11 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER ehci_hcd_au1xxx_driver
#endif
#ifdef CONFIG_ARCH_OMAP34XX
#include "ehci-omap.c"
#define PLATFORM_DRIVER ehci_hcd_omap_driver
#endif
#ifdef CONFIG_PPC_PS3
#include "ehci-ps3.c"
#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver
......
This diff is collapsed.
/*
* ehci-omap.h - register definitions for USBHOST in OMAP 34xx
*
* Copyright (C) 2007-2008 Texas Instruments, Inc.
* Copyright (C) 2007-2008 Vikram Pandita <vikram.pandita@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __EHCI_OMAP_H
#define __EHCI_OMAP_H
#include <asm/hardware.h>
#include "../../../arch/arm/mach-omap2/cm.h"
#include "../../../arch/arm/mach-omap2/cm_regbits_34xx.h"
/*
* OMAP USBHOST Register addresses: PHYSICAL ADDRESSES
* Use omap_readl()/omap_writel() functions
*/
/* USBHOST: TLL, UUH, OHCI, EHCI */
#define OMAP_USBHOST_BASE (L4_34XX_BASE + 0x60000)
/* TLL Register Set */
#define OMAP_USBHOST_TLL_BASE (OMAP_USBHOST_BASE + 0x2000)
#define OMAP_USBTLL_REVISION (OMAP_USBHOST_TLL_BASE + 0x00)
#define OMAP_USBTLL_SYSCONFIG (OMAP_USBHOST_TLL_BASE + 0x10)
#define OMAP_USBTLL_SYSCONFIG_CACTIVITY_SHIFT 8
#define OMAP_USBTLL_SYSCONFIG_SIDLEMODE_SHIFT 3
#define OMAP_USBTLL_SYSCONFIG_ENAWAKEUP_SHIFT 2
#define OMAP_USBTLL_SYSCONFIG_SOFTRESET_SHIFT 1
#define OMAP_USBTLL_SYSCONFIG_AUTOIDLE_SHIFT 0
#define OMAP_USBTLL_SYSSTATUS (OMAP_USBHOST_TLL_BASE + 0x14)
#define OMAP_USBTLL_SYSSTATUS_RESETDONE_SHIFT 0
#define OMAP_USBTLL_IRQSTATUS (OMAP_USBHOST_TLL_BASE + 0x18)
#define OMAP_USBTLL_IRQENABLE (OMAP_USBHOST_TLL_BASE + 0x1C)
#define OMAP_TLL_SHARED_CONF (OMAP_USBHOST_TLL_BASE + 0x30)
#define OMAP_TLL_SHARED_CONF_USB_90D_DDR_EN_SHFT 6
#define OMAP_TLL_SHARED_CONF_USB_180D_SDR_EN_SHIFT 5
#define OMAP_TLL_SHARED_CONF_USB_DIVRATION_SHIFT 2
#define OMAP_TLL_SHARED_CONF_FCLK_REQ_SHIFT 1
#define OMAP_TLL_SHARED_CONF_FCLK_IS_ON_SHIFT 0
#define OMAP_TLL_CHANNEL_CONF(num)\
(OMAP_USBHOST_TLL_BASE + (0x040 + 0x004 * num))
#define OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF_SHIFT 11
#define OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE_SHIFT 10
#define OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE_SHIFT 9
#define OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE_SHIFT 8
#define OMAP_TLL_CHANNEL_CONF_CHANEN_SHIFT 0
#define OMAP_TLL_ULPI_FUNCTION_CTRL(num)\
(OMAP_USBHOST_TLL_BASE + (0x804 + 0x100 * num))
#define OMAP_TLL_ULPI_INTERFACE_CTRL(num)\
(OMAP_USBHOST_TLL_BASE + (0x807 + 0x100 * num))
#define OMAP_TLL_ULPI_OTG_CTRL(num)\
(OMAP_USBHOST_TLL_BASE + (0x80A + 0x100 * num))
#define OMAP_TLL_ULPI_INT_EN_RISE(num)\
(OMAP_USBHOST_TLL_BASE + (0x80D + 0x100 * num))
#define OMAP_TLL_ULPI_INT_EN_FALL(num)\
(OMAP_USBHOST_TLL_BASE + (0x810 + 0x100 * num))
#define OMAP_TLL_ULPI_INT_STATUS(num)\
(OMAP_USBHOST_TLL_BASE + (0x813 + 0x100 * num))
#define OMAP_TLL_ULPI_INT_LATCH(num)\
(OMAP_USBHOST_TLL_BASE + (0x814 + 0x100 * num))
#define OMAP_TLL_ULPI_DEBUG(num)\
(OMAP_USBHOST_TLL_BASE + (0x815 + 0x100 * num))
#define OMAP_TLL_ULPI_SCRATCH_REGISTER(num)\
(OMAP_USBHOST_TLL_BASE + (0x8165 + 0x100 * num))
/* UHH Register Set */
#define OMAP_USBHOST_UHH_BASE (OMAP_USBHOST_BASE + 0x4000)
#define OMAP_UHH_REVISION (OMAP_USBHOST_UHH_BASE + 0x00)
#define OMAP_UHH_SYSCONFIG (OMAP_USBHOST_UHH_BASE + 0x10)
#define OMAP_UHH_SYSCONFIG_MIDLEMODE_SHIFT 12
#define OMAP_UHH_SYSCONFIG_CACTIVITY_SHIFT 8
#define OMAP_UHH_SYSCONFIG_SIDLEMODE_SHIFT 3
#define OMAP_UHH_SYSCONFIG_ENAWAKEUP_SHIFT 2
#define OMAP_UHH_SYSCONFIG_SOFTRESET_SHIFT 1
#define OMAP_UHH_SYSCONFIG_AUTOIDLE_SHIFT 0
#define OMAP_UHH_SYSSTATUS (OMAP_USBHOST_UHH_BASE + 0x14)
#define OMAP_UHH_HOSTCONFIG (OMAP_USBHOST_UHH_BASE + 0x40)
#define OMAP_UHH_HOSTCONFIG_ULPI_BYPASS_SHIFT 0
#define OMAP_UHH_DEBUG_CSR (OMAP_USBHOST_UHH_BASE + 0x44)
/* EHCI Register Set */
#define OMAP_USBHOST_EHCI_BASE (OMAP_USBHOST_BASE + 0x4800)
#define EHCI_INSNREG05_ULPI (OMAP_USBHOST_EHCI_BASE + 0xA4)
#define EHCI_INSNREG05_ULPI_CONTROL_SHIFT 31
#define EHCI_INSNREG05_ULPI_PORTSEL_SHIFT 24
#define EHCI_INSNREG05_ULPI_OPSEL_SHIFT 22
#define EHCI_INSNREG05_ULPI_REGADD_SHIFT 16
#define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8
#define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0
/* OHCI Register Set */
#define OMAP_USBHOST_OHCI_BASE (OMAP_USBHOST_BASE + 0x4400)
#endif/* __EHCI_OMAP_H*/
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