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.

PROCESSOR-SDK-AM335X: eMMC card voltage issue

Part Number: PROCESSOR-SDK-AM335X

Hi  TI team:

    My custom board am335x, emmc in linux kernel, print no support for card's volts. I can read and write emmc in uboot, But in linux there is nothing with fdisk -l. I have configured CONFIG_OMAP_HSMMC.My linux kernel version is 4.4. I use spiflash for uboot and i just want to access emmc in linux. My emmc is 8bit width. And in am33xx.dtsi, even I changed omap4-hsmmc to am33xx-hsmmc,I got the same result.

    I take am335x-bone-common.dtsi as a refference, my dts is as follows. I use mmc1, 

 &mmc1 {

vmmc-supply = <&vmmcsd_fixed>;
pinctrl-names = "default";
pinctrl-0 = <&emmc_pins>;
bus-width = <8>;
status = "okay";
};

emmc_pins: pinmux_emmc_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_csn0.mmc1_clk */
AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_csn1.mmc1_cmd */
AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.mmc1_dat0 */
AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.mmc1_dat1 */
AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.mmc1_dat2 */
AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.mmc1_dat3 */
AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad4.mmc1_dat4 */
AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad5.mmc1_dat5 */
AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad6.mmc1_dat6 */
AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad7.mmc1_dat7 */
>;
};

I have checked the pins and make sure that it is no mistake.

The kernel print is as follows:

[ 3.255113] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 3.264045] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[ 3.280042] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[ 3.287504] omap_hsmmc 48060000.mmc: @@@@@@@@@@@@ocr:16744576, ocr_avail:0
[ 3.294572] omap_hsmmc 48060000.mmc: no support for card's volts
[ 3.300705] mmc0: error -22 whilst initialising MMC card

I found that the ocr_avail is 0, so the error happens.

My emmc is MTFC4GACAJCN-4MIT, and it is 5.0, I google that am335x can support emmc 5.0.

Attachment is kernel print log and mmc pin definition.

Any help is appricaitedam335x.rar

  • Hi user5264099,

    I see in your log that you are using kernel 4.4.113, which is not coming from AM335x TI PSDK. TI PSDK 4.4 kernels are 4.4.12 (PSDK3.00), 4.4.19 (PSDK3.01), 4.4.32 (PSDK3.02) and 4.4.41 (PSDK3.03).

    I will check your specific questions and come back to you, but note that we can be in better help if you can reproduce your issue with kernel that comes with TI PSDK.

    Regards,
    Pavel

  • user5264099 said:
    [ 3.287504] omap_hsmmc 48060000.mmc: @@@@@@@@@@@@ocr:16744576, ocr_avail:0
    [ 3.294572] omap_hsmmc 48060000.mmc: no support for card's volts

    On BBB we have MMC0/0x48060000 used for SD card and MMC1/0x481D8000 used for eMMC.

    Could you please confirm that you connect eMMC to MMC0/0x48060000 of your AM335x custom board?

    user5264099 said:

     &mmc1 {

    vmmc-supply = <&vmmcsd_fixed>;
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_pins>;
    bus-width = <8>;
    status = "okay";
    };

    I see the below mmc1 entry in your attached am335x-bone-common.dtsi file:

    &mmc1 {
        status = "okay";
        bus-width = <0x4>;
        pinctrl-names = "default";
        pinctrl-0 = <&mmc1_pins>;
        cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    };

    Please double check your am335x-bone-common.dtsi file.

    user5264099 said:
    emmc_pins: pinmux_emmc_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_csn0.mmc1_clk */
    AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_csn1.mmc1_cmd */
    AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.mmc1_dat0 */
    AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.mmc1_dat1 */
    AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.mmc1_dat2 */
    AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.mmc1_dat3 */
    AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad4.mmc1_dat4 */
    AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad5.mmc1_dat5 */
    AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad6.mmc1_dat6 */
    AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad7.mmc1_dat7 */
    >;
    };

    Some of the MMC0 pins (named mmc1 in your DTSI file) seems to be overwritten, for example:

    emmc_pins: pinmux_emmc_pins {

    AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad4.mmc1_dat4 */

     

    cpsw_default: cpsw_default {

    AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd2.mii1_rxd2 */

     

    I would recommend you to verify your MMC0 pinmux registers in Control Module have the correct values in user space, Check these with devmem2 tool or omapconf tool.

    Regards,
    Pavel