11#ifndef ZEPHYR_SUBSYS_SD_SPEC_H_
12#define ZEPHYR_SUBSYS_SD_SPEC_H_
131#define SD_R1_CURRENT_STATE(x) (((x) & SD_R1_CUR_STATE) >> 9U)
183#define SD_SPI_CMD_SIZE 6
184#define SD_SPI_CMD_BODY_SIZE (SD_SPI_CMD_SIZE - 1)
186#define SD_SPI_CRC16_SIZE 2
189#define SD_SPI_START 0x80
190#define SD_SPI_TX 0x40
191#define SD_SPI_CMD 0x3F
194#define SD_SPI_TOKEN_SINGLE 0xFE
195#define SD_SPI_TOKEN_MULTI_WRITE 0xFC
196#define SD_SPI_TOKEN_STOP_TRAN 0xFD
199#define SD_SPI_RESPONSE_ACCEPTED 0x05
200#define SD_SPI_RESPONSE_CRC_ERR 0x0B
201#define SD_SPI_RESPONSE_WRITE_ERR 0x0C
204#define SD_IF_COND_VHS_MASK (0x0F << 8)
205#define SD_IF_COND_VHS_3V3 BIT(8)
206#define SD_IF_COND_CHECK 0xAA
305#define SDIO_OCR_IO_NUMBER_SHIFT 28
307#define SDIO_IO_OCR_MASK 0xFFFFFF
514#define SD_PRODUCT_NAME_BYTES 5
777#define SDMMC_DEFAULT_BLOCK_SIZE 512
778#define MMC_EXT_CSD_BYTES 512
806#define SDIO_CMD_ARG_RW_SHIFT 31
807#define SDIO_CMD_ARG_FUNC_NUM_SHIFT 28
808#define SDIO_DIRECT_CMD_ARG_RAW_SHIFT 27
809#define SDIO_CMD_ARG_REG_ADDR_SHIFT 9
810#define SDIO_CMD_ARG_REG_ADDR_MASK 0x1FFFF
811#define SDIO_DIRECT_CMD_DATA_MASK 0xFF
813#define SDIO_EXTEND_CMD_ARG_BLK_SHIFT 27
814#define SDIO_EXTEND_CMD_ARG_OP_CODE_SHIFT 26
821#define SDIO_CCCR_CCCR 0x00
822#define SDIO_CCCR_CCCR_REV_MASK 0x0F
823#define SDIO_CCCR_CCCR_REV_SHIFT 0x0
824#define SDIO_CCCR_CCCR_REV_1_00 0x0
825#define SDIO_CCCR_CCCR_REV_1_10 0x1
826#define SDIO_CCCR_CCCR_REV_2_00 0x2
827#define SDIO_CCCR_CCCR_REV_3_00 0x3
829#define SDIO_CCCR_SD 0x01
830#define SDIO_CCCR_SD_SPEC_MASK 0x0F
831#define SDIO_CCCR_SD_SPEC_SHIFT 0x0
833#define SDIO_CCCR_IO_EN 0x02
835#define SDIO_CCCR_IO_RD 0x03
837#define SDIO_CCCR_INT_EN 0x04
839#define SDIO_CCCR_INT_P 0x05
841#define SDIO_CCCR_ABORT 0x06
843#define SDIO_CCCR_BUS_IF 0x07
844#define SDIO_CCCR_BUS_IF_WIDTH_MASK 0x3
845#define SDIO_CCCR_BUS_IF_WIDTH_1_BIT 0x00
846#define SDIO_CCCR_BUS_IF_WIDTH_4_BIT 0x02
847#define SDIO_CCCR_BUS_IF_WIDTH_8_BIT 0x03
849#define SDIO_CCCR_CAPS 0x08
850#define SDIO_CCCR_CAPS_SDC BIT(0)
851#define SDIO_CCCR_CAPS_SMB BIT(1)
852#define SDIO_CCCR_CAPS_SRW BIT(2)
853#define SDIO_CCCR_CAPS_SBS BIT(3)
854#define SDIO_CCCR_CAPS_S4MI BIT(4)
855#define SDIO_CCCR_CAPS_E4MI BIT(5)
856#define SDIO_CCCR_CAPS_LSC BIT(6)
857#define SDIO_CCCR_CAPS_BLS BIT(7)
859#define SDIO_CCCR_CIS 0x09
861#define SDIO_CCCR_SPEED 0x13
862#define SDIO_CCCR_SPEED_SHS BIT(0)
863#define SDIO_CCCR_SPEED_MASK 0xE
864#define SDIO_CCCR_SPEED_SHIFT 0x1
865#define SDIO_CCCR_SPEED_SDR12 0x0
866#define SDIO_CCCR_SPEED_HS 0x1
867#define SDIO_CCCR_SPEED_SDR25 0x1
868#define SDIO_CCCR_SPEED_SDR50 0x2
869#define SDIO_CCCR_SPEED_SDR104 0x3
870#define SDIO_CCCR_SPEED_DDR50 0x4
872#define SDIO_CCCR_UHS 0x14
873#define SDIO_CCCR_UHS_SDR50 BIT(0)
874#define SDIO_CCCR_UHS_SDR104 BIT(1)
875#define SDIO_CCCR_UHS_DDR50 BIT(2)
877#define SDIO_CCCR_DRIVE_STRENGTH 0x15
878#define SDIO_CCCR_DRIVE_STRENGTH_A BIT(0)
879#define SDIO_CCCR_DRIVE_STRENGTH_C BIT(1)
880#define SDIO_CCCR_DRIVE_STRENGTH_D BIT(2)
882#define SDIO_FBR_BASE(n) ((n) * 0x100)
884#define SDIO_FBR_CIS 0x09
885#define SDIO_FBR_CSA 0x0C
886#define SDIO_FBR_BLK_SIZE 0x10
889#define SDIO_MAX_IO_NUMS 7
891#define SDIO_TPL_CODE_NULL 0x00
892#define SDIO_TPL_CODE_MANIFID 0x20
893#define SDIO_TPL_CODE_FUNCID 0x21
894#define SDIO_TPL_CODE_FUNCE 0x22
895#define SDIO_TPL_CODE_END 0xFF
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
#define MHZ(x)
Number of Hz in x MHz.
Definition: util.h:802
#define KHZ(x)
Number of Hz in x kHz.
Definition: util.h:800
sd_opcode
SD specification command opcodes.
Definition: sd_spec.h:28
@ MMC_SEND_TUNING_BLOCK
Definition: sd_spec.h:51
@ SD_SEND_IF_COND
Definition: sd_spec.h:37
@ MMC_SEND_BUS_TEST
Definition: sd_spec.h:50
@ SD_SEND_RELATIVE_ADDR
Definition: sd_spec.h:32
@ SD_SWITCH
Definition: sd_spec.h:35
@ MMC_CHECK_BUS_TEST
Definition: sd_spec.h:44
@ SD_ERASE_BLOCK_OPERATION
Definition: sd_spec.h:57
@ MMC_SEND_OP_COND
Definition: sd_spec.h:30
@ MMC_SEND_RELATIVE_ADDR
Definition: sd_spec.h:33
@ SD_GO_INACTIVE_STATE
Definition: sd_spec.h:45
@ SD_ERASE_BLOCK_END
Definition: sd_spec.h:56
@ MMC_SEND_EXT_CSD
Definition: sd_spec.h:38
@ SDIO_RW_EXTENDED
Definition: sd_spec.h:59
@ SD_SET_BLOCK_COUNT
Definition: sd_spec.h:52
@ SDIO_RW_DIRECT
Definition: sd_spec.h:58
@ SD_SEND_CID
Definition: sd_spec.h:40
@ SD_READ_SINGLE_BLOCK
Definition: sd_spec.h:47
@ SD_WRITE_MULTIPLE_BLOCK
Definition: sd_spec.h:54
@ SD_GO_IDLE_STATE
Definition: sd_spec.h:29
@ SD_SPI_READ_OCR
Definition: sd_spec.h:61
@ SD_READ_MULTIPLE_BLOCK
Definition: sd_spec.h:48
@ SD_STOP_TRANSMISSION
Definition: sd_spec.h:42
@ SD_ERASE_BLOCK_START
Definition: sd_spec.h:55
@ SD_SPI_CRC_ON_OFF
Definition: sd_spec.h:62
@ SD_SET_BLOCK_SIZE
Definition: sd_spec.h:46
@ SD_VOL_SWITCH
Definition: sd_spec.h:41
@ SD_SEND_STATUS
Definition: sd_spec.h:43
@ SD_SEND_CSD
Definition: sd_spec.h:39
@ SD_WRITE_SINGLE_BLOCK
Definition: sd_spec.h:53
@ SD_APP_CMD
Definition: sd_spec.h:60
@ SD_SEND_TUNING_BLOCK
Definition: sd_spec.h:49
@ SDIO_SEND_OP_COND
Definition: sd_spec.h:34
@ SD_SELECT_CARD
Definition: sd_spec.h:36
@ SD_ALL_SEND_CID
Definition: sd_spec.h:31
mmc_ocr_flag
MMC OCR bit flags.
Definition: sd_spec.h:297
@ MMC_OCR_VDD170_195FLAG
Definition: sd_spec.h:298
@ MMC_OCR_VDD27_36FLAG
Definition: sd_spec.h:300
@ MMC_OCR_SECTOR_MODE
Definition: sd_spec.h:301
@ MMC_OCR_PWR_BUSY_FLAG
Definition: sd_spec.h:302
@ MMC_OCR_VDD20_26FLAG
Definition: sd_spec.h:299
sd_app_cmd
SD application command opcodes.
Definition: sd_spec.h:71
@ SD_APP_SEND_NUM_WRITTEN_BLK
Definition: sd_spec.h:74
@ SD_APP_SEND_OP_COND
Definition: sd_spec.h:76
@ SD_APP_SEND_SCR
Definition: sd_spec.h:78
@ SD_APP_SEND_STATUS
Definition: sd_spec.h:73
@ SD_APP_CLEAR_CARD_DETECT
Definition: sd_spec.h:77
@ SD_APP_SET_BUS_WIDTH
Definition: sd_spec.h:72
@ SD_APP_SET_WRITE_BLK_ERASE_CNT
Definition: sd_spec.h:75
sd_rsp_type
SD response types.
Definition: sd_spec.h:214
@ SD_SPI_RSP_TYPE_R5
Definition: sd_spec.h:232
@ SD_SPI_RSP_TYPE_R1b
Definition: sd_spec.h:228
@ SD_SPI_RSP_TYPE_R1
Definition: sd_spec.h:227
@ SD_RSP_TYPE_R4
Definition: sd_spec.h:221
@ SD_RSP_TYPE_R6
Definition: sd_spec.h:224
@ SD_SPI_RSP_TYPE_R4
Definition: sd_spec.h:231
@ SD_RSP_TYPE_R5b
Definition: sd_spec.h:223
@ SD_SPI_RSP_TYPE_R7
Definition: sd_spec.h:233
@ SD_SPI_RSP_TYPE_R3
Definition: sd_spec.h:230
@ SD_SPI_RSP_TYPE_R2
Definition: sd_spec.h:229
@ SD_RSP_TYPE_R5
Definition: sd_spec.h:222
@ SD_RSP_TYPE_R1
Definition: sd_spec.h:217
@ SD_RSP_TYPE_R2
Definition: sd_spec.h:219
@ SD_RSP_TYPE_R7
Definition: sd_spec.h:225
@ SD_RSP_TYPE_NONE
Definition: sd_spec.h:216
@ SD_RSP_TYPE_R1b
Definition: sd_spec.h:218
@ SD_RSP_TYPE_R3
Definition: sd_spec.h:220
hs_max_data_rate
Definition: sd_spec.h:371
@ HS_MAX_DTR
Definition: sd_spec.h:373
@ HS_UNSUPPORTED
Definition: sd_spec.h:372
sd_current_limit
SD current support bitfield.
Definition: sd_spec.h:460
@ SD_MAX_CURRENT_200MA
default current limit
Definition: sd_spec.h:462
@ SD_MAX_CURRENT_800MA
current limit to 800MA
Definition: sd_spec.h:468
@ SD_MAX_CURRENT_400MA
current limit to 400MA
Definition: sd_spec.h:464
@ SD_MAX_CURRENT_600MA
current limit to 600MA
Definition: sd_spec.h:466
sdio_io_dir
SDIO I/O direction.
Definition: sd_spec.h:801
@ SDIO_IO_WRITE
Definition: sd_spec.h:803
@ SDIO_IO_READ
Definition: sd_spec.h:802
sdio_ocr_flag
SDIO OCR bit flags.
Definition: sd_spec.h:315
@ SDIO_OCR_VDD31_32FLAG
VDD 3.0-3.1.
Definition: sd_spec.h:331
@ SDIO_OCR_VDD28_29FLAG
VDD 2.8-2.9.
Definition: sd_spec.h:328
@ SDIO_OCR_IO_NUMBER
Number of io function.
Definition: sd_spec.h:317
@ SDIO_OCR_VDD27_28FLAG
VDD 2.7-2.8.
Definition: sd_spec.h:327
@ SDIO_OCR_VDD29_30FLAG
VDD 2.9-3.0.
Definition: sd_spec.h:329
@ SDIO_OCR_VDD34_35FLAG
VDD 3.3-3.4.
Definition: sd_spec.h:334
@ SDIO_OCR_180_VOL_FLAG
Switch to 1.8v signalling.
Definition: sd_spec.h:319
@ SDIO_OCR_VDD30_31FLAG
VDD 2.9-3.0.
Definition: sd_spec.h:330
@ SDIO_OCR_VDD26_27FLAG
VDD 2.6-2.7.
Definition: sd_spec.h:326
@ SDIO_OCR_VDD22_23FLAG
VDD 2.2-2.3.
Definition: sd_spec.h:322
@ SDIO_OCR_VDD24_25FLAG
VDD 2.4-2.5.
Definition: sd_spec.h:324
@ SDIO_OCR_VDD33_34FLAG
VDD 3.2-3.3.
Definition: sd_spec.h:333
@ SDIO_OCR_VDD23_24FLAG
VDD 2.3-2.4.
Definition: sd_spec.h:323
@ SDIO_OCR_VDD20_21FLAG
VDD 2.0-2.1.
Definition: sd_spec.h:320
@ SDIO_OCR_VDD25_26FLAG
VDD 2.5-2.6.
Definition: sd_spec.h:325
@ SDIO_OCR_VDD32_33FLAG
VDD 3.1-3.2.
Definition: sd_spec.h:332
@ SDIO_OCR_VDD21_22FLAG
VDD 2.1-2.2.
Definition: sd_spec.h:321
@ SDIO_OCR_IO_READY_FLAG
Definition: sd_spec.h:316
@ SDIO_OCR_MEM_PRESENT_FLAG
Memory present flag.
Definition: sd_spec.h:318
@ SDIO_OCR_VDD35_36FLAG
VDD 3.4-3.5.
Definition: sd_spec.h:335
mmc_csd_freq
MMC Maximum Frequency.
Definition: sd_spec.h:585
@ MMC_MAXFREQ_100MHZ
Definition: sd_spec.h:589
@ MMC_MAXFREQ_100KHZ
Definition: sd_spec.h:586
@ MMC_MAXFREQ_MULT_80
Definition: sd_spec.h:604
@ MMC_MAXFREQ_MULT_13
Definition: sd_spec.h:592
@ MMC_MAXFREQ_1MHZ
Definition: sd_spec.h:587
@ MMC_MAXFREQ_MULT_12
Definition: sd_spec.h:591
@ MMC_MAXFREQ_MULT_40
Definition: sd_spec.h:598
@ MMC_MAXFREQ_MULT_45
Definition: sd_spec.h:599
@ MMC_MAXFREQ_MULT_35
Definition: sd_spec.h:597
@ MMC_MAXFREQ_MULT_30
Definition: sd_spec.h:596
@ MMC_MAXFREQ_MULT_10
Definition: sd_spec.h:590
@ MMC_MAXFREQ_MULT_52
Definition: sd_spec.h:600
@ MMC_MAXFREQ_MULT_26
Definition: sd_spec.h:595
@ MMC_MAXFREQ_MULT_55
Definition: sd_spec.h:601
@ MMC_MAXFREQ_MULT_20
Definition: sd_spec.h:594
@ MMC_MAXFREQ_MULT_15
Definition: sd_spec.h:593
@ MMC_MAXFREQ_MULT_60
Definition: sd_spec.h:602
@ MMC_MAXFREQ_MULT_70
Definition: sd_spec.h:603
@ MMC_MAXFREQ_10MHZ
Definition: sd_spec.h:588
sd_driver_type
SD driver types.
Definition: sd_spec.h:476
@ SD_DRIVER_TYPE_C
Definition: sd_spec.h:479
@ SD_DRIVER_TYPE_B
Definition: sd_spec.h:477
@ SD_DRIVER_TYPE_D
Definition: sd_spec.h:480
@ SD_DRIVER_TYPE_A
Definition: sd_spec.h:478
sdio_func_num
SDIO function number.
Definition: sd_spec.h:784
@ SDIO_FUNC_MEMORY
Definition: sd_spec.h:793
@ SDIO_FUNC_NUM_6
Definition: sd_spec.h:791
@ SDIO_FUNC_NUM_7
Definition: sd_spec.h:792
@ SDIO_FUNC_NUM_1
Definition: sd_spec.h:786
@ SDIO_FUNC_NUM_4
Definition: sd_spec.h:789
@ SDIO_FUNC_NUM_2
Definition: sd_spec.h:787
@ SDIO_FUNC_NUM_5
Definition: sd_spec.h:790
@ SDIO_FUNC_NUM_0
Definition: sd_spec.h:785
@ SDIO_FUNC_NUM_3
Definition: sd_spec.h:788
sd_scr_flag
SD card configuration register.
Definition: sd_spec.h:753
@ SD_SCR_SPEC3
Specification version 3.00 or higher [47:47].
Definition: sd_spec.h:757
@ SD_SCR_DATA_STATUS_AFTER_ERASE
Data status after erases [55:55].
Definition: sd_spec.h:755
uhs_max_data_rate
Definition: sd_spec.h:377
@ UHS_SDR104_MAX_DTR
Definition: sd_spec.h:382
@ UHS_SDR25_MAX_DTR
Definition: sd_spec.h:380
@ UHS_SDR50_MAX_DTR
Definition: sd_spec.h:381
@ UHS_UNSUPPORTED
Definition: sd_spec.h:378
@ UHS_SDR12_MAX_DTR
Definition: sd_spec.h:379
@ UHS_DDR50_MAX_DTR
Definition: sd_spec.h:383
sd_current_setting
SD current setting values.
Definition: sd_spec.h:448
@ SD_SET_CURRENT_200MA
Definition: sd_spec.h:449
@ SD_SET_CURRENT_600MA
Definition: sd_spec.h:451
@ SD_SET_CURRENT_400MA
Definition: sd_spec.h:450
@ SD_SET_CURRENT_800MA
Definition: sd_spec.h:452
sd_driver_strength
SD switch drive type selection.
Definition: sd_spec.h:488
@ SD_DRV_STRENGTH_TYPEB
default driver strength
Definition: sd_spec.h:490
@ SD_DRV_STRENGTH_TYPEC
driver strength TYPE C
Definition: sd_spec.h:494
@ SD_DRV_STRENGTH_TYPED
driver strength TYPE D
Definition: sd_spec.h:496
@ SD_DRV_STRENGTH_TYPEA
driver strength TYPE A
Definition: sd_spec.h:492
sd_bus_speed
SD bus speed support bit flags.
Definition: sd_spec.h:392
@ UHS_DDR50_BUS_SPEED
Definition: sd_spec.h:399
@ UHS_SDR12_BUS_SPEED
Definition: sd_spec.h:393
@ UHS_SDR50_BUS_SPEED
Definition: sd_spec.h:397
@ HIGH_SPEED_BUS_SPEED
Definition: sd_spec.h:395
@ DEFAULT_BUS_SPEED
Definition: sd_spec.h:394
@ UHS_SDR25_BUS_SPEED
Definition: sd_spec.h:396
@ UHS_SDR104_BUS_SPEED
Definition: sd_spec.h:398
sd_switch_arg
SD switch arguments.
Definition: sd_spec.h:346
@ SD_SWITCH_SET
SD switch mode 1: set function.
Definition: sd_spec.h:350
@ SD_SWITCH_CHECK
SD switch mode 0: check function.
Definition: sd_spec.h:348
sd_ocr_flag
SD OCR bit flags.
Definition: sd_spec.h:260
@ SD_OCR_VDD32_33FLAG
VDD 3.2-3.3.
Definition: sd_spec.h:282
@ SD_OCR_CARD_CAP_FLAG
Card capacity status.
Definition: sd_spec.h:266
@ SD_OCR_SWITCH_18_ACCEPT_FLAG
Switch to 1.8V accepted.
Definition: sd_spec.h:270
@ SD_OCR_PWR_BUSY_FLAG
Power up busy status.
Definition: sd_spec.h:262
@ SD_OCR_VDD29_30FLAG
VDD 2.9-3.0.
Definition: sd_spec.h:276
@ SD_OCR_SWITCH_18_REQ_FLAG
Switch to 1.8V request.
Definition: sd_spec.h:268
@ SD_OCR_VDD28_29FLAG
VDD 2.8-2.9.
Definition: sd_spec.h:274
@ SD_OCR_VDD35_36FLAG
VDD 3.5-3.6.
Definition: sd_spec.h:288
@ SD_OCR_VDD31_32FLAG
VDD 3.1-3.2.
Definition: sd_spec.h:280
@ SD_OCR_VDD30_31FLAG
VDD 3.0-3.1.
Definition: sd_spec.h:278
@ SD_OCR_VDD33_34FLAG
VDD 3.3-3.4.
Definition: sd_spec.h:284
@ SD_OCR_VDD27_28FLAG
VDD 2.7-2.8.
Definition: sd_spec.h:272
@ SD_OCR_HOST_CAP_FLAG
Card capacity status.
Definition: sd_spec.h:264
@ SD_OCR_VDD34_35FLAG
VDD 3.4-3.5.
Definition: sd_spec.h:286
#define SD_PRODUCT_NAME_BYTES
Definition: sd_spec.h:514
sdhc_clock_speed
SD host controller clock speed.
Definition: sd_spec.h:430
@ MMC_CLOCK_HS200
Definition: sd_spec.h:439
@ SDMMC_CLOCK_400KHZ
Definition: sd_spec.h:431
@ SD_CLOCK_50MHZ
Definition: sd_spec.h:433
@ MMC_CLOCK_52MHZ
Definition: sd_spec.h:437
@ MMC_CLOCK_DDR52
Definition: sd_spec.h:438
@ SD_CLOCK_100MHZ
Definition: sd_spec.h:434
@ MMC_CLOCK_HS400
Definition: sd_spec.h:440
@ SD_CLOCK_208MHZ
Definition: sd_spec.h:435
@ SD_CLOCK_25MHZ
Definition: sd_spec.h:432
@ MMC_CLOCK_26MHZ
Definition: sd_spec.h:436
sd_group_num
SD switch group numbers.
Definition: sd_spec.h:359
@ SD_GRP_TIMING_MODE
access mode group
Definition: sd_spec.h:361
@ SD_GRP_DRIVER_STRENGTH_MODE
driver strength group
Definition: sd_spec.h:365
@ SD_GRP_CMD_SYS_MODE
command system group
Definition: sd_spec.h:363
@ SD_GRP_CURRENT_LIMIT_MODE
current limit group
Definition: sd_spec.h:367
sd_csd_flag
SD card specific data flags.
Definition: sd_spec.h:699
@ SD_CSD_ERASE_BLK_EN_FLAG
Erase single block enabled [46:46].
Definition: sd_spec.h:709
@ SD_CSD_DSR_IMPLEMENTED_FLAG
DSR implemented [76:76].
Definition: sd_spec.h:707
@ SD_CSD_WRITE_BLK_MISALIGN_FLAG
Write block misalignment [78:78].
Definition: sd_spec.h:703
@ SD_CSD_FILE_FMT_GRP_FLAG
File format group [15:15].
Definition: sd_spec.h:715
@ SD_CSD_PERMANENT_WRITE_PROTECT_FLAG
Permanent write protection [13:13].
Definition: sd_spec.h:719
@ SD_CSD_COPY_FLAG
Copy flag [14:14].
Definition: sd_spec.h:717
@ SD_CSD_TMP_WRITE_PROTECT_FLAG
Temporary write protection [12:12].
Definition: sd_spec.h:721
@ SD_CSD_WRITE_BLK_PARTIAL_FLAG
Partial blocks for write allowed [21:21].
Definition: sd_spec.h:713
@ SD_CSD_READ_BLK_PARTIAL_FLAG
Partial blocks for read allowed [79:79].
Definition: sd_spec.h:701
@ SD_CSD_READ_BLK_MISALIGN_FLAG
Read block misalignment [77:77].
Definition: sd_spec.h:705
@ SD_CSD_WRITE_PROTECT_GRP_EN_FLAG
Write protect group enabled [31:31].
Definition: sd_spec.h:711
sd_r1_current_state
SD current state values.
Definition: sd_spec.h:138
@ SDMMC_R1_IDLE
Definition: sd_spec.h:139
@ SDMMC_R1_READY
Definition: sd_spec.h:140
@ SDMMC_R1_IDENTIFY
Definition: sd_spec.h:141
@ SDMMC_R1_RECIVE_DATA
Definition: sd_spec.h:145
@ SDMMC_R1_TRANSFER
Definition: sd_spec.h:143
@ SDMMC_R1_SEND_DATA
Definition: sd_spec.h:144
@ SDMMC_R1_DISCONNECT
Definition: sd_spec.h:147
@ SDMMC_R1_STANDBY
Definition: sd_spec.h:142
@ SDMMC_R1_PROGRAM
Definition: sd_spec.h:146
sd_spi_r2_status
SPI SD mode R2 response status flags.
Definition: sd_spec.h:171
@ SDHC_SPI_R2_UNLOCK_FAIL
Definition: sd_spec.h:173
@ SDHC_SPI_R2_ERASE_PARAM
Definition: sd_spec.h:178
@ SDHC_SPI_R2_CARD_LOCKED
Definition: sd_spec.h:172
@ SDHC_SPI_R2_WP_VIOLATION
Definition: sd_spec.h:177
@ SDHC_SPI_R2_ECC_FAIL
Definition: sd_spec.h:176
@ SDHC_SPI_R2_CC_ERR
Definition: sd_spec.h:175
@ SDHC_SPI_R2_OUT_OF_RANGE
Definition: sd_spec.h:179
@ SDHC_SPI_R2_ERR
Definition: sd_spec.h:174
sd_spi_r1_error_flag
SPI SD mode R1 response status flags.
Definition: sd_spec.h:155
@ SD_SPI_R1ILLEGAL_CMD_ERR
Definition: sd_spec.h:160
@ SD_SPI_R1ERASE_RESET
Definition: sd_spec.h:161
@ SD_SPI_R1IDLE_STATE
Definition: sd_spec.h:162
@ SD_SPI_R1ERASE_SEQ_ERR
Definition: sd_spec.h:158
@ SD_SPI_R1PARAMETER_ERR
Definition: sd_spec.h:156
@ SD_SPI_R1CMD_CRC_ERR
Definition: sd_spec.h:159
@ SD_SPI_R1ADDRESS_ERR
Definition: sd_spec.h:157
sd_spec_version
SD specification version.
Definition: sd_spec.h:765
@ SD_SPEC_VER2_0
SD card version 2.00.
Definition: sd_spec.h:771
@ SD_SPEC_VER1_0
SD card version 1.0-1.01.
Definition: sd_spec.h:767
@ SD_SPEC_VER3_0
SD card version 3.0.
Definition: sd_spec.h:773
@ SD_SPEC_VER1_1
SD card version 1.10.
Definition: sd_spec.h:769
sdio_cccr_flags
Card common control register flags.
Definition: sd_spec.h:903
@ SDIO_SUPPORT_MULTIBLOCK
Definition: sd_spec.h:909
@ SDIO_SUPPORT_4BIT_LS_BUS
Definition: sd_spec.h:908
@ SDIO_SUPPORT_DDR50
Definition: sd_spec.h:907
@ SDIO_SUPPORT_SDR104
Definition: sd_spec.h:906
@ SDIO_SUPPORT_HS
Definition: sd_spec.h:904
@ SDIO_SUPPORT_SDR50
Definition: sd_spec.h:905
mmc_ext_csd_rev
CSD Revision.
Definition: sd_spec.h:654
@ MMC_4_3
Definition: sd_spec.h:659
@ MMC_4_4
Definition: sd_spec.h:658
@ MMC_5_0
Definition: sd_spec.h:656
@ MMC_4_2
Definition: sd_spec.h:660
@ MMC_4_5
Definition: sd_spec.h:657
@ MMC_4_1
Definition: sd_spec.h:661
@ MMC_4_0
Definition: sd_spec.h:662
@ MMC_5_1
Definition: sd_spec.h:655
sd_r1_status
Native SD mode R1 response status flags.
Definition: sd_spec.h:86
@ SD_R1_CARD_LOCKED
Definition: sd_spec.h:106
@ SD_R1_CUR_STATE
Definition: sd_spec.h:94
@ SD_R1_CSD_OVERWRITE
Definition: sd_spec.h:98
@ SD_R1_ERASE_SKIP
Definition: sd_spec.h:97
@ SD_R1_ADDR_ERR
Definition: sd_spec.h:111
@ SD_R1_WP_VIOLATION
Definition: sd_spec.h:107
@ SD_R1_ERASE_RESET
Definition: sd_spec.h:95
@ SD_R1_ERASE_PARAM
Definition: sd_spec.h:108
@ SD_R1_ECC_DISABLED
Definition: sd_spec.h:96
@ SD_R1_UNLOCK_FAIL
Definition: sd_spec.h:105
@ SD_R1_ILLEGAL_CMD
Definition: sd_spec.h:103
@ SD_R1_APP_CMD
Definition: sd_spec.h:90
@ SD_R1_ERASE_SEQ_ERR
Definition: sd_spec.h:109
@ SD_R1_AUTH_ERR
Definition: sd_spec.h:88
@ SD_R1_CC_ERR
Definition: sd_spec.h:101
@ SD_R1_ERR_FLAGS
Definition: sd_spec.h:113
@ SD_R1_FX_EVENT
Definition: sd_spec.h:91
@ SD_R1ERR_NONE
Definition: sd_spec.h:128
@ SD_R1_BLOCK_LEN_ERR
Definition: sd_spec.h:110
@ SD_R1_CRC_ERR
Definition: sd_spec.h:104
@ SD_R1_ERR
Definition: sd_spec.h:100
@ SD_R1_OUT_OF_RANGE
Definition: sd_spec.h:112
@ SD_R1_RDY_DATA
Definition: sd_spec.h:93
@ SD_R1_ECC_FAIL
Definition: sd_spec.h:102
mmc_timing_mode
MMC Timing Modes.
Definition: sd_spec.h:612
@ MMC_HS_TIMING
Definition: sd_spec.h:614
@ MMC_HS200_TIMING
Definition: sd_spec.h:615
@ MMC_HS400_TIMING
Definition: sd_spec.h:616
@ MMC_LEGACY_TIMING
Definition: sd_spec.h:613
sd_timing_mode
SD timing mode function selection values.
Definition: sd_spec.h:408
@ SD_TIMING_SDR25
SDR25 mode.
Definition: sd_spec.h:416
@ SD_TIMING_SDR50
SDR50 mode.
Definition: sd_spec.h:418
@ SD_TIMING_HIGH_SPEED
High speed mode.
Definition: sd_spec.h:414
@ SD_TIMING_DDR50
DDR50 mode.
Definition: sd_spec.h:422
@ SD_TIMING_DEFAULT
Default Mode.
Definition: sd_spec.h:410
@ SD_TIMING_SDR104
SDR104 mode.
Definition: sd_spec.h:420
@ SD_TIMING_SDR12
SDR12 mode.
Definition: sd_spec.h:412
mmc_driver_strengths
MMC Driver Strengths.
Definition: sd_spec.h:624
@ mmc_driv_type1
Definition: sd_spec.h:626
@ mmc_driv_type0
Definition: sd_spec.h:625
@ mmc_driv_type3
Definition: sd_spec.h:628
@ mmc_driv_type4
Definition: sd_spec.h:629
@ mmc_driv_type2
Definition: sd_spec.h:627
sd_support_flag
SD support flags.
Definition: sd_spec.h:241
@ SD_SPEED_CLASS_CONTROL_FLAG
Definition: sd_spec.h:249
@ SD_SDXC_FLAG
Definition: sd_spec.h:245
@ SD_HIGH_CAPACITY_FLAG
Definition: sd_spec.h:242
@ SD_4BITS_WIDTH
Definition: sd_spec.h:243
@ SD_3000MV_FLAG
Definition: sd_spec.h:247
@ SD_MEM_PRESENT_FLAG
Definition: sd_spec.h:250
@ SD_1800MV_FLAG
Definition: sd_spec.h:246
@ SD_CMD23_FLAG
Definition: sd_spec.h:248
@ SD_SDHC_FLAG
Definition: sd_spec.h:244
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
MMC Device Type.
Definition: sd_spec.h:638
bool MMC_HS_26_DV
Definition: sd_spec.h:646
bool MMC_HS400_DDR_1800MV
Definition: sd_spec.h:640
bool MMC_HS_52_DV
Definition: sd_spec.h:645
bool MMC_HS_DDR_1800MV
Definition: sd_spec.h:644
bool MMC_HS_DDR_1200MV
Definition: sd_spec.h:643
bool MMC_HS200_SDR_1800MV
Definition: sd_spec.h:642
bool MMC_HS200_SDR_1200MV
Definition: sd_spec.h:641
bool MMC_HS400_DDR_1200MV
Definition: sd_spec.h:639
MMC extended card specific data register.
Definition: sd_spec.h:671
enum mmc_timing_mode hs_timing
High Speed Timing Mode [185].
Definition: sd_spec.h:677
uint8_t power_class
Selected power class [187].
Definition: sd_spec.h:683
uint8_t mmc_driver_strengths
Driver strengths [197].
Definition: sd_spec.h:685
uint8_t pwr_class_HS400
Power class information for HS400 [253].
Definition: sd_spec.h:689
uint32_t cache_size
Size of eMMC cache [252:249].
Definition: sd_spec.h:691
enum mmc_ext_csd_rev rev
Extended CSD Revision [192].
Definition: sd_spec.h:681
uint32_t sec_count
Sector Count [215:212].
Definition: sd_spec.h:673
struct mmc_device_type device_type
Device Type [196].
Definition: sd_spec.h:679
uint8_t bus_width
Bus Width Mode [183].
Definition: sd_spec.h:675
uint8_t pwr_class_200MHZ_VCCQ195
Power class information for HS200 at VCC!=1.95V [237].
Definition: sd_spec.h:687
SD card identification register.
Definition: sd_spec.h:521
uint16_t application
OEM/Application ID [119:104].
Definition: sd_spec.h:525
uint8_t name[5]
Product name [103:64].
Definition: sd_spec.h:527
uint16_t date
Manufacturing date [19:8].
Definition: sd_spec.h:533
uint8_t manufacturer
Manufacturer ID [127:120].
Definition: sd_spec.h:523
uint8_t version
Product revision [63:56].
Definition: sd_spec.h:529
uint32_t ser_num
Product serial number [55:24].
Definition: sd_spec.h:531
SD card specific data register.
Definition: sd_spec.h:541
uint8_t write_prtect_size
Write protect group size [38:32].
Definition: sd_spec.h:571
uint8_t read_blk_len
Maximum read data block length [83:80].
Definition: sd_spec.h:553
uint8_t write_current_min
Maximum write current at VDD min [55:53].
Definition: sd_spec.h:563
uint8_t csd_structure
CSD structure [127:126].
Definition: sd_spec.h:543
uint8_t write_current_max
Maximum write current at VDD max [52:50].
Definition: sd_spec.h:565
uint8_t read_time1
Data read access-time-1 [119:112].
Definition: sd_spec.h:545
uint16_t cmd_class
Card command classes [95:84].
Definition: sd_spec.h:551
uint8_t read_time2
Data read access-time-2 in clock cycles (NSAC*100) [111:104].
Definition: sd_spec.h:547
uint8_t write_speed_factor
Write speed factor [28:26].
Definition: sd_spec.h:573
uint8_t dev_size_mul
Device size multiplier [49:47].
Definition: sd_spec.h:567
uint8_t read_current_min
Maximum read current at VDD min [61:59].
Definition: sd_spec.h:559
uint8_t erase_size
Erase sector size [45:39].
Definition: sd_spec.h:569
uint8_t read_current_max
Maximum read current at VDD max [58:56].
Definition: sd_spec.h:561
uint32_t device_size
Device size [73:62].
Definition: sd_spec.h:557
uint8_t write_blk_len
Maximum write data block length [25:22].
Definition: sd_spec.h:575
uint16_t flags
Flags in _sd_csd_flag.
Definition: sd_spec.h:555
uint8_t xfer_rate
Maximum data transfer rate [103:96].
Definition: sd_spec.h:549
uint8_t file_fmt
File format [11:10].
Definition: sd_spec.h:577
SD card configuration register.
Definition: sd_spec.h:729
uint8_t sd_ext_sec
Extended security support [46:43].
Definition: sd_spec.h:741
uint8_t scr_structure
SCR Structure [63:60].
Definition: sd_spec.h:731
uint8_t sd_width
Data bus widths supported [51:48].
Definition: sd_spec.h:739
uint8_t cmd_support
Command support bits [33:32] 33-support CMD23, 32-support cmd20.
Definition: sd_spec.h:743
uint8_t sd_sec
Security specification supported [54:52].
Definition: sd_spec.h:737
uint32_t rsvd
reserved for manufacturer usage [31:0]
Definition: sd_spec.h:745
uint16_t flags
SCR flags in _sd_scr_flag.
Definition: sd_spec.h:735
uint8_t sd_spec
SD memory card specification version [59:56].
Definition: sd_spec.h:733
SD switch capabilities.
Definition: sd_spec.h:505
enum sd_bus_speed bus_speed
Definition: sd_spec.h:508
enum sd_current_limit sd_current_limit
Definition: sd_spec.h:510
enum sd_driver_type sd_drv_type
Definition: sd_spec.h:509
enum hs_max_data_rate hs_max_dtr
Definition: sd_spec.h:506
enum uhs_max_data_rate uhs_max_dtr
Definition: sd_spec.h:507
SDIO common CIS tuple properties.
Definition: sd_spec.h:918
uint16_t manf_id
manufacturer ID
Definition: sd_spec.h:920
uint16_t max_blk_size
Max transfer block size.
Definition: sd_spec.h:925
uint8_t max_speed
Max transfer speed.
Definition: sd_spec.h:926
uint16_t rdy_timeout
I/O ready timeout.
Definition: sd_spec.h:927
uint8_t func_id
sdio device class function id
Definition: sd_spec.h:923
uint16_t manf_code
manufacturer code
Definition: sd_spec.h:921