Path: blob/master/arch/arm/mach-davinci/include/mach/usb.h
17602 views
/*1* USB related definitions2*3* Copyright (C) 2009 MontaVista Software, Inc. <[email protected]>4*5* This file is licensed under the terms of the GNU General Public License6* version 2. This program is licensed "as is" without any warranty of any7* kind, whether express or implied.8*/910#ifndef __ASM_ARCH_USB_H11#define __ASM_ARCH_USB_H1213/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */14#define CFGCHIP2_PHYCLKGD (1 << 17)15#define CFGCHIP2_VBUSSENSE (1 << 16)16#define CFGCHIP2_RESET (1 << 15)17#define CFGCHIP2_OTGMODE (3 << 13)18#define CFGCHIP2_NO_OVERRIDE (0 << 13)19#define CFGCHIP2_FORCE_HOST (1 << 13)20#define CFGCHIP2_FORCE_DEVICE (2 << 13)21#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)22#define CFGCHIP2_USB1PHYCLKMUX (1 << 12)23#define CFGCHIP2_USB2PHYCLKMUX (1 << 11)24#define CFGCHIP2_PHYPWRDN (1 << 10)25#define CFGCHIP2_OTGPWRDN (1 << 9)26#define CFGCHIP2_DATPOL (1 << 8)27#define CFGCHIP2_USB1SUSPENDM (1 << 7)28#define CFGCHIP2_PHY_PLLON (1 << 6) /* override PLL suspend */29#define CFGCHIP2_SESENDEN (1 << 5) /* Vsess_end comparator */30#define CFGCHIP2_VBDTCTEN (1 << 4) /* Vbus comparator */31#define CFGCHIP2_REFFREQ (0xf << 0)32#define CFGCHIP2_REFFREQ_12MHZ (1 << 0)33#define CFGCHIP2_REFFREQ_24MHZ (2 << 0)34#define CFGCHIP2_REFFREQ_48MHZ (3 << 0)3536struct da8xx_ohci_root_hub;3738typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,39unsigned port);4041/* Passed as the platform data to the OHCI driver */42struct da8xx_ohci_root_hub {43/* Switch the port power on/off */44int (*set_power)(unsigned port, int on);45/* Read the port power status */46int (*get_power)(unsigned port);47/* Read the port over-current indicator */48int (*get_oci)(unsigned port);49/* Over-current indicator change notification (pass NULL to disable) */50int (*ocic_notify)(da8xx_ocic_handler_t handler);5152/* Time from power on to power good (in 2 ms units) */53u8 potpgt;54};5556void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);5758#endif /* ifndef __ASM_ARCH_USB_H */596061