Community
cancel
Showing results for 
Search instead for 
Did you mean: 

MMC/SD

MMC/SD



SD/SDIO/MMC Host Driver

  • Please visit http://www.fps-tech.net/sd_host.html for detailed information on the FPS-Tech SD/SDIO/MMC Host Driver.
  • uClinux driver is available in test-nios2 branch of the sopc git repository
  • Example Quartus project and Evaluation IP is available on link above
  • If you are interested in using the core, please request a free license for the 1-bit DAT version (include your NIC ID).


There are two example designs for MMC/SD on NEEK. One with FPS-Tech SD Host IP, and another use Altera SPI. The FPS-Tech IP achieves higher performance (due to DMA), and uses SDIO mode. While the Altera SPI is compatible with application chooser using PIO and SPI mode.

Please follow RootDevice if you want to use MMC/SD as root filesystem.

Please note, there are two formatting method for a SD media (or other flash media),

1. without partition table, use entire capacity. this is the default when you formatting a black media on Windows. You will need to use "mkdosfs -I /dev/sda" (substitute the device) . but not /dev/sda1. On nios2, the SD device is /dev/mmcblk0.

2. with partition table, this may have better compatibility across Linux and digital camera. You will need to use "fdisk /dev/sda" to create FAT16 partition, type 06. Then "mkdosfs /dev/sda1" On nios2, the SD device is /dev/mmcblk0p1.



FPS-Tech SD Host

1. [[media:neek_ocm_sdio.zip|neek_ocm_sdio.zip]

select the driver for nios_mmc, and select the filesystem you want to support, eg, vfat and ext3. The sdio_host component should be named as "sdio", otherwise you have to modify linux-2.6/arch/nios2/kernel/setup.c .

Device Drivers -->


[*] MMC/SD card support --->

[*] MMC block device driver

[ ] Use bounce buffer for simple hosts

[ ] SDIO UART/GPS class support

[ ] MMC host test driver

*** MMC/SD Host Controller Drivers ***

[*] NIOS SD/SDIO/MMC Host

  • Note: Do not enabled bounce buffer for the FPS-Tech SD Host as it will result in driver compatibility issues.

File systems --->


[*] Ext3 journalling file system support


DOS/FAT/NT Filesystems --->

[*] VFAT (Windows-95) fs support

(437) Default codepage for FAT

(iso8859-1) Default iocharset for FAT


-*- Native language support --->

[*] Codepage 437 (United States, Canada)

[*] NLS ISO 8859-1 (Latin 1; Western European Languages)

NIOS_MMC: FPS-Tech SD/SDIO/MMC Host Core, version 1.0

NIOS_MMC: F_MAX: 15000000 Hz, F_MIN: 915 Hz

NIOS_MMC: Host built with 1-bit DAT driver

NIOS_MMC: Using block-prefetching


mmc0: new SD card at address 0002


blk_queue_max_sectors: set to minimum 8

blk_queue_max_phys_segments: set to minimum 1

blk_queue_max_hw_segments: set to minimum 1

blk_queue_max_segment_size: set to minimum 4096

mmcblk0: mmc0:0002 TWTTI 124672KiB


mmcblk0: p1 p2


mount -t vfat /dev/mmcblk0p1 /mnt # for partition 1

or

mount -t vfat /dev/mmcblk0 /mnt # for no partition table on card



Altera SPI Core

2. [[media:neek_ocm_spi.zip|neek_ocm_spi.zip]

select the driver for mmc_spi, and select the filesystem you want to support as above.

The Altera spi component should be named as "mmc_spi", otherwise you have to modify linux-2.6/arch/nios2/kernel/config.c .

Device Drivers -->


[*] SPI support --->

[*] Altera SPI Controller


[*] MMC/SD card support --->

[*] MMC block device driver

[*] Use bounce buffer for simple hosts

[ ] SDIO UART/GPS class support

[ ] MMC host test driver

*** MMC/SD Host Controller Drivers ***

[*] MMC/SD over SPI

mmc_spi spi2.0: ASSUMING SPI bus stays unshared!

mmc_spi spi2.0: ASSUMING 3.2-3.4 V slot power

mmc_spi spi2.0: SD/MMC host mmc0, no DMA, no WP, no poweroff

TCP cubic registered

NET: Registered protocol family 17

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

Freeing unused kernel memory: 676k freed (0x1f6000 - 0x29e000)

mmc0: new SD card on SPI

mmcblk0: mmc0:0000 TWTTI 124672KiB


mmcblk0: p1 p2



mmc spi connection on DE2

.MISO_to_the_mmc_spi (SD_DAT),

.MOSI_from_the_mmc_spi (SD_CMD),

.SCLK_from_the_mmc_spi (SD_CLK),

.SS_n_from_the_mmc_spi (SD_DAT3),

Download

§ neek_ocm_sdio.zip

§ neek_ocm_spi.config kernel config to test ds1338, i2c-gpio

§ neek_ocm_spi.zip openip/gpio instead of Altera PIO

§ sdiotest.zip cache size variants

Attachments
Version history
Revision #:
1 of 1
Last update:
‎06-25-2019 12:54 AM
Updated by:
 
Contributors