aaronyang
Posts: 3
Joined: Fri Mar 21, 2014 5:54 am

About the second sdcard host interface driver

Fri Mar 21, 2014 6:11 am

BCM2835 contains two sd card host interfaces , supporting sd memory cards and emmc.

I want enable the second sd/emmc interface.
I did not see the second sd/emmc interface driver in kernel
I only saw one EMMC_BASE within kernel source code
How could I programming the second sd/emmc interface?

someone can help me ~ :cry:

msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Re: About the second sdcard host interface driver

Fri Mar 21, 2014 12:05 pm

For the same reason that there is no second UART or SPI devices: the required pins are not (completely) accessible.

If you look in the Peripherals Document on page 101/102 you will find those Alternate functions.

And there you can find that you would need the whole bank GPIO22-27 to make SD1 work (Column ALT3) - the ones for SD0 are GPIO48-53 (but not explicitly documented in the Document, but you can get those pins from the schematics).

So for SD1, we got all but GPIO26 available, which is the 3rd of 4 necessary data lanes to the SD card.
Thus it is not possible to make use of this specific hardware-block and hence nobody wrote a driver for it.

But you can use the (slower) SPI-based mmc driver if you need a second SD card...
Or you use a tiny USB SD card reader, which gives you faster access speeds than the SPI approach...

Martin

aaronyang
Posts: 3
Joined: Fri Mar 21, 2014 5:54 am

Re: About the second sdcard host interface driver

Mon Mar 24, 2014 1:40 am

Hello, Martin

I got an more detail gpio mapping file for bcm2835 (attachment doc)
According to describe which we can do second sd/emmc interface using gpio 34 ~ 43 pins
But I only saw one EMMC_BASE in kernel source code
i don't known how to programming the second sd/emmc interface driver ? :?
Attachments
sample GPIO Map.zip
(13.34 KiB) Downloaded 136 times

msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Re: About the second sdcard host interface driver

Mon Mar 24, 2014 7:10 am

Yes, but you miss my Point: as mentioned some of those pins are not exposed via pinheaders and thus you cannot access them on the rpi.

So unless you design your own board with a bcm2835 chip exposing those pins you will not be able to make use of them.

As for the base-register: the official documentation mostly mentions features that are usable on the pi. But also the gpu source code does not mention it, so you would need to scan the register range to find the ones...

But as said: it is not worth the effort because of the pins themselves are not fully accessible...

aaronyang
Posts: 3
Joined: Fri Mar 21, 2014 5:54 am

Re: About the second sdcard host interface driver

Tue Mar 25, 2014 1:30 am

Hi,

Yes, our own design based with bcm2835
what do you mean about "scan the register range"
how could i do about "scan" ?

Return to “Interfacing (DSI, CSI, I2C, etc.)”