2012-04-06 23:49:35 +08:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 22:08:57 +08:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2012-04-06 23:49:35 +08:00
|
|
|
#
|
2012-12-29 07:40:54 +08:00
|
|
|
|
2020-02-15 21:38:35 +08:00
|
|
|
# MMC/SD-related platform capabilities
|
|
|
|
|
2020-02-06 12:21:22 +08:00
|
|
|
config ARCH_HAVE_SDIO
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
|
|
|
|
config ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
|
|
|
|
config ARCH_HAVE_SDIO_PREFLIGHT
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
|
2020-02-15 21:38:35 +08:00
|
|
|
menuconfig MMCSD
|
|
|
|
bool "MMC/SD Driver Support"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Support for MMC/SD block drivers. MMC/SD block drivers based on
|
|
|
|
SPI and SDIO/MCI interfaces are supported. See include/nuttx/mmcsd.h
|
|
|
|
and include/nuttx/sdio.h for further information.
|
|
|
|
|
2020-02-08 15:30:09 +08:00
|
|
|
if MMCSD
|
|
|
|
|
2022-12-05 19:54:31 +08:00
|
|
|
config MMCSD_IOCSUPPORT
|
2023-01-31 18:54:55 +08:00
|
|
|
bool "Enable MMC/SD ioctl support"
|
2022-12-05 19:54:31 +08:00
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
Disable it to save some code size if required.
|
|
|
|
|
2012-04-13 22:27:44 +08:00
|
|
|
config MMCSD_NSLOTS
|
|
|
|
int "Number of MMC/SD slots"
|
|
|
|
default 1
|
|
|
|
---help---
|
|
|
|
Number of MMC/SD slots supported by the
|
|
|
|
driver. Default is one.
|
|
|
|
|
2023-09-21 09:59:09 +08:00
|
|
|
config MMCSD_PROCFS
|
|
|
|
bool "MMCSD proc fs support"
|
|
|
|
default n
|
|
|
|
depends on FS_PROCFS_REGISTER
|
|
|
|
---help---
|
|
|
|
Enable procfs for mmcsd.
|
|
|
|
|
2012-04-13 22:27:44 +08:00
|
|
|
config MMCSD_READONLY
|
|
|
|
bool "Disable MMC/SD write access"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Provide read-only access. Default is
|
|
|
|
Read/Write
|
|
|
|
|
2021-12-21 19:55:38 +08:00
|
|
|
config MMCSD_MULTIBLOCK_LIMIT
|
|
|
|
int "Max block count can read/write in single transfer"
|
|
|
|
default 0
|
2012-04-13 22:27:44 +08:00
|
|
|
---help---
|
2021-12-21 19:55:38 +08:00
|
|
|
The max block can be handled in single transfer.
|
|
|
|
Default to 0, means no limitation. Block count larger than this
|
|
|
|
limit will be splited to multiple multi-block transfer. Set it to 1 will
|
|
|
|
only use single-block transfer mode, and can be used to work around
|
|
|
|
buggy SDIO drivers that cannot handle multiple block transfers.
|
2012-04-13 22:27:44 +08:00
|
|
|
|
|
|
|
config MMCSD_MMCSUPPORT
|
|
|
|
bool "MMC cards support"
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
Enable support for MMC cards
|
|
|
|
|
2017-12-21 00:52:05 +08:00
|
|
|
config MMCSD_HAVE_CARDDETECT
|
|
|
|
bool "MMC/SD card detect pin"
|
2012-04-13 22:27:44 +08:00
|
|
|
default y
|
|
|
|
---help---
|
2017-12-21 00:52:05 +08:00
|
|
|
SDIO driver card present detection is supported.
|
|
|
|
|
|
|
|
config MMCSD_HAVE_WRITEPROTECT
|
|
|
|
bool "MMC/SD write protect pin"
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
SDIO driver write protection detection is supported.
|
2012-04-13 22:27:44 +08:00
|
|
|
|
|
|
|
config MMCSD_SPI
|
2013-01-02 22:02:07 +08:00
|
|
|
bool "MMC/SD SPI transfer support"
|
2012-04-13 22:27:44 +08:00
|
|
|
default y
|
2013-01-02 22:02:07 +08:00
|
|
|
depends on SPI
|
2012-09-08 10:10:56 +08:00
|
|
|
|
2013-06-18 02:31:24 +08:00
|
|
|
if MMCSD_SPI
|
|
|
|
|
2012-04-13 22:27:44 +08:00
|
|
|
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.
|
|
|
|
|
2013-06-18 02:31:24 +08:00
|
|
|
config MMCSD_SPIMODE
|
|
|
|
int "MMC/SD SPI mode"
|
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
Should be mode 0. However, sometimes this is useful for experimenting.
|
|
|
|
|
2020-09-16 07:39:30 +08:00
|
|
|
config MMCSD_IDMODE_CLOCK
|
|
|
|
int "MMC/SD ID Mode SPI clock"
|
|
|
|
default 400000
|
|
|
|
depends on MMCSD_SPI
|
|
|
|
---help---
|
|
|
|
SPI clock identify MMC/SD card.
|
|
|
|
Should be 400KHz or less.
|
|
|
|
|
2022-09-06 18:58:00 +08:00
|
|
|
config MMCSD_SPIRETRY_COUNT
|
|
|
|
int "MMC/SD read/write fail retry max count"
|
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
Try to recovery MMCSD read/write fail.
|
|
|
|
|
2013-06-18 02:31:24 +08:00
|
|
|
endif
|
|
|
|
|
2017-02-01 01:52:00 +08:00
|
|
|
config SDIO_DMA
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
|
2012-04-13 22:27:44 +08:00
|
|
|
config MMCSD_SDIO
|
2013-06-18 02:31:24 +08:00
|
|
|
bool "MMC/SD SDIO transfer support"
|
2013-01-19 00:37:37 +08:00
|
|
|
default n
|
2013-08-11 08:01:23 +08:00
|
|
|
depends on ARCH_HAVE_SDIO
|
2012-04-13 22:27:44 +08:00
|
|
|
|
|
|
|
if MMCSD_SDIO
|
2013-06-18 02:31:24 +08:00
|
|
|
|
2012-04-13 22:27:44 +08:00
|
|
|
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.
|
|
|
|
|
2015-01-09 08:12:06 +08:00
|
|
|
config MMCSD_SDIOWAIT_WRCOMPLETE
|
|
|
|
bool "Use D0 Busy to detect Write Complete"
|
|
|
|
default n
|
|
|
|
depends on ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
|
|
|
---help---
|
|
|
|
SDIO driver will use D0 Busy signalling to detect Write Complete.
|
|
|
|
This option when selected, will enable the MMCSD driver to use the
|
|
|
|
underlying SDIO drivers implementation of the SD specification's
|
|
|
|
D0 Busy signalling to detect Write Complete. This will avoid
|
|
|
|
potentially very long (600Ms+) busy waiting in the MMCSD driver.
|
|
|
|
|
|
|
|
To implement D0 Busy signalling, the underlying driver must
|
|
|
|
be capable of switching the D0 GPIO 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.
|
|
|
|
|
2012-04-13 22:27:44 +08:00
|
|
|
config SDIO_WIDTH_D1_ONLY
|
|
|
|
bool "SDIO 1-bit transfer"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Select 1-bit transfer mode. Default:
|
|
|
|
4-bit transfer mode.
|
2013-03-11 03:31:10 +08:00
|
|
|
|
|
|
|
config SDIO_BLOCKSETUP
|
|
|
|
bool "SDIO block setup"
|
|
|
|
default n
|
|
|
|
---help---
|
2018-07-09 08:24:45 +08:00
|
|
|
Some hardware needs to be informed of the selected blocksize and the
|
2013-03-11 03:31:10 +08:00
|
|
|
number of blocks. Others just work on the byte stream. This option
|
|
|
|
enables the block setup method in the SDIO vtable.
|
|
|
|
|
2023-05-19 12:03:34 +08:00
|
|
|
config MMCSD_BLOCK_WDATADELAY
|
|
|
|
int "The wait timeout to write one data block"
|
|
|
|
default 260
|
|
|
|
---help---
|
|
|
|
Some hardware needs to configure this delay to write one data block, because
|
|
|
|
the hardware needs more time for wear leveling and bad block management.
|
|
|
|
|
2024-08-19 16:26:53 +08:00
|
|
|
config MMCSD_CHECK_READY_STATUS_WITHOUT_SLEEP
|
|
|
|
bool "No sleep in ready-check function."
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Since nxsig_usleep returns at the tick after the next tick, when
|
|
|
|
CONFIG_USEC_PER_TICK is big, the real sleep time is much more than
|
|
|
|
desired in mmcsd_transferready(). As a result, write speed is
|
|
|
|
affected seriously.
|
|
|
|
|
|
|
|
When this configuration is enabled, the sleep in mmcsd_transferready
|
|
|
|
will be skipped. However, CPU will be hogged by the process during
|
|
|
|
this period of writing time.
|
|
|
|
|
2012-04-13 22:27:44 +08:00
|
|
|
endif
|
2020-02-08 15:30:09 +08:00
|
|
|
|
|
|
|
endif # MMCSD
|