summaryrefslogtreecommitdiff
path: root/nuttx/drivers/mmcsd/Kconfig
blob: 33f70bb4b610b86b329f7e40c4bd2c3483fb7967 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#

config MMCSD_NSLOTS
	int "Number of MMC/SD slots"
	default 1
	---help---
		Number of MMC/SD slots supported by the
		driver. Default is one.

config MMCSD_READONLY
	bool "Disable MMC/SD write access"
	default n
	---help---
		Provide read-only access.  Default is
		Read/Write

config MMCSD_MULTIBLOCK_DISABLE
	bool "Disable MMC/SD multiblock transfer"
	default n
	---help---
		Use only the single block transfer method.
		This setting is used to work around buggy SDIO drivers that cannot handle
		multiple block transfers.

config MMCSD_MMCSUPPORT
	bool "MMC cards support"
	default y
	---help---
		Enable support for MMC cards

config MMCSD_HAVECARDDETECT
	bool "MMC/SD card detection"
	default y
	---help---
		SDIO driver card detection is
		100% accurate

config ARCH_HAVE_SDIOWAIT_WRCOMPLETE
	bool
	default n

config MMCSD_SDIOWAIT_WRCOMPLETE
	bool "Use SDIO_D Busy to detect Write Complete"
	default n
	depends on ARCH_HAVE_SDIOWAIT_WRCOMPLETE
	---help---
		SDIO driver will use SDIO_D Busy signalling to detect Write Complete.
		This option when selected, will enable the MMCSD driver to use the
		underlying (stm32_sdio only) drivers implementation of the SD specs
		SDIO_D Busy signalling to detect Write Complete. This will avoid
		potentially very long (600Ms+) busy waiting in the MMCSD driver.

		To implement SDIO_D Busy signalling, the underlying driver must
		be capable of switching the GPIO_SDIO_D0 to be a rising edge sensitive
		interrupt pin. It must then, condition that pin to detect the rising edge
		on receipt of SDWAIT_WRCOMPLETE in the SDIO_WAITENABLE call and
		return it back to regular SDIO mode, when either the ISR fires or pin is
		found to be high in the SDIO_EVENTWAIT call.

config MMCSD_SPI
	bool "MMC/SD SPI transfer support"
	default y
	depends on SPI

if MMCSD_SPI

config MMCSD_SPICLOCK
	int "MMC/SD maximum SPI clock"
	default 20000000
	depends on MMCSD_SPI
	---help---
		Maximum SPI clock to drive MMC/SD card.
		Default is 20MHz.

config MMCSD_SPIMODE
	int "MMC/SD SPI mode"
	default 0
	---help---
		Should be mode 0.  However, sometimes this is useful for experimenting.

endif

config ARCH_HAVE_SDIO
	bool
	default n

config MMCSD_SDIO
	bool "MMC/SD SDIO transfer support"
	default n
	depends on ARCH_HAVE_SDIO

if MMCSD_SDIO

config SDIO_DMA
	bool "SDIO DMA support"
	default n
	---help---
		SDIO driver supports DMA

config SDIO_PREFLIGHT
	bool
	default n

config SDIO_MUXBUS
	bool "SDIO bus share support"
	default n
	---help---
		Set this SDIO interface if the SDIO interface
		or hardware resources are shared with other drivers.

config SDIO_WIDTH_D1_ONLY
	bool "SDIO 1-bit transfer"
	default n
	---help---
		Select 1-bit transfer mode.  Default:
		4-bit transfer mode.

config SDIO_BLOCKSETUP
	bool "SDIO block setup"
	default n
	---help---
		Some hardward needs to be informed of the selected blocksize and the
		number of blocks.  Others just work on the byte stream.  This option
		enables the block setup method in the SDIO vtable.

endif