- This blog is useful for ARM microprocessors running Linux Kernel versions 4.1.2-ti-r4 to 4.4.0.
- It could still be relevant for earlier kernel releases but earlier releases
have not been tested.
- If your ARM microprocessor is running kernel's 4.4.16-ti-rt and newer go to part II:
Interfacing a second SD card reader to the Beaglebone Black
- I could not find any tutorials or guides in forums on how to interface another SD card to the beaglebone black, so I thought I'd share and show you how I got mine up and running. I won't explain the device tree bindings in detail but you can use my solution as a reference.
- Firstly, my beaglebone black, at the time, was running the 4.1.2-ti-r4 Linux Kernel. And I was interfacing Digilent's PmodSD: Full-sized SD Card Slot to the mmc2 lines of the microprocessor.
MMC2 PINMUX CONFIGURATION:
Added in file: am335x-bone-common.dtsi
- Note that the mmc0, mmc1, and mmc2 lines on the beaglebone refer to mmc1, mmc2, and mmc3 in the device tree.
- Also notice that the mmc2_cmd pin is the T13 ZCZ Ball: http://www.ti.com/
product/AM3358/datasheet/ terminal_configuration_and_ functions#bc_15x15_T13 and this T13 line is tied to the R13 line which happens to be gpio1_16. In the pinmux configuration I am referring to:
- You can see that the two lines are connected:
MMC2 DEVICE TREE BINDINGS:
- Pinctrl-0 is set to mmc2's pinmux (mmc3_pins)
- cd-gpios (Card detect) is set to gpio0_31 and is active high, i.e. gpio0_31 is high when SD card is inserted in the SD card reader. Therefore, using the "cd-inverted" property means, that the CD line is active high.
- Max-frequency is set to 25MB/s because of SD bus speed specifications.
- dmas parameters: <&edma 12 &edma 13>
- use dma channels 12 and 13
- 12 and 13 are mapped to crossbar events 1 and 2
ti,edma-xbar-event-map = /bits/ 16 <1 12 2 13>;
- Search EDMA Events in AM335x Sitara Processors Technical Reference Manual (Rev. N)
- Here's the mmc device tree bindings documentation: