30 #ifndef _SAMV71_HSMCI_COMPONENT_ 31 #define _SAMV71_HSMCI_COMPONENT_ 39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 42 __O uint32_t HSMCI_CR;
43 __IO uint32_t HSMCI_MR;
44 __IO uint32_t HSMCI_DTOR;
45 __IO uint32_t HSMCI_SDCR;
46 __IO uint32_t HSMCI_ARGR;
47 __O uint32_t HSMCI_CMDR;
48 __IO uint32_t HSMCI_BLKR;
49 __IO uint32_t HSMCI_CSTOR;
50 __I uint32_t HSMCI_RSPR[4];
51 __I uint32_t HSMCI_RDR;
52 __O uint32_t HSMCI_TDR;
53 __I uint32_t Reserved1[2];
54 __I uint32_t HSMCI_SR;
55 __O uint32_t HSMCI_IER;
56 __O uint32_t HSMCI_IDR;
57 __I uint32_t HSMCI_IMR;
58 __IO uint32_t HSMCI_DMA;
59 __IO uint32_t HSMCI_CFG;
60 __I uint32_t Reserved2[35];
61 __IO uint32_t HSMCI_WPMR;
62 __I uint32_t HSMCI_WPSR;
63 __I uint32_t Reserved3[4];
65 __I uint32_t Reserved4[64];
66 __IO uint32_t HSMCI_FIFO[256];
70 #define HSMCI_CR_MCIEN (0x1u << 0) 71 #define HSMCI_CR_MCIDIS (0x1u << 1) 72 #define HSMCI_CR_PWSEN (0x1u << 2) 73 #define HSMCI_CR_PWSDIS (0x1u << 3) 74 #define HSMCI_CR_SWRST (0x1u << 7) 76 #define HSMCI_MR_CLKDIV_Pos 0 77 #define HSMCI_MR_CLKDIV_Msk (0xffu << HSMCI_MR_CLKDIV_Pos) 78 #define HSMCI_MR_CLKDIV(value) ((HSMCI_MR_CLKDIV_Msk & ((value) << HSMCI_MR_CLKDIV_Pos))) 79 #define HSMCI_MR_PWSDIV_Pos 8 80 #define HSMCI_MR_PWSDIV_Msk (0x7u << HSMCI_MR_PWSDIV_Pos) 81 #define HSMCI_MR_PWSDIV(value) ((HSMCI_MR_PWSDIV_Msk & ((value) << HSMCI_MR_PWSDIV_Pos))) 82 #define HSMCI_MR_RDPROOF (0x1u << 11) 83 #define HSMCI_MR_WRPROOF (0x1u << 12) 84 #define HSMCI_MR_FBYTE (0x1u << 13) 85 #define HSMCI_MR_PADV (0x1u << 14) 86 #define HSMCI_MR_CLKODD (0x1u << 16) 88 #define HSMCI_DTOR_DTOCYC_Pos 0 89 #define HSMCI_DTOR_DTOCYC_Msk (0xfu << HSMCI_DTOR_DTOCYC_Pos) 90 #define HSMCI_DTOR_DTOCYC(value) ((HSMCI_DTOR_DTOCYC_Msk & ((value) << HSMCI_DTOR_DTOCYC_Pos))) 91 #define HSMCI_DTOR_DTOMUL_Pos 4 92 #define HSMCI_DTOR_DTOMUL_Msk (0x7u << HSMCI_DTOR_DTOMUL_Pos) 93 #define HSMCI_DTOR_DTOMUL(value) ((HSMCI_DTOR_DTOMUL_Msk & ((value) << HSMCI_DTOR_DTOMUL_Pos))) 94 #define HSMCI_DTOR_DTOMUL_1 (0x0u << 4) 95 #define HSMCI_DTOR_DTOMUL_16 (0x1u << 4) 96 #define HSMCI_DTOR_DTOMUL_128 (0x2u << 4) 97 #define HSMCI_DTOR_DTOMUL_256 (0x3u << 4) 98 #define HSMCI_DTOR_DTOMUL_1024 (0x4u << 4) 99 #define HSMCI_DTOR_DTOMUL_4096 (0x5u << 4) 100 #define HSMCI_DTOR_DTOMUL_65536 (0x6u << 4) 101 #define HSMCI_DTOR_DTOMUL_1048576 (0x7u << 4) 103 #define HSMCI_SDCR_SDCSEL_Pos 0 104 #define HSMCI_SDCR_SDCSEL_Msk (0x3u << HSMCI_SDCR_SDCSEL_Pos) 105 #define HSMCI_SDCR_SDCSEL(value) ((HSMCI_SDCR_SDCSEL_Msk & ((value) << HSMCI_SDCR_SDCSEL_Pos))) 106 #define HSMCI_SDCR_SDCSEL_SLOTA (0x0u << 0) 107 #define HSMCI_SDCR_SDCBUS_Pos 6 108 #define HSMCI_SDCR_SDCBUS_Msk (0x3u << HSMCI_SDCR_SDCBUS_Pos) 109 #define HSMCI_SDCR_SDCBUS(value) ((HSMCI_SDCR_SDCBUS_Msk & ((value) << HSMCI_SDCR_SDCBUS_Pos))) 110 #define HSMCI_SDCR_SDCBUS_1 (0x0u << 6) 111 #define HSMCI_SDCR_SDCBUS_4 (0x2u << 6) 112 #define HSMCI_SDCR_SDCBUS_8 (0x3u << 6) 114 #define HSMCI_ARGR_ARG_Pos 0 115 #define HSMCI_ARGR_ARG_Msk (0xffffffffu << HSMCI_ARGR_ARG_Pos) 116 #define HSMCI_ARGR_ARG(value) ((HSMCI_ARGR_ARG_Msk & ((value) << HSMCI_ARGR_ARG_Pos))) 118 #define HSMCI_CMDR_CMDNB_Pos 0 119 #define HSMCI_CMDR_CMDNB_Msk (0x3fu << HSMCI_CMDR_CMDNB_Pos) 120 #define HSMCI_CMDR_CMDNB(value) ((HSMCI_CMDR_CMDNB_Msk & ((value) << HSMCI_CMDR_CMDNB_Pos))) 121 #define HSMCI_CMDR_RSPTYP_Pos 6 122 #define HSMCI_CMDR_RSPTYP_Msk (0x3u << HSMCI_CMDR_RSPTYP_Pos) 123 #define HSMCI_CMDR_RSPTYP(value) ((HSMCI_CMDR_RSPTYP_Msk & ((value) << HSMCI_CMDR_RSPTYP_Pos))) 124 #define HSMCI_CMDR_RSPTYP_NORESP (0x0u << 6) 125 #define HSMCI_CMDR_RSPTYP_48_BIT (0x1u << 6) 126 #define HSMCI_CMDR_RSPTYP_136_BIT (0x2u << 6) 127 #define HSMCI_CMDR_RSPTYP_R1B (0x3u << 6) 128 #define HSMCI_CMDR_SPCMD_Pos 8 129 #define HSMCI_CMDR_SPCMD_Msk (0x7u << HSMCI_CMDR_SPCMD_Pos) 130 #define HSMCI_CMDR_SPCMD(value) ((HSMCI_CMDR_SPCMD_Msk & ((value) << HSMCI_CMDR_SPCMD_Pos))) 131 #define HSMCI_CMDR_SPCMD_STD (0x0u << 8) 132 #define HSMCI_CMDR_SPCMD_INIT (0x1u << 8) 133 #define HSMCI_CMDR_SPCMD_SYNC (0x2u << 8) 134 #define HSMCI_CMDR_SPCMD_CE_ATA (0x3u << 8) 135 #define HSMCI_CMDR_SPCMD_IT_CMD (0x4u << 8) 136 #define HSMCI_CMDR_SPCMD_IT_RESP (0x5u << 8) 137 #define HSMCI_CMDR_SPCMD_BOR (0x6u << 8) 138 #define HSMCI_CMDR_SPCMD_EBO (0x7u << 8) 139 #define HSMCI_CMDR_OPDCMD (0x1u << 11) 140 #define HSMCI_CMDR_OPDCMD_PUSHPULL (0x0u << 11) 141 #define HSMCI_CMDR_OPDCMD_OPENDRAIN (0x1u << 11) 142 #define HSMCI_CMDR_MAXLAT (0x1u << 12) 143 #define HSMCI_CMDR_MAXLAT_5 (0x0u << 12) 144 #define HSMCI_CMDR_MAXLAT_64 (0x1u << 12) 145 #define HSMCI_CMDR_TRCMD_Pos 16 146 #define HSMCI_CMDR_TRCMD_Msk (0x3u << HSMCI_CMDR_TRCMD_Pos) 147 #define HSMCI_CMDR_TRCMD(value) ((HSMCI_CMDR_TRCMD_Msk & ((value) << HSMCI_CMDR_TRCMD_Pos))) 148 #define HSMCI_CMDR_TRCMD_NO_DATA (0x0u << 16) 149 #define HSMCI_CMDR_TRCMD_START_DATA (0x1u << 16) 150 #define HSMCI_CMDR_TRCMD_STOP_DATA (0x2u << 16) 151 #define HSMCI_CMDR_TRDIR (0x1u << 18) 152 #define HSMCI_CMDR_TRDIR_WRITE (0x0u << 18) 153 #define HSMCI_CMDR_TRDIR_READ (0x1u << 18) 154 #define HSMCI_CMDR_TRTYP_Pos 19 155 #define HSMCI_CMDR_TRTYP_Msk (0x7u << HSMCI_CMDR_TRTYP_Pos) 156 #define HSMCI_CMDR_TRTYP(value) ((HSMCI_CMDR_TRTYP_Msk & ((value) << HSMCI_CMDR_TRTYP_Pos))) 157 #define HSMCI_CMDR_TRTYP_SINGLE (0x0u << 19) 158 #define HSMCI_CMDR_TRTYP_MULTIPLE (0x1u << 19) 159 #define HSMCI_CMDR_TRTYP_STREAM (0x2u << 19) 160 #define HSMCI_CMDR_TRTYP_BYTE (0x4u << 19) 161 #define HSMCI_CMDR_TRTYP_BLOCK (0x5u << 19) 162 #define HSMCI_CMDR_IOSPCMD_Pos 24 163 #define HSMCI_CMDR_IOSPCMD_Msk (0x3u << HSMCI_CMDR_IOSPCMD_Pos) 164 #define HSMCI_CMDR_IOSPCMD(value) ((HSMCI_CMDR_IOSPCMD_Msk & ((value) << HSMCI_CMDR_IOSPCMD_Pos))) 165 #define HSMCI_CMDR_IOSPCMD_STD (0x0u << 24) 166 #define HSMCI_CMDR_IOSPCMD_SUSPEND (0x1u << 24) 167 #define HSMCI_CMDR_IOSPCMD_RESUME (0x2u << 24) 168 #define HSMCI_CMDR_ATACS (0x1u << 26) 169 #define HSMCI_CMDR_ATACS_NORMAL (0x0u << 26) 170 #define HSMCI_CMDR_ATACS_COMPLETION (0x1u << 26) 171 #define HSMCI_CMDR_BOOT_ACK (0x1u << 27) 173 #define HSMCI_BLKR_BCNT_Pos 0 174 #define HSMCI_BLKR_BCNT_Msk (0xffffu << HSMCI_BLKR_BCNT_Pos) 175 #define HSMCI_BLKR_BCNT(value) ((HSMCI_BLKR_BCNT_Msk & ((value) << HSMCI_BLKR_BCNT_Pos))) 176 #define HSMCI_BLKR_BLKLEN_Pos 16 177 #define HSMCI_BLKR_BLKLEN_Msk (0xffffu << HSMCI_BLKR_BLKLEN_Pos) 178 #define HSMCI_BLKR_BLKLEN(value) ((HSMCI_BLKR_BLKLEN_Msk & ((value) << HSMCI_BLKR_BLKLEN_Pos))) 180 #define HSMCI_CSTOR_CSTOCYC_Pos 0 181 #define HSMCI_CSTOR_CSTOCYC_Msk (0xfu << HSMCI_CSTOR_CSTOCYC_Pos) 182 #define HSMCI_CSTOR_CSTOCYC(value) ((HSMCI_CSTOR_CSTOCYC_Msk & ((value) << HSMCI_CSTOR_CSTOCYC_Pos))) 183 #define HSMCI_CSTOR_CSTOMUL_Pos 4 184 #define HSMCI_CSTOR_CSTOMUL_Msk (0x7u << HSMCI_CSTOR_CSTOMUL_Pos) 185 #define HSMCI_CSTOR_CSTOMUL(value) ((HSMCI_CSTOR_CSTOMUL_Msk & ((value) << HSMCI_CSTOR_CSTOMUL_Pos))) 186 #define HSMCI_CSTOR_CSTOMUL_1 (0x0u << 4) 187 #define HSMCI_CSTOR_CSTOMUL_16 (0x1u << 4) 188 #define HSMCI_CSTOR_CSTOMUL_128 (0x2u << 4) 189 #define HSMCI_CSTOR_CSTOMUL_256 (0x3u << 4) 190 #define HSMCI_CSTOR_CSTOMUL_1024 (0x4u << 4) 191 #define HSMCI_CSTOR_CSTOMUL_4096 (0x5u << 4) 192 #define HSMCI_CSTOR_CSTOMUL_65536 (0x6u << 4) 193 #define HSMCI_CSTOR_CSTOMUL_1048576 (0x7u << 4) 195 #define HSMCI_RSPR_RSP_Pos 0 196 #define HSMCI_RSPR_RSP_Msk (0xffffffffu << HSMCI_RSPR_RSP_Pos) 198 #define HSMCI_RDR_DATA_Pos 0 199 #define HSMCI_RDR_DATA_Msk (0xffffffffu << HSMCI_RDR_DATA_Pos) 201 #define HSMCI_TDR_DATA_Pos 0 202 #define HSMCI_TDR_DATA_Msk (0xffffffffu << HSMCI_TDR_DATA_Pos) 203 #define HSMCI_TDR_DATA(value) ((HSMCI_TDR_DATA_Msk & ((value) << HSMCI_TDR_DATA_Pos))) 205 #define HSMCI_SR_CMDRDY (0x1u << 0) 206 #define HSMCI_SR_RXRDY (0x1u << 1) 207 #define HSMCI_SR_TXRDY (0x1u << 2) 208 #define HSMCI_SR_BLKE (0x1u << 3) 209 #define HSMCI_SR_DTIP (0x1u << 4) 210 #define HSMCI_SR_NOTBUSY (0x1u << 5) 211 #define HSMCI_SR_SDIOIRQA (0x1u << 8) 212 #define HSMCI_SR_SDIOWAIT (0x1u << 12) 213 #define HSMCI_SR_CSRCV (0x1u << 13) 214 #define HSMCI_SR_RINDE (0x1u << 16) 215 #define HSMCI_SR_RDIRE (0x1u << 17) 216 #define HSMCI_SR_RCRCE (0x1u << 18) 217 #define HSMCI_SR_RENDE (0x1u << 19) 218 #define HSMCI_SR_RTOE (0x1u << 20) 219 #define HSMCI_SR_DCRCE (0x1u << 21) 220 #define HSMCI_SR_DTOE (0x1u << 22) 221 #define HSMCI_SR_CSTOE (0x1u << 23) 222 #define HSMCI_SR_BLKOVRE (0x1u << 24) 223 #define HSMCI_SR_FIFOEMPTY (0x1u << 26) 224 #define HSMCI_SR_XFRDONE (0x1u << 27) 225 #define HSMCI_SR_ACKRCV (0x1u << 28) 226 #define HSMCI_SR_ACKRCVE (0x1u << 29) 227 #define HSMCI_SR_OVRE (0x1u << 30) 228 #define HSMCI_SR_UNRE (0x1u << 31) 230 #define HSMCI_IER_CMDRDY (0x1u << 0) 231 #define HSMCI_IER_RXRDY (0x1u << 1) 232 #define HSMCI_IER_TXRDY (0x1u << 2) 233 #define HSMCI_IER_BLKE (0x1u << 3) 234 #define HSMCI_IER_DTIP (0x1u << 4) 235 #define HSMCI_IER_NOTBUSY (0x1u << 5) 236 #define HSMCI_IER_SDIOIRQA (0x1u << 8) 237 #define HSMCI_IER_SDIOWAIT (0x1u << 12) 238 #define HSMCI_IER_CSRCV (0x1u << 13) 239 #define HSMCI_IER_RINDE (0x1u << 16) 240 #define HSMCI_IER_RDIRE (0x1u << 17) 241 #define HSMCI_IER_RCRCE (0x1u << 18) 242 #define HSMCI_IER_RENDE (0x1u << 19) 243 #define HSMCI_IER_RTOE (0x1u << 20) 244 #define HSMCI_IER_DCRCE (0x1u << 21) 245 #define HSMCI_IER_DTOE (0x1u << 22) 246 #define HSMCI_IER_CSTOE (0x1u << 23) 247 #define HSMCI_IER_BLKOVRE (0x1u << 24) 248 #define HSMCI_IER_FIFOEMPTY (0x1u << 26) 249 #define HSMCI_IER_XFRDONE (0x1u << 27) 250 #define HSMCI_IER_ACKRCV (0x1u << 28) 251 #define HSMCI_IER_ACKRCVE (0x1u << 29) 252 #define HSMCI_IER_OVRE (0x1u << 30) 253 #define HSMCI_IER_UNRE (0x1u << 31) 255 #define HSMCI_IDR_CMDRDY (0x1u << 0) 256 #define HSMCI_IDR_RXRDY (0x1u << 1) 257 #define HSMCI_IDR_TXRDY (0x1u << 2) 258 #define HSMCI_IDR_BLKE (0x1u << 3) 259 #define HSMCI_IDR_DTIP (0x1u << 4) 260 #define HSMCI_IDR_NOTBUSY (0x1u << 5) 261 #define HSMCI_IDR_SDIOIRQA (0x1u << 8) 262 #define HSMCI_IDR_SDIOWAIT (0x1u << 12) 263 #define HSMCI_IDR_CSRCV (0x1u << 13) 264 #define HSMCI_IDR_RINDE (0x1u << 16) 265 #define HSMCI_IDR_RDIRE (0x1u << 17) 266 #define HSMCI_IDR_RCRCE (0x1u << 18) 267 #define HSMCI_IDR_RENDE (0x1u << 19) 268 #define HSMCI_IDR_RTOE (0x1u << 20) 269 #define HSMCI_IDR_DCRCE (0x1u << 21) 270 #define HSMCI_IDR_DTOE (0x1u << 22) 271 #define HSMCI_IDR_CSTOE (0x1u << 23) 272 #define HSMCI_IDR_BLKOVRE (0x1u << 24) 273 #define HSMCI_IDR_FIFOEMPTY (0x1u << 26) 274 #define HSMCI_IDR_XFRDONE (0x1u << 27) 275 #define HSMCI_IDR_ACKRCV (0x1u << 28) 276 #define HSMCI_IDR_ACKRCVE (0x1u << 29) 277 #define HSMCI_IDR_OVRE (0x1u << 30) 278 #define HSMCI_IDR_UNRE (0x1u << 31) 280 #define HSMCI_IMR_CMDRDY (0x1u << 0) 281 #define HSMCI_IMR_RXRDY (0x1u << 1) 282 #define HSMCI_IMR_TXRDY (0x1u << 2) 283 #define HSMCI_IMR_BLKE (0x1u << 3) 284 #define HSMCI_IMR_DTIP (0x1u << 4) 285 #define HSMCI_IMR_NOTBUSY (0x1u << 5) 286 #define HSMCI_IMR_SDIOIRQA (0x1u << 8) 287 #define HSMCI_IMR_SDIOWAIT (0x1u << 12) 288 #define HSMCI_IMR_CSRCV (0x1u << 13) 289 #define HSMCI_IMR_RINDE (0x1u << 16) 290 #define HSMCI_IMR_RDIRE (0x1u << 17) 291 #define HSMCI_IMR_RCRCE (0x1u << 18) 292 #define HSMCI_IMR_RENDE (0x1u << 19) 293 #define HSMCI_IMR_RTOE (0x1u << 20) 294 #define HSMCI_IMR_DCRCE (0x1u << 21) 295 #define HSMCI_IMR_DTOE (0x1u << 22) 296 #define HSMCI_IMR_CSTOE (0x1u << 23) 297 #define HSMCI_IMR_BLKOVRE (0x1u << 24) 298 #define HSMCI_IMR_FIFOEMPTY (0x1u << 26) 299 #define HSMCI_IMR_XFRDONE (0x1u << 27) 300 #define HSMCI_IMR_ACKRCV (0x1u << 28) 301 #define HSMCI_IMR_ACKRCVE (0x1u << 29) 302 #define HSMCI_IMR_OVRE (0x1u << 30) 303 #define HSMCI_IMR_UNRE (0x1u << 31) 305 #define HSMCI_DMA_CHKSIZE_Pos 4 306 #define HSMCI_DMA_CHKSIZE_Msk (0x7u << HSMCI_DMA_CHKSIZE_Pos) 307 #define HSMCI_DMA_CHKSIZE(value) ((HSMCI_DMA_CHKSIZE_Msk & ((value) << HSMCI_DMA_CHKSIZE_Pos))) 308 #define HSMCI_DMA_CHKSIZE_1 (0x0u << 4) 309 #define HSMCI_DMA_CHKSIZE_2 (0x1u << 4) 310 #define HSMCI_DMA_CHKSIZE_4 (0x2u << 4) 311 #define HSMCI_DMA_CHKSIZE_8 (0x3u << 4) 312 #define HSMCI_DMA_CHKSIZE_16 (0x4u << 4) 313 #define HSMCI_DMA_DMAEN (0x1u << 8) 315 #define HSMCI_CFG_FIFOMODE (0x1u << 0) 316 #define HSMCI_CFG_FERRCTRL (0x1u << 4) 317 #define HSMCI_CFG_HSMODE (0x1u << 8) 318 #define HSMCI_CFG_LSYNC (0x1u << 12) 320 #define HSMCI_WPMR_WPEN (0x1u << 0) 321 #define HSMCI_WPMR_WPKEY_Pos 8 322 #define HSMCI_WPMR_WPKEY_Msk (0xffffffu << HSMCI_WPMR_WPKEY_Pos) 323 #define HSMCI_WPMR_WPKEY(value) ((HSMCI_WPMR_WPKEY_Msk & ((value) << HSMCI_WPMR_WPKEY_Pos))) 324 #define HSMCI_WPMR_WPKEY_PASSWD (0x4D4349u << 8) 326 #define HSMCI_WPSR_WPVS (0x1u << 0) 327 #define HSMCI_WPSR_WPVSRC_Pos 8 328 #define HSMCI_WPSR_WPVSRC_Msk (0xffffu << HSMCI_WPSR_WPVSRC_Pos) 330 #define HSMCI_VERSION_VERSION_Pos 0 331 #define HSMCI_VERSION_VERSION_Msk (0xfffu << HSMCI_VERSION_VERSION_Pos) 332 #define HSMCI_VERSION_MFN_Pos 16 333 #define HSMCI_VERSION_MFN_Msk (0x7u << HSMCI_VERSION_MFN_Pos) 335 #define HSMCI_FIFO_DATA_Pos 0 336 #define HSMCI_FIFO_DATA_Msk (0xffffffffu << HSMCI_FIFO_DATA_Pos) 337 #define HSMCI_FIFO_DATA(value) ((HSMCI_FIFO_DATA_Msk & ((value) << HSMCI_FIFO_DATA_Pos))) #define __IO
Definition: core_cm7.h:287
#define __O
Definition: core_cm7.h:286
Hsmci hardware registers.
Definition: component_hsmci.h:41
__I uint32_t HSMCI_VERSION
(Hsmci Offset: 0xFC) Version Register
Definition: component_hsmci.h:64
#define __I
Definition: core_cm7.h:284