Go to the documentation of this file.
12 #ifndef LINUX_MMC_SDIO_H
13 #define LINUX_MMC_SDIO_H
16 #define SD_IO_SEND_OP_COND 5
17 #define SD_IO_RW_DIRECT 52
18 #define SD_IO_RW_EXTENDED 53
41 #define R4_18V_PRESENT (1<<24)
42 #define R4_MEMORY_PRESENT (1 << 27)
59 #define R5_COM_CRC_ERROR (1 << 15)
60 #define R5_ILLEGAL_COMMAND (1 << 14)
61 #define R5_ERROR (1 << 11)
62 #define R5_FUNCTION_NUMBER (1 << 9)
63 #define R5_OUT_OF_RANGE (1 << 8)
64 #define R5_STATUS(x) (x & 0xCB00)
65 #define R5_IO_CURRENT_STATE(x) ((x & 0x3000) >> 12)
71 #define SDIO_CCCR_CCCR 0x00
73 #define SDIO_CCCR_REV_1_00 0
74 #define SDIO_CCCR_REV_1_10 1
75 #define SDIO_CCCR_REV_1_20 2
76 #define SDIO_CCCR_REV_3_00 3
78 #define SDIO_SDIO_REV_1_00 0
79 #define SDIO_SDIO_REV_1_10 1
80 #define SDIO_SDIO_REV_1_20 2
81 #define SDIO_SDIO_REV_2_00 3
82 #define SDIO_SDIO_REV_3_00 4
84 #define SDIO_CCCR_SD 0x01
86 #define SDIO_SD_REV_1_01 0
87 #define SDIO_SD_REV_1_10 1
88 #define SDIO_SD_REV_2_00 2
89 #define SDIO_SD_REV_3_00 3
91 #define SDIO_CCCR_IOEx 0x02
92 #define SDIO_CCCR_IORx 0x03
94 #define SDIO_CCCR_IENx 0x04
95 #define SDIO_CCCR_INTx 0x05
97 #define SDIO_CCCR_ABORT 0x06
99 #define SDIO_CCCR_IF 0x07
101 #define SDIO_BUS_WIDTH_MASK 0x03
102 #define SDIO_BUS_WIDTH_1BIT 0x00
103 #define SDIO_BUS_WIDTH_RESERVED 0x01
104 #define SDIO_BUS_WIDTH_4BIT 0x02
105 #define SDIO_BUS_ECSI 0x20
106 #define SDIO_BUS_SCSI 0x40
108 #define SDIO_BUS_ASYNC_INT 0x20
110 #define SDIO_BUS_CD_DISABLE 0x80
112 #define SDIO_CCCR_CAPS 0x08
114 #define SDIO_CCCR_CAP_SDC 0x01
115 #define SDIO_CCCR_CAP_SMB 0x02
116 #define SDIO_CCCR_CAP_SRW 0x04
117 #define SDIO_CCCR_CAP_SBS 0x08
118 #define SDIO_CCCR_CAP_S4MI 0x10
119 #define SDIO_CCCR_CAP_E4MI 0x20
120 #define SDIO_CCCR_CAP_LSC 0x40
121 #define SDIO_CCCR_CAP_4BLS 0x80
123 #define SDIO_CCCR_CIS 0x09
126 #define SDIO_CCCR_SUSPEND 0x0c
127 #define SDIO_CCCR_SELx 0x0d
128 #define SDIO_CCCR_EXECx 0x0e
129 #define SDIO_CCCR_READYx 0x0f
131 #define SDIO_CCCR_BLKSIZE 0x10
133 #define SDIO_CCCR_POWER 0x12
135 #define SDIO_POWER_SMPC 0x01
136 #define SDIO_POWER_EMPC 0x02
138 #define SDIO_CCCR_SPEED 0x13
140 #define SDIO_SPEED_SHS 0x01
141 #define SDIO_SPEED_BSS_SHIFT 1
142 #define SDIO_SPEED_BSS_MASK (7<<SDIO_SPEED_BSS_SHIFT)
143 #define SDIO_SPEED_SDR12 (0<<SDIO_SPEED_BSS_SHIFT)
144 #define SDIO_SPEED_SDR25 (1<<SDIO_SPEED_BSS_SHIFT)
145 #define SDIO_SPEED_SDR50 (2<<SDIO_SPEED_BSS_SHIFT)
146 #define SDIO_SPEED_SDR104 (3<<SDIO_SPEED_BSS_SHIFT)
147 #define SDIO_SPEED_DDR50 (4<<SDIO_SPEED_BSS_SHIFT)
148 #define SDIO_SPEED_EHS SDIO_SPEED_SDR25
150 #define SDIO_CCCR_UHS 0x14
151 #define SDIO_UHS_SDR50 0x01
152 #define SDIO_UHS_SDR104 0x02
153 #define SDIO_UHS_DDR50 0x04
155 #define SDIO_CCCR_DRIVE_STRENGTH 0x15
156 #define SDIO_SDTx_MASK 0x07
157 #define SDIO_DRIVE_SDTA (1<<0)
158 #define SDIO_DRIVE_SDTC (1<<1)
159 #define SDIO_DRIVE_SDTD (1<<2)
160 #define SDIO_DRIVE_DTSx_MASK 0x03
161 #define SDIO_DRIVE_DTSx_SHIFT 4
162 #define SDIO_DTSx_SET_TYPE_B (0 << SDIO_DRIVE_DTSx_SHIFT)
163 #define SDIO_DTSx_SET_TYPE_A (1 << SDIO_DRIVE_DTSx_SHIFT)
164 #define SDIO_DTSx_SET_TYPE_C (2 << SDIO_DRIVE_DTSx_SHIFT)
165 #define SDIO_DTSx_SET_TYPE_D (3 << SDIO_DRIVE_DTSx_SHIFT)
170 #define SDIO_FBR_BASE(f) ((f) * 0x100)
172 #define SDIO_FBR_STD_IF 0x00
174 #define SDIO_FBR_SUPPORTS_CSA 0x40
175 #define SDIO_FBR_ENABLE_CSA 0x80
177 #define SDIO_FBR_STD_IF_EXT 0x01
179 #define SDIO_FBR_POWER 0x02
181 #define SDIO_FBR_POWER_SPS 0x01
182 #define SDIO_FBR_POWER_EPS 0x02
184 #define SDIO_FBR_CIS 0x09
187 #define SDIO_FBR_CSA 0x0C
189 #define SDIO_FBR_CSA_DATA 0x0F
191 #define SDIO_FBR_BLKSIZE 0x10