Raspberry Pi SD card support

Alan Cudmore alan.cudmore at gmail.com
Fri Apr 4 02:06:16 UTC 2014


>From my limited research, it looks like the emmc controller in the
Raspberry Pi BCM2835 may be the way to go.
It looks like it is a high level controller for the SD/MMC card slot on the
Pi.

Since this is a custom controller, I don't think there would be an existing
driver in RTEMS.

It seems that this emmc controller in the Pi may handle different types of
cards, and at a higher level than just using the SPI bus to access the
card. ( This is based on some searches of conversations on the raspberry pi
forums , not my experience )

You would have to write a driver for this emmc controller and provide the
interface to libblock for the file system interface on RTEMS. The code you
have linked above for rpi-boot looks like it has a permissive license, so
it *may* be possible to use this code in the RTEMS driver. There is some
other potentially useful code in there too.

I'll have to try the serial bootloader, I am also close to ordering an
inexpensive JTAG adapter to try loading and debugging through JTAG. uboot
is another possibility, using a TFTP server.

Alan




On Wed, Apr 2, 2014 at 12:02 PM, Andre Marques <
andre.lousa.marques at gmail.com> wrote:

> Hello,
>
> I'm intending to work in the SD card support for the Raspberry Pi BSP,
> using the SD mode instead of the SPI mode.
>
> The references I have gathered so far for this are as follows:
>
> The Raspberry Pi SOC guide: Broadcom BCM2835 Peripherals Guide (Chapter 5
> - EMMC)
>
> The simplified SD standard - https://www.sdcard.org/
> downloads/pls/simplified_specs/
>
> And the following github code - https://github.com/jncronin/
> rpi-boot/blob/master/emmc.c
>
> There is also the libchip/i2c/spi-sd-card libi2c driver, which can also be
> a reference (even though it uses SPI).
>
> Now, the questions:
>
> Should I use the Generic Disk Device driver, as the
> libchip/i2c/spi-sd-card ?
>
> Is there any driver using the SD mode for sd card access, or using an emmc
> interface currently in the RTEMS code base? I haven't found any.
>
> On a side note, I managed to send RTEMS applications to the RPi though the
> UART interface using the xmodem protocol.
>
> For that I used the following bootloader
>
> https://github.com/dwelch67/raspberrypi/tree/master/bootloader05
>
> It takes me 2 minutes to send 1 MB of data to the RPi, but this could be
> improved if it used 1024 byte block transfer instead of the default of 128.
> The bootloader loads the transfered program to memory and runs it. Then the
> RPi must be rebooted so a new program can be sent.
>
> It may not be the best way, but only requires an usb-to-uart cable, and
> avoids the current SD card "dance" to run programs on the Pi.
>
> Thank you for your time.
>
> --André Marques
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140403/ea1d2544/attachment-0001.html>


More information about the devel mailing list