Hello,
I'm trying to connect an SD card to the MMC3 on the Beaglebone black. I created a custom board with an SD card holder. I've written a device tree overlay (I'm still learning it) to enable this peripheral.
In /sys/class I can see the MMC3 as MMC1 with the correct parameters. However under /dev I can't see the SD card. Furthermore under /sys/kernel/debug/mmc1/ios I get strange values, for example the VDD is 0 (invalid), the clock is 0Hz etc. (See the attached image)
And here is my complete device tree overlay:
/dts-v1/; /plugin/; #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/pinctrl/am33xx.h> / { compatible = "ti,am335x-bone-black", "ti,am335x-bone"; exclusive-use = "P8.12"; fragment@0 { target = <&i2c2>; __overlay__ { rtc@68 { compatible = "maxim,ds1307"; reg = <0x68>; }; }; }; fragment@1 { target = <&am33xx_pinmux>; __overlay__ { mmc3_pins: pinmux_mmc3_pins { pinctrl-single,pins = < 0x30 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a1.mmc2_dat0, INPUT_PULLUP | MODE3 */ 0x34 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a2.mmc2_dat1, INPUT_PULLUP | MODE3 */ 0x38 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a3.mmc2_dat2, INPUT_PULLUP | MODE3 */ 0x3C (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ben1.mmc2_dat3, INPUT_PULLUP | MODE3 */ 0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_csn3.mmc2_cmd, INPUT_PULLUP | MODE3 */ 0x8C (PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_clk.mmc2_clk, INPUT_PULLUP | MODE3 */ 0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a0.gpio1_16 */ /* 0x74 (PIN_INPUT_PULLDOWN | MUX_MODE7) */ /* mmc2_sdcd, p9_13, Note: Dont know why but we set card detect pinout to be GPIO */ /* 0x15c (PIN_INPUT_PULLDOWN | MUX_MODE1) */ /* mmc2_sdwp, p9_17, Note: Write protect is not configured in the device tree settings*/ >; }; }; }; fragment@2 { target = <&mmc3>; __overlay__ { compatible = "ti,omap4-hsmmc"; vmmc-supply = <&vmmcsd_fixed>; interrupts = <29>; reg = <0x47810000 0x1000>; ti,dual-volt; ti,needs-special-reset; ti,needs-special-hs-handling; pinctrl-names = "default"; pinctrl-0 = <&mmc3_pins>; /* cd-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; cd-inverted; */ broken-cd; bus-width = <4>; /* max-frequency = <25000000>; */ dmas = <&edma_xbar 12 0 1 &edma_xbar 13 0 2>; dma-names = "tx", "rx"; status = "okay"; }; }; fragment@3 { target = <&edma>; __overlay__ { ti,edma-xbar-event-map = /bits/ 16 <1 12 2 13>; }; }; };
Thanks,
Gábor