2
votes

I am working with a Beaglebone Black and I would like to use the mmc2 slot.

according to AM335xx TRM, a beaglebone black should have 3 mmc available: mmc0 (sd card); mmc1 (2G flash), mmc2.

I am trying to enable mmc2 by device tree (and I am quite sure to have the right pin settings) but, by doing dmesg I obtain:

/ocp/mmc@47810000: can't find DMA channel
 omap_hsmmc mmc.11: unable to obtain RX DMA engine channel 65

By putting the oscilloscope probe on the header (e.g. the mmc2 clk signal), I do not see any transition. I already removed R 160 to have mmc2 cmd accessible but I do not see any transition also there.

I tried both to enable it by

 echo > /sys/devices/..../slots

and by

  capemgr.enable_partno

with no success: I can see it in

/sys/devices/..../slots

(with the L meaning loaded)..but no way to see any signal on the header.

I already googled it but answers are not clear at all. Any ideas?

My

 uname -a

is:

Linux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU/Linux

Thanks for your help.

1
Have you found solution yet? I'm planning to use BeagleBoard Black for my project and I also want to use 3rd MMC. Internal 2GB flash for OS, micorSD for logs, and mmc2 for read only data. - chatoooo
No, no solution..I just decided to not use another SD card. - user3244354

1 Answers

3
votes

You need to configure the mmc2 DMA events to some DMA channel since these events are not direct mapped.

I was not able to do this successfully using device tree overlays. So I made a change in the am335-x-bone-common.dtsi directly (not sure this is the best way though):

&edma {
ti,edma-xbar-event-map = <32 12>,   /* gpevt2 -> 12 */
                         <30 20>,   /* xdma_event_intr2 -> 20 */
+                        <1  32>,
+                        <2  33>;   
};

In the example above the event 1 (SDTXEVT2) was mapped to channel 32 and event 2 (SDRXEVT2) to channel 33.

In case you want to pick another open DMA channel check tables 11-23. Direct Mapped and Table 11-24. Crossbar Mapped from the technical reference manual Rev J.

In your device tree overlay file add these channels in the mmc3 node:

dmas = <&edma 32 
        &edma 33>;
dma-names = "tx", "rx";