This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3351: MMC3 problem

Part Number: AM3351

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

  • Hi,

    You are probably using Debian Linux. Device tree overlays are not supported in the Linux Processor SDK provided by TI, and no other Linux versions are supported here. For Debian support please contact the community on www.beagleboard.org

  • Hi,

    Thanks for the answer. This is the output of uname -a:

    Linux beaglebone 4.14.71-ti-r80 #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018 armv7l GNU/Linux

    I forgot to say that I use u-boot overlays, so I added my custom.dtb as a cape in uEnv.txt. You can see that there is an i2c device (RTC) which is detected if I enable this overlay. In the meantime I added some GPIO-s as well (I disabled the universal cape in uEnv.txt) and it works.

    Only the MMC2 not. I tried to make errors in the MMC overlay to see if the kernel actually loads the driver or not. Any error in the overlay is detected. So I assume that this configuration is okay. But unfortunately it doesn't work.

    Best regards,

    Gábor

  • This is a Debian release. It's not supported by TI. Please contact the community on www.beagleboard.org