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.

Changes for the eMMC in uboot for am3356.

Other Parts Discussed in Thread: AM3356

Hi,

We have custom board based on AM3356 processor.

And we want to use eMMC (4 GB -- Based on e•MMC™5.0 standard) on MMC1 port of processor.

We are using u-boot-2014.07-g7e537bf and SDK version ti-processor-sdk-linux-am335x-evm-01.00.00.00.

We want to configure/run eMMC on 4 bit mode as of now from MLO/u-boot. Is there any changes required for eMMC initialization and file reading for mentioned u-boot version for AM3356?

Thanks in advance.

  • No, this should be handled by the ROM code.
  • Hi Biser,

    Thanks for your reply.

    I want to confirm one query on same topic.

    If ROM would initialize eMMC then why MLO needs to initialize mmc again in file (arch/arm/cpu/armv7/am33xx/board.c -- cpu_mmc_init Function).

    That will call function in file (drivers/mmc/omap_hsmmc.c) and there it initialization with configuration (8bit/4bit,min-max freq,etc.).

    Please make me clear in this case.

    Note : As mentioned we are using u-boot version u-boot-2014.07-g7e537bf.

    Thanks in advance.

  • Hi Biser,


    Can you please help us?

    Regards,

    Nilesh



  • Hi,

    Biser is actually correct, if you choose to boot from eMMC, then ROM code performs the basic MMC configuration, so that the SoC can read & load the MLO image.
    The configurations you refer to in arch/arm/cpu/armv7/am33xx/board.c & drivers/mmc/omap_hsmmc.c perform additional mmc settings so that the controller can be used later in u-boot (i.e. mmc commands in u-boot). Specifically the omap_hsmmc driver is used for the u-boot MMC commands.

    The setting of the bus width (4-bit or 8-bit) is done in omap_hsmmc_set_ios() call. If you wish to force the MMC controller to use 4-bit or 8-bit bus width, you should pass/hardcode the corresponding value 4 or 8 to mmc->bus_width.

    Hope this helps.

    Best Regards,
    Yordan
  • Hi Yordan,

    Thanks a lot for your help. Thanks for your clarification. So in this case can i say without any changes in default u-boot code, ROM bootloader will set up eMMC to boot till u-boot and then Kernel.

    In kernel to set up eMMC with 8 bit width, I have configured .dts file like below :
    &mmc2 {
    status = "okay";
    vmmc-supply = <&vmmcsd_fixed>;
    bus-width = <8>; /*For eMMC 8 bit*/
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mmc2_pins_default>;
    pinctrl-1 = <&mmc2_pins_sleep>;
    cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
    ti,non-removable;
    }

    Is this fine or need to add/remove any more parameters?

    Regards,

    Nilesh

  • Hi,

    This seems correct.
    Just have in mind that you need to mux the gpio0_6 pin correctly, in order to use it in cd-gpios.

    Best Regards,
    Yordan
  • Thanks Yordan for confirming this.
    Thanks a lot.
    We have muxed mentioned card detect pin.
    But, eMMC is non-removable and it will be on board. It will be detected if its out of reset and in working condition.
    SO, cd-gpio (Card Detect gpio) will be required to detect eMMC?
  • Hi,

    It is OK to use the gpio to detect eMMC. What I was trying to say is that you need to set its pinmux in dts.

    Best Regards,
    Yordan