uboot/drivers/usb/musb/am35x.h
<<
>>
Prefs
   1/*
   2 * am35x.h - TI's AM35x platform specific usb wrapper definitions.
   3 *
   4 * Author: Ajay Kumar Gupta <ajay.gupta@ti.com>
   5 *
   6 * Based on drivers/usb/musb/da8xx.h
   7 *
   8 * Copyright (c) 2010 Texas Instruments Incorporated
   9 *
  10 * This program is free software; you can redistribute it and/or modify
  11 * it under the terms of the GNU General Public License as published by
  12 * the Free Software Foundation; either version 2 of the License, or
  13 * (at your option) any later version.
  14 *
  15 * This program is distributed in the hope that it will be useful,
  16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18 * GNU General Public License for more details.
  19 *
  20 * You should have received a copy of the GNU General Public License
  21 * along with this program; if not, write to the Free Software
  22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23 */
  24
  25#ifndef __AM35X_USB_H__
  26#define __AM35X_USB_H__
  27
  28#include <asm/arch/am35x_def.h>
  29#include "musb_core.h"
  30
  31/* Base address of musb wrapper */
  32#define AM35X_USB_OTG_BASE      0x5C040000
  33
  34/* Base address of musb core */
  35#define AM35X_USB_OTG_CORE_BASE (AM35X_USB_OTG_BASE + 0x400)
  36
  37/* Timeout for AM35x usb module */
  38#define AM35X_USB_OTG_TIMEOUT   0x3FFFFFF
  39
  40/*
  41 * AM35x platform USB wrapper register overlay.
  42 */
  43struct am35x_usb_regs {
  44        u32     revision;
  45        u32     control;
  46        u32     status;
  47        u32     emulation;
  48        u32     reserved0[1];
  49        u32     autoreq;
  50        u32     srpfixtime;
  51        u32     ep_intsrc;
  52        u32     ep_intsrcset;
  53        u32     ep_intsrcclr;
  54        u32     ep_intmsk;
  55        u32     ep_intmskset;
  56        u32     ep_intmskclr;
  57        u32     ep_intsrcmsked;
  58        u32     reserved1[1];
  59        u32     core_intsrc;
  60        u32     core_intsrcset;
  61        u32     core_intsrcclr;
  62        u32     core_intmsk;
  63        u32     core_intmskset;
  64        u32     core_intmskclr;
  65        u32     core_intsrcmsked;
  66        u32     reserved2[1];
  67        u32     eoi;
  68        u32     mop_sop_en;
  69        u32     reserved3[2];
  70        u32     txmode;
  71        u32     rxmode;
  72        u32     epcount_mode;
  73};
  74
  75#define am35x_usb_regs ((struct am35x_usb_regs *)AM35X_USB_OTG_BASE)
  76
  77/* USB 2.0 PHY Control */
  78#define DEVCONF2_PHY_GPIOMODE   (1 << 23)
  79#define DEVCONF2_OTGMODE        (3 << 14)
  80#define DEVCONF2_SESENDEN       (1 << 13)       /* Vsess_end comparator */
  81#define DEVCONF2_VBDTCTEN       (1 << 12)       /* Vbus comparator */
  82#define DEVCONF2_REFFREQ_24MHZ  (2 << 8)
  83#define DEVCONF2_REFFREQ_26MHZ  (7 << 8)
  84#define DEVCONF2_REFFREQ_13MHZ  (6 << 8)
  85#define DEVCONF2_REFFREQ        (0xf << 8)
  86#define DEVCONF2_PHYCKGD        (1 << 7)
  87#define DEVCONF2_VBUSSENSE      (1 << 6)
  88#define DEVCONF2_PHY_PLLON      (1 << 5)        /* override PLL suspend */
  89#define DEVCONF2_RESET          (1 << 4)
  90#define DEVCONF2_PHYPWRDN       (1 << 3)
  91#define DEVCONF2_OTGPWRDN       (1 << 2)
  92#define DEVCONF2_DATPOL         (1 << 1)
  93
  94#endif  /* __AM35X_USB_H__ */
  95