source: mainline/uspace/drv/infrastructure/rootamdm37x/uhh.h@ 063ae706

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 063ae706 was 063ae706, checked in by Jan Vesely <jano.vesely@…>, 13 years ago

rootamdm37x: Add USB TLL and UHH headers, TLL initialization stub.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*
2 * Copyright (c) 2012 Jan Vesely
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup amdm37xdrvuhh
30 * @{
31 */
32/** @file
33 * @brief UHH IO register structure.
34 */
35#ifndef AMDM37x_UHH_H
36#define AMDM37x_UHH_H
37#include <sys/types.h>
38
39#define AMDM37x_UHH_BASE_ADDRESS 0x48064000
40#define AMDM37x_UHH_SIZE 1024
41
42typedef struct {
43 const ioport32_t revision;
44#define UHH_REVISION_MASK 0xf
45#define UHH_REVISION_MINOR_SHIFT 0
46#define UHH_REVISION_MAJOR_SHIFT 4
47
48 uint32_t padd0_[3];
49 ioport32_t sysconfig;
50#define UHH_SYSCONFIG_AUTOIDLE_FLAG (1 << 0)
51#define UHH_SYSCONFIG_SOFTRESET_FLAG (1 << 1)
52#define UHH_SYSCONFIG_ENWAKEUP_FLAG (1 << 2)
53#define UHH_SYSCONFIG_CLOCKACTIVITY_FLAG (1 << 8)
54#define UHH_SYSCONFIG_SIDLE_MODE_MASK 0x3
55#define UHH_SYSCONFIG_SIDLE_MODE_SHIFT 3
56#define UHH_SYSCONFIG_MIDLE_MODE_MASK 0x3
57#define UHH_SYSCONFIG_MIDLE_MODE_SHIFT 12
58
59 const ioport32_t sysstatus;
60#define UHH_SYSSTATUS_RESETDONE_FLAG (1 << 0)
61#define UHH_SYSSTATUS_OHCI_RESETDONE_FLAG (1 << 1)
62#define UHH_SYSSTATUS_EHCI_RESETDONE_FLAG (1 << 2)
63
64 uint32_t padd1_[10];
65 ioport32_t hostconfig;
66#define UHH_HOSTCONFIG_P1_ULPI_BYPASS_FLAG (1 << 0)
67#define UHH_HOSTCONFIG_AUTOPPD_ON_OVERCUR_EN_FLAG (1 << 1)
68#define UHH_HOSTCONFIG_ENA_INCR4_FLAG (1 << 2)
69#define UHH_HOSTCONFIG_ENA_INCR8_FLAG (1 << 3)
70#define UHH_HOSTCONFIG_ENA_INCR16_FLA (1 << 4)
71#define UHH_HOSTCONFIG_ENA_INCR_ALIGN_FLAG (1 << 5)
72#define UHH_HOSTCONFIG_P1_CONNECT_STATUS_FLAG (1 << 8)
73#define UHH_HOSTCONFIG_P2_CONNECT_STATUS_FLAG (1 << 9)
74#define UHH_HOSTCONFIG_P3_CONNECT_STATUS_FLAG (1 << 10)
75#define UHH_HOSTCONFIG_P2_ULPI_BYPASS_FLAG (1 << 11)
76#define UHH_HOSTCONFIG_P3_ULPI_BYPASS_FLAG (1 << 12)
77
78 ioport32_t debug_csr;
79#define UHH_DEBUG_CSR_EHCI_FLADJ_MASK (0x3f)
80#define UHH_DEBUG_CSR_EHCI_FLADJ_SHIFT 0
81#define UHH_DEBUG_CSR_EHCI_SIMULATION_MODE_FLAG (1 << 6)
82#define UHH_DEBUG_CSR_OHCI_CNTSEL_FLAG (1 << 7)
83#define UHH_DEBUG_CSR_OHCI_GLOBAL_sUSPEND_FLAG (1 << 16)
84#define UHH_DEBUG_CSR_OHCI_CCS1_FLAG (1 << 17)
85#define UHH_DEBUG_CSR_OHCI_CCS2_FLAG (1 << 18)
86#define UHH_DEBUG_CSR_OHCI_CCS3_FLAG (1 << 19)
87
88} uhh_regs_t;
89
90#endif
91/**
92 * @}
93 */
Note: See TracBrowser for help on using the repository browser.