65a866fbe2
- MMC and SD Card driver - ported from imxrt_usdhc.c Squashed commit of the following: commit 46cbe18ad6a6e41ec2727d839f86f5670577878a Author: Adam Feuer <adam@starcat.io> Date: Wed Jul 15 10:28:02 2020 -0700 nxstyle change - Public Function Prototypes - instead of Public Functions commit 486b7b62e83a78ae15b114e34846900d8fef8248 Author: Adam Feuer <adam@starcat.io> Date: Wed Jul 15 10:06:51 2020 -0700 nxstyle changes commit 28280d585a40aac99fd0e538295828ea013739b7 Author: Adam Feuer <adam@starcat.io> Date: Wed Jul 15 10:06:29 2020 -0700 removing unused enum value commit 7da6ba437e7e023d348e63c497732fea985a2d1b Author: Adam Feuer <adam@starcat.io> Date: Tue Jul 14 21:17:49 2020 -0700 CI build error fixes - unused vars - incorrect method calls commit 145a73449b9d1eaed8a6cbf47cb53fb5b7a551f6 Author: Adam Feuer <adam@starcat.io> Date: Tue Jul 14 17:29:56 2020 -0700 adding #defines to prevent unused var warning commit 47ed2c08235816caded26a019cf33899daed1621 Author: Adam Feuer <adam@starcat.io> Date: Tue Jul 14 16:29:07 2020 -0700 removing obsolete config values commit b43f129c03a8bb8dc57ae6984d124ce9e9306196 Author: Adam Feuer <adam@starcat.io> Date: Tue Jul 14 09:58:42 2020 -0700 removed obsolete config setting commit 23e3af846ac24cac928442c7af86c5d0ef183ad3 Merge: 8b47330fe56f6d61eec4
Author: Adam Feuer <adam@starcat.io> Date: Tue Jul 14 09:53:12 2020 -0700 Merge remote-tracking branch 'upstream/master' into feature/sama5d27-sdmmc-support commit 8b47330fe5bb49bbd1991f2f3e2c69bdfb833d2c Author: Adam Feuer <adam@starcat.io> Date: Tue Jul 14 09:51:56 2020 -0700 replaced license headers with Apache License 2.0 commit 865e69b9a84d077ab9e05c2056dc7a515222c6c7 Author: Adam Feuer <adam@starcat.io> Date: Thu Jul 9 18:38:01 2020 -0700 SAMA5D2x SDMMC peripheral support (SD Card driver) - reading and writing at 25 MHz and 50Mhz - UHS_SDR50, UHS_DDR50, and UHS_SDR104 are supported - ported from imxrt_usdhc.c - only tested on SAMA5D27 Squashed commit of the following: commit e3122baef2feaeb32bb00798ae56310b2cc5c448 Author: Adam Feuer <adam@starcat.io> Date: Thu Jul 9 18:30:03 2020 -0700 added sdmmcnsh defconfig and basic docs commit 12a290d7465a0a006473ba67893bf891a7bcea83 Author: Adam Feuer <adam@starcat.io> Date: Thu Jul 9 17:50:06 2020 -0700 nxstyle changes commit 33409c0f63c328dc200150ba883327cadf0300b2 Author: Adam Feuer <adam@starcat.io> Date: Thu Jul 9 16:15:00 2020 -0700 add short delay to in recvshortcrc - to allow SDMMC to respond commit 3be7a7fb6f79900042d1fdbef72810f364ac5f62 Author: Adam Feuer <adam@adamfeuer.com> Date: Thu Jul 9 10:54:59 2020 -0700 added SDR50 and SDR104 SDMMC bus modes commit 2888408866548ca53e582ea1525178a7733617b4 Author: Adam Feuer <adam@adamfeuer.com> Date: Thu Jul 9 10:54:25 2020 -0700 comment formatting cleanup commit 06cf2c39193971155eaa6f9c89a39a88b53964a8 Author: Adam Feuer <adam@adamfeuer.com> Date: Thu Jul 9 10:34:01 2020 -0700 removed unneeded comment commit ac89b69231bdf19563754865fda93d4bbbb4488d Author: Adam Feuer <adam@adamfeuer.com> Date: Thu Jul 9 10:30:23 2020 -0700 code cleanup - removing custinfo() logging - remove duplicate #defines - move var declarations to the beginning of methods commit bcd4abec7935ee9023ab72edfb02685dbeee243c Author: Adam Feuer <adam@adamfeuer.com> Date: Wed Jul 8 16:34:31 2020 -0700 handle SDMA Boundary Pause interrupt (DMAINT) - SDMMC_INT_DINT - add to waitints - add handler to sam_interrupt commit e9da026c1270e999df520ee2c60487195799f58c Author: Adam Feuer <adam@adamfeuer.com> Date: Tue Jul 7 16:07:34 2020 -0700 Kconfig setting for SDMMC bus speed - 25 and 50 MHz - 50 MHz is the default commit 9edc636b7f18f981d653f85970c3af0b80801778 Author: Adam Feuer <adam@adamfeuer.com> Date: Mon Jul 6 21:55:51 2020 -0700 added HSEN bit change for high speed mode - above 26 MHz commit b8e91c95b0f7b2f8220f02b1eb42b6134e0660d0 Author: Adam Feuer <adam@adamfeuer.com> Date: Mon Jul 6 21:28:03 2020 -0700 added calloc to fix bug - not sure why this works. commit 1ceaf2f8487fe39d4d6fb21adecd57e4c4992e07 Author: Adam Feuer <adam@adamfeuer.com> Date: Mon Jul 6 21:25:47 2020 -0700 removing spurious typo characters commit 14ba51743bcca35686b07a76f5af17bcce078a5f Author: Adam Feuer <adam@adamfeuer.com> Date: Sat Jul 4 18:10:46 2020 -0700 nxstyle changes commit d8af26df47b7840117de0d3a44ec548b3a72bc2b Author: Adam Feuer <adam@adamfeuer.com> Date: Sat Jul 4 17:01:11 2020 -0700 nxstyle changes commit 0ae532bd62d02c5ac36aa2192f31fa1f7f1cde99 Author: Adam Feuer <adam@adamfeuer.com> Date: Sat Jul 4 16:37:17 2020 -0700 remove long lines in comments - nxstyle commit 3d025a84f8e9ddb7f7a4570504118d782dd5574c Author: Adam Feuer <adam@adamfeuer.com> Date: Sat Jul 4 16:36:52 2020 -0700 removed custinfo logging commit 366b5d9d241a42d693583679cb49aa7bf25615aa Author: Adam Feuer <adam@adamfeuer.com> Date: Sat Jul 4 16:35:08 2020 -0700 removed custinfo logging commit c74396e4a4943873c7de5b6ffee193787c39baef Author: Adam Feuer <adam@adamfeuer.com> Date: Sat Jul 4 16:34:36 2020 -0700 fixed typo commit 7f51e99d7f4c1e5e0bf71a84fd0b2467157fea59 Merge: c40f8c10392481b1bfd5
Author: Adam Feuer <adam@adamfeuer.com> Date: Sat Jul 4 15:33:06 2020 -0700 Merge remote-tracking branch 'upstream/master' into feature/sama5d27-sdmmc-support commit c40f8c10390ecefeb3a113046edd6740b07ab31b Author: Adam Feuer <adam@adamfeuer.com> Date: Thu Jul 2 22:08:20 2020 -0700 SDMMC support for SAMA5D27
132 lines
2.9 KiB
Plaintext
132 lines
2.9 KiB
Plaintext
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
if ARCH_BOARD_SAMA5D2_XULT
|
|
|
|
choice
|
|
prompt "CPU Frequency"
|
|
default SAMA5D2XULT_396MHZ
|
|
|
|
config SAMA5D2XULT_384MHZ
|
|
bool "384 MHz"
|
|
|
|
config SAMA5D2XULT_396MHZ
|
|
bool "396 MHz"
|
|
|
|
config SAMA5D2XULT_498MHZ
|
|
bool "498 MHz"
|
|
|
|
config SAMA5D2XULT_528MHZ
|
|
bool "528 MHz"
|
|
|
|
endchoice # CPU Frequency
|
|
|
|
config SAMA5D2XULT_USBHOST_STACKSIZE
|
|
int "USB host waiter stack size"
|
|
default 1536 if USBHOST_HUB
|
|
default 1024 if !USBHOST_HUB
|
|
depends on USBHOST
|
|
|
|
config SAMA5D2XULT_USBHOST_PRIO
|
|
int "USB host waiter task priority"
|
|
default 100
|
|
depends on USBHOST
|
|
|
|
config SAMA5_SDMMC
|
|
bool "enable SDMMC controller"
|
|
default y if SAMA5_HAVE_SDMMC
|
|
select SDIO_DMA
|
|
select SCHED_WORKQUEUE
|
|
select SCHED_HPWORK
|
|
select MMCSD
|
|
select MMCSD_SDIO
|
|
select SDIO_BLOCKSETUP
|
|
select ARCH_HAVE_SDIO
|
|
select SAMA5_SDMMC_DMA
|
|
---help---
|
|
Enable SD Card interface SDMMC0. Selects SAMA5_SDMMC SAMA5_SDMMC0 SAMA5_SDMMC_DMA SDIO_DMA SCHED_WORKQUEUE SCHED_HPWORK SDIO_BLOCKSETUP
|
|
|
|
config SAMA5_SDMMC0
|
|
bool "Enable SDMMC0 (built-in eMMC)"
|
|
default n if SAMA5_SDMMC
|
|
depends on SAMA5_SDMMC
|
|
|
|
config SAMA5_SDMMC0_SIZE
|
|
int "SDMMC0 size in bytes"
|
|
default 4294967296
|
|
depends on SAMA5_SDMMC0
|
|
---help---
|
|
Size of eMMC flash in bytes. Default: 4GB
|
|
|
|
config SAMA5D27_SDMMC0_MOUNT
|
|
bool "Mount SDMMC0 at startup"
|
|
default n
|
|
depends on SAMA5_SDMMC0
|
|
|
|
config SAMA5D27_SDMMC0_MOUNT_BLKDEV
|
|
string "SDMMC0 block device name"
|
|
default mmc0
|
|
depends on SAMA5_SDMMC0
|
|
|
|
config SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT
|
|
string "SDMMC0 mountpoint"
|
|
default "/mnt/sdmmc0"
|
|
depends on SAMA5_SDMMC0
|
|
|
|
config SAMA5D27_SDMMC0_MOUNT_FSTYPE
|
|
string "SDMMC0 file system type"
|
|
default "vfat"
|
|
depends on SAMA5_SDMMC0
|
|
|
|
config CONFIG_SAMA5_SDMMC1_WIDTH_D1_D8
|
|
bool "SDMMC0 data bus width 8 bits"
|
|
default y
|
|
depends on SAMA5_SDMMC0
|
|
|
|
config SAMA5_SDMMC1
|
|
bool "Enable SDMMC1"
|
|
default y if SAMA5_SDMMC
|
|
select SAMA5_SDMMC1_WIDTH_D1_D4
|
|
depends on SAMA5_SDMMC
|
|
|
|
config SAMA5_SDMMC1_SIZE
|
|
int "SDMMC1 size in bytes"
|
|
default 1073741824
|
|
depends on SAMA5_SDMMC1
|
|
---help---
|
|
Size of SD Card in bytes. Default: 16GB
|
|
|
|
config SAMA5D27_SDMMC1_MOUNT
|
|
bool "Mount SDMMC1 at startup"
|
|
default n
|
|
depends on SAMA5_SDMMC1
|
|
|
|
config SAMA5D27_SDMMC1_MOUNT_BLKDEV
|
|
string "SDMMC1 block device name"
|
|
default mmc1
|
|
depends on SAMA5_SDMMC1
|
|
|
|
config SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT
|
|
string "SDMMC1 mountpoint"
|
|
default "/mnt/sdmmc1"
|
|
depends on SAMA5_SDMMC1
|
|
|
|
config SAMA5D27_SDMMC1_MOUNT_FSTYPE
|
|
string "SDMMC1 file system type"
|
|
default "vfat"
|
|
depends on SAMA5_SDMMC1
|
|
|
|
config MMCSD_HAVE_CARDDETECT
|
|
bool "SDMMC1 card detect"
|
|
default y
|
|
depends on SAMA5_SDMMC1
|
|
|
|
config SAMA5_SDMMC1_WIDTH_D1_D4
|
|
bool "SDMMC1 data bus width 4 bits"
|
|
default y
|
|
depends on SAMA5_SDMMC1
|
|
|
|
endif # ARCH_BOARD_SAMA5D2_XULT
|