ti_sdhcreg.h revision 1.1 1 1.1 jmcneill /* $NetBSD: ti_sdhcreg.h,v 1.1 2019/10/27 15:43:46 jmcneill Exp $ */
2 1.1 jmcneill /*-
3 1.1 jmcneill * Copyright (c) 2012 The NetBSD Foundation, Inc.
4 1.1 jmcneill * All rights reserved.
5 1.1 jmcneill *
6 1.1 jmcneill * This code is derived from software contributed to The NetBSD Foundation
7 1.1 jmcneill * by Matt Thomas of 3am Software Foundry.
8 1.1 jmcneill *
9 1.1 jmcneill * Redistribution and use in source and binary forms, with or without
10 1.1 jmcneill * modification, are permitted provided that the following conditions
11 1.1 jmcneill * are met:
12 1.1 jmcneill * 1. Redistributions of source code must retain the above copyright
13 1.1 jmcneill * notice, this list of conditions and the following disclaimer.
14 1.1 jmcneill * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 jmcneill * notice, this list of conditions and the following disclaimer in the
16 1.1 jmcneill * documentation and/or other materials provided with the distribution.
17 1.1 jmcneill *
18 1.1 jmcneill * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 1.1 jmcneill * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 1.1 jmcneill * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 1.1 jmcneill * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 1.1 jmcneill * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 1.1 jmcneill * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 1.1 jmcneill * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 1.1 jmcneill * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 1.1 jmcneill * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 1.1 jmcneill * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 1.1 jmcneill * POSSIBILITY OF SUCH DAMAGE.
29 1.1 jmcneill */
30 1.1 jmcneill
31 1.1 jmcneill #ifndef _TI_SDMMCREG_H_
32 1.1 jmcneill #define _TI_SDMMCREG_H_
33 1.1 jmcneill
34 1.1 jmcneill #define MMCHS_HL_REV 0x000
35 1.1 jmcneill #define MMCHS_HL_HWINFO 0x004
36 1.1 jmcneill # define HL_HWINFO_RETMODE (1 << 8)
37 1.1 jmcneill # define HL_HWINFO_MEM_SIZE_MASK (0xf << 2)
38 1.1 jmcneill # define HL_HWINFO_MEM_SIZE_512 (0x1 << 2)
39 1.1 jmcneill # define HL_HWINFO_MEM_SIZE_1024 (0x2 << 2)
40 1.1 jmcneill # define HL_HWINFO_MEM_SIZE_2048 (0x4 << 2)
41 1.1 jmcneill # define HL_HWINFO_MEM_SIZE_4096 (0x8 << 2)
42 1.1 jmcneill # define HL_HWINFO_MEMRGE_MEM (1 << 1)
43 1.1 jmcneill # define HL_HWINFO_MADMA_EN (1 << 0)
44 1.1 jmcneill #define MMCHS_HL_SYSCONFIG 0x010
45 1.1 jmcneill # define HL_SYSCONFIG_STANDBYMODE_MASK (0x3 << 2)
46 1.1 jmcneill # define HL_SYSCONFIG_STANDBYMODE_FORCE (0 << 2)
47 1.1 jmcneill # define HL_SYSCONFIG_STANDBYMODE_NO (1 << 2)
48 1.1 jmcneill # define HL_SYSCONFIG_STANDBYMODE_SMART (2 << 2)
49 1.1 jmcneill # define HL_SYSCONFIG_STANDBYMODE_WC (3 << 2) /* Smart-Idle wakeup-capable */
50 1.1 jmcneill # define HL_SYSCONFIG_IDLEMODE_MASK (0x3 << 2)
51 1.1 jmcneill # define HL_SYSCONFIG_IDLEMODE_FORCE (0 << 2)
52 1.1 jmcneill # define HL_SYSCONFIG_IDLEMODE_NO (1 << 2)
53 1.1 jmcneill # define HL_SYSCONFIG_IDLEMODE_SMART (2 << 2)
54 1.1 jmcneill # define HL_SYSCONFIG_IDLEMODE_WC (3 << 2) /* Smart-Idle wakeup-capable */
55 1.1 jmcneill # define HL_SYSCONFIG_FREEEMU (1 << 1)
56 1.1 jmcneill # define HL_SYSCONFIG_SOFTRESET (1 << 0)
57 1.1 jmcneill
58 1.1 jmcneill #define MMCHS_SYSCONFIG 0x010 /* System Configuration */
59 1.1 jmcneill # define SYSCONFIG_CLOCKACTIVITY_MASK (3 << 8)
60 1.1 jmcneill # define SYSCONFIG_CLOCKACTIVITY_FCLK (2 << 8)
61 1.1 jmcneill # define SYSCONFIG_CLOCKACTIVITY_ICLK (1 << 8)
62 1.1 jmcneill # define SYSCONFIG_SIDLEMODE_MASK (3 << 3)
63 1.1 jmcneill # define SYSCONFIG_SIDLEMODE_AUTO (2 << 3)
64 1.1 jmcneill # define SYSCONFIG_ENAWAKEUP (1 << 2)
65 1.1 jmcneill # define SYSCONFIG_SOFTRESET (1 << 1)
66 1.1 jmcneill # define SYSCONFIG_AUTOIDLE (1 << 0)
67 1.1 jmcneill #define MMCHS_SYSSTATUS 0x014 /* System Status */
68 1.1 jmcneill # define SYSSTATUS_RESETDONE (1 << 0)
69 1.1 jmcneill #define MMCHS_CSRE 0x024 /* Card status response error */
70 1.1 jmcneill #define MMCHS_SYSTEST 0x028 /* System Test */
71 1.1 jmcneill #define MMCHS_CON 0x02c /* Configuration */
72 1.1 jmcneill # define CON_SDMA_LNE (1 << 21) /*Slave DMA Lvl/Edg Rq*/
73 1.1 jmcneill # define CON_MNS (1 << 20) /* DMA Mstr/Slv sel */
74 1.1 jmcneill # define CON_DDR (1 << 19) /* Dual Data Rate */
75 1.1 jmcneill # define CON_CF0 (1 << 18) /*Boot status support*/
76 1.1 jmcneill # define CON_BOOTACK (1 << 17) /*Boot acknowledge rcv*/
77 1.1 jmcneill # define CON_CLKEXTFREE (1 << 16)
78 1.1 jmcneill # define CON_PADEN (1 << 15) /* Ctrl Pow for MMC */
79 1.1 jmcneill # define CON_OBIE (1 << 14) /* Out-of-Band Intr */
80 1.1 jmcneill # define CON_OBIP (1 << 13) /*O-of-B Intr Polarity*/
81 1.1 jmcneill # define CON_CEATA (1 << 12) /* CE-ATA */
82 1.1 jmcneill # define CON_CTPL (1 << 11) /* Ctrl Power dat[1] */
83 1.1 jmcneill # define CON_DVAL_33US (0 << 9) /* debounce filter val*/
84 1.1 jmcneill # define CON_DVAL_231US (1 << 9) /* debounce filter val*/
85 1.1 jmcneill # define CON_DVAL_1MS (2 << 9) /* debounce filter val*/
86 1.1 jmcneill # define CON_DVAL_8_4MS (3 << 9) /* 8.4ms */
87 1.1 jmcneill # define CON_WPP (1 << 8) /* Write protect pol */
88 1.1 jmcneill # define CON_CDP (1 << 7) /*Card detect polarity*/
89 1.1 jmcneill # define CON_MIT (1 << 6) /* MMC interrupt cmd */
90 1.1 jmcneill # define CON_DW8 (1 << 5) /* 8-bit mode */
91 1.1 jmcneill # define CON_MODE (1 << 4) /* SYSTEST mode */
92 1.1 jmcneill # define CON_STR (1 << 3) /* Stream command */
93 1.1 jmcneill # define CON_HR (1 << 2) /* Broadcast host rsp */
94 1.1 jmcneill # define CON_INIT (1 << 1) /* Send init stream */
95 1.1 jmcneill # define CON_OD (1 << 0) /* Card open drain */
96 1.1 jmcneill #define MMCHS_PWCNT 0x030 /* Power counter */
97 1.1 jmcneill
98 1.1 jmcneill #endif
99