eMMC support in u-boot

      eMMC support in u-boot

      Do you plan to include support for the eMMC on armStoneA9r2 in u-boot?

      There is a post containing some information on how to do this with the efusA9 board:
      details of u-boot reading support for efusA9 emmc

      I need to use eMMC for temporary storage when upgrading the root file system using the u-boot update command. I use the SD card for this today, but I would like to get rid of that dependency.

      Kind regards,
      Hein Gustavsen
      Miros AS
      At the moment this is not on top of our TODO list.
      For EMMC support in UBoot there are a few tasks to do.
      Here are some additional information why it's not done in a short time:
      eMMC not accessible

      I assume that your NAND is not big enough for some kind of recovery partition?

      Best Regards
      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      Post was edited 1 time, last by “fs-support_PH” ().

      I created this patch based on linux device tree values and this forum post:
      details of u-boot reading support for efusA9 emmc

      Difference-File

      1. diff -Naur a/board/F+S/fsimx6/fsimx6.c b/board/F+S/fsimx6/fsimx6.c
      2. --- a/board/F+S/fsimx6/fsimx6.c 2016-08-08 19:07:02.000000000 +0200
      3. +++ b/board/F+S/fsimx6/fsimx6.c 2017-01-16 10:54:48.165815770 +0100
      4. @@ -475,6 +475,21 @@
      5. IOMUX_PADS(PAD_NANDF_CS2__GPIO6_IO15 | MUX_PAD_CTRL(NO_PAD_CTRL)),/* CD */
      6. };
      7. +/* eMMC pads definition */
      8. +static iomux_v3_cfg_t const usdhc3_emmc_pads[] = {
      9. + IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(0x17071)),
      10. + IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(0x10071)),
      11. + IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(0x10071)),
      12. + IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(0x10071)),
      13. + IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(0x10071)),
      14. + IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(0x10071)),
      15. + IOMUX_PADS(PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(0x10071)),
      16. + IOMUX_PADS(PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(0x10071)),
      17. + IOMUX_PADS(PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(0x10071)),
      18. + IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(0x10071)),
      19. + IOMUX_PADS(PAD_SD3_RST__SD3_RESET | MUX_PAD_CTRL(0x1B071)),/* Reset eMMC, active low */
      20. +};
      21. +
      22. struct fsl_esdhc_cfg esdhc_cfg[] = {
      23. {
      24. .esdhc_base = USDHC1_BASE_ADDR,
      25. @@ -505,7 +520,12 @@
      26. return !gpio_get_value(IMX_GPIO_NR(6, 15));
      27. case BT_ARMSTONEA9R2:
      28. - return !gpio_get_value(IMX_GPIO_NR(1, 4));
      29. + if (mmc->block_dev.dev == 0)
      30. + /* External SD card slot has Card Detect (CD) */
      31. + return !gpio_get_value(IMX_GPIO_NR(1, 4));
      32. + else
      33. + /* On-board SD card slot has no Card Detect (CD) */
      34. + return 1; /* Assume card is present */
      35. case BT_PICOMODA9:
      36. if (mmc->block_dev.dev == 0)
      37. @@ -612,6 +632,12 @@
      38. index = 0;
      39. break;
      40. + case BT_ARMSTONEA9R2:
      41. + SETUP_IOMUX_PADS(usdhc3_emmc_pads);
      42. + ccgr6 |= (3 << 6);
      43. + index = 2;
      44. + break;
      45. +
      46. default:
      47. return 0; /* No more SD card slots */
      48. }


      I can now read the eMMC, but I don't know the meaning of the ccgr6 value. Could you please explain?

      Kind regards,
      Hein Gustavsen
      Miros AS

      Post was edited 3 times, last by “heing” ().

      This is the clock for the USDHC device. You have to enable the clock to the device or you can not use the device.

      We are currently also revising the SD initialization, so maybe I have a solution, too, very soon.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.