[U-Boot] dra7xx: booting from eMMC raw boot partition

Hi Shankar and Michael,
I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions. I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.
I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd) I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).
However, the CPU does not print anything back on the console...
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
by working, I mean that it prints something like this:
U-Boot SPL 2013.04-09402-gc831bca (Nov 19 2013 - 22:05:38) DRA752 ES1.0 OMAP SD/MMC: 1 ...
I have tried the MLO built from both sources from both uboot master from denx and p-ti-u-boot-2013.04 from omapzoom.
I think the SYSBOOT[5:0] settings are correct because it is able to boot the MLO from the eMMC's user data area.
Does the MLO for raw boot mode needs to be different that the MLO for raw user data area? Is there an errata limitation with the dra7xx for booting MLO from eMMC boot partition?
Am I missing something obvious?
Thank you for everyone's time.

On 11/20/2013 04:27 PM, Richard Retanubun wrote:
Hi Shankar and Michael,
I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions. I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.
I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd) I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).
However, the CPU does not print anything back on the console...
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
by working, I mean that it prints something like this:
U-Boot SPL 2013.04-09402-gc831bca (Nov 19 2013 - 22:05:38) DRA752 ES1.0 OMAP SD/MMC: 1 ...
I have tried the MLO built from both sources from both uboot master from denx and p-ti-u-boot-2013.04 from omapzoom.
I think the SYSBOOT[5:0] settings are correct because it is able to boot the MLO from the eMMC's user data area.
Does the MLO for raw boot mode needs to be different that the MLO for raw user data area? Is there an errata limitation with the dra7xx for booting MLO from eMMC boot partition?
Am I missing something obvious?
Thank you for everyone's time.
Hi Richard, Are you trying to boot Android kernel or Linux kernel? Building u-boot with android config will give you access to fastboot which can help you partition the eMMC and boot out of it.
Regards Shankar

Hi Richard,
On Wed, Nov 20, 2013 at 5:27 PM, Richard Retanubun richardretanubun@ruggedcom.com wrote:
However, the CPU does not print anything back on the console...
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
I have not seen a reference manual for dra7xx, so this may not apply, but it is worth noting that many SoCs that support booting from eMMC do not actually use the boot mode, and simply boot directly from the user data area. The boot mode is described in the eMMC spec in a section titled "Boot operation mode" (Section 7.3 in eMMC 4.4). Basically, it provides a different initialization sequence that will sequentially read out the partition selected in CONFIG_PARTITION. If the SoC is not utilizing this boot mode, it may unconditionally read from the user data area.
Does the MLO for raw boot mode needs to be different that the MLO for raw user data area?
If both MLO and U-Boot are to be in the boot partition, booted using eMMC boot mode, MLO will likely need to behave differently in order to correctly read U-Boot. Boot mode sequentially reads out the selected partition, without using the standard commands, so MLO will need to understand this and perform the appropriate clocking of the eMMC. I am unsure if there is currently support for that.
Hopefully this is helpful! Michael Pratt

Hi Guys, thanks for the responses. my comments are below.
On 20/11/13 05:39 PM, Shankar Rao wrote:> On 11/20/2013 04:27 PM, Richard Retanubun wrote:
Hi Richard, Are you trying to boot Android kernel or Linux kernel? Building u-boot with android config will give you access to fastboot which can help you partition the eMMC and boot out of it.
I am trying to boot Linux kernel. The plan is to put MLO and uboot in the eMMC's boot partition and a GPT partitioned linux in the user data area.
I think there are some errata in the ROM bootcode about booting over QSPI1, I am concerned that I am hitting another errata condition. Can you help me confirm this?
On 21/11/13 12:39 AM, Michael Pratt wrote:
Hi Richard,
On Wed, Nov 20, 2013 at 5:27 PM, Richard Retanubun richardretanubun@ruggedcom.com wrote:
However, the CPU does not print anything back on the console...
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
I have not seen a reference manual for dra7xx, so this may not apply, but it is worth noting that many SoCs that support booting from eMMC do not actually use the boot mode, and simply boot directly from the user data area. The boot mode is described in the eMMC spec in a section titled "Boot operation mode" (Section 7.3 in eMMC 4.4). Basically, it provides a different initialization sequence that will sequentially read out the partition selected in CONFIG_PARTITION. If the SoC is not utilizing this boot mode, it may unconditionally read from the user data area.
Yep. These are the sequence I am trying to do (the "Alternate boot operation")
Does the MLO for raw boot mode needs to be different that the MLO for raw user data area?
If both MLO and U-Boot are to be in the boot partition, booted using eMMC boot mode, MLO will likely need to behave differently in order to correctly read U-Boot. Boot mode sequentially reads out the selected partition, without using the standard commands, so MLO will need to understand this and perform the appropriate clocking of the eMMC. I am unsure if there is currently support for that.
I am aware that the MLO will have to behave differently. But I expect that at least the beginning (version printing) is common. I am trying to use that as a quick-and-dirty test to confirm the SoC's ability to boot over eMMC boot partition.
I am aware that there is no support in denx mainline. In the ti omapzoom repo/u-boot there are code that looks hopeful. (ref: /drivers/mmc/spl_mmc.c::spl_mmc_load_image_raw())
Once I can get the SoC to boot the MLO, I plan to use that for the MLO to find and load uboot.
Hopefully this is helpful! Michael Pratt
Thanks for both your time.

+Amar Amar, can you help Richard with eMMC booting?
Thanks Shankar
-----Original Message----- From: Richard Retanubun [mailto:richardretanubun@ruggedcom.com] Sent: Wednesday, November 20, 2013 4:28 PM To: Rao, Shankar; Shklyarman, Michael Cc: SIFW-Richard Retanubun; u-boot@lists.denx.de Subject: dra7xx: booting from eMMC raw boot partition
Hi Shankar and Michael,
I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions. I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.
I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd) I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).
However, the CPU does not print anything back on the console...
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
by working, I mean that it prints something like this:
U-Boot SPL 2013.04-09402-gc831bca (Nov 19 2013 - 22:05:38) DRA752 ES1.0 OMAP SD/MMC: 1 ...
I have tried the MLO built from both sources from both uboot master from denx and p-ti-u-boot-2013.04 from omapzoom.
I think the SYSBOOT[5:0] settings are correct because it is able to boot the MLO from the eMMC's user data area.
Does the MLO for raw boot mode needs to be different that the MLO for raw user data area? Is there an errata limitation with the dra7xx for booting MLO from eMMC boot partition?
Am I missing something obvious?
Thank you for everyone's time. -- -- Richard Retanubun

On Wed, Nov 20, 2013 at 05:27:50PM -0500, Richard Retanubun wrote:
Hi Shankar and Michael,
I am using the ti dra7xx_evm platform, which comes with a Micron MTFC4GVMEA-4M IT device that has two 16MB boot partitions. I want to load the MLO and uboot into the eMMC's boot partition and boot from it in eMMC automotive peripheral mode.
I am able to write the MLO into the beginning of /dev/mmcblk1boot0 or /dev/mmcblk1boot1 or /dev/mmcblk1 (using dd) I then used mmc-utils to make sure that CONFIG_PARTITION in the eMMC's extcsd is set to allow booting from boot1 (with ACK).
However, the CPU does not print anything back on the console...
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
Did you change the SYSBOOT pins to use automotive peripheral mode, rather than user data? If you did, you should see an error from MLO saying that you came in from an unsupported boot device (since we don't have the value of what ROM tells us for when we come in that way defined in arch/arm/include/asm/arch-omap5/spl.h). Or there is some other problem. Also note that U-Boot defaults to using these "boot" partitions for storing the environment so you will need to change that part of the config once you use these partitions for something else.

On 21/11/13 11:49 AM, Tom Rini wrote:
On Wed, Nov 20, 2013 at 05:27:50PM -0500, Richard Retanubun wrote:
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
Did you change the SYSBOOT pins to use automotive peripheral mode, rather than user data? If you did, you should see an error from MLO saying that you came in from an unsupported boot device (since we don't have the value of what ROM tells us for when we come in that way defined in arch/arm/include/asm/arch-omap5/spl.h). Or there is some other problem.
I did try both SYSBOOT for automotive peripheral mode.. I wished it did say something (even if it is an error message). My problem is that it does not display anything at all. So, I think I fall under the "some other problem" category. :)
Also note that U-Boot defaults to using these "boot" partitions for storing the environment so you will need to change that part of the config once you use these partitions for something else.
Thank you for the heads up. I'll watch out for this when I get to this phase.
Tom, since you're both the u-boot-arm maintainer and happens to work for TI, do you know the e.t.a of mainlining the /drivers/mmc/spl_mmc.c and the related code needed to boot from eMMC in raw mode into denx-master?
I rather stick with denx-master mainline if at all possible, but right now the functionality only exist in p-ti-u-boot-2013.04, right?
Thanks a lot for the pointers.

On Thu, Nov 21, 2013 at 12:57:10PM -0500, Richard Retanubun wrote:
On 21/11/13 11:49 AM, Tom Rini wrote:
On Wed, Nov 20, 2013 at 05:27:50PM -0500, Richard Retanubun wrote:
The only way I can get raw eMMC boot mode to work is if I put the MLO on /dev/mmcblk1 (which is the user data area).
Did you change the SYSBOOT pins to use automotive peripheral mode, rather than user data? If you did, you should see an error from MLO saying that you came in from an unsupported boot device (since we don't have the value of what ROM tells us for when we come in that way defined in arch/arm/include/asm/arch-omap5/spl.h). Or there is some other problem.
I did try both SYSBOOT for automotive peripheral mode.. I wished it did say something (even if it is an error message). My problem is that it does not display anything at all. So, I think I fall under the "some other problem" category. :)
Also note that U-Boot defaults to using these "boot" partitions for storing the environment so you will need to change that part of the config once you use these partitions for something else.
Thank you for the heads up. I'll watch out for this when I get to this phase.
Tom, since you're both the u-boot-arm maintainer and happens to work for TI, do you know the e.t.a of mainlining the /drivers/mmc/spl_mmc.c and the related code needed to boot from eMMC in raw mode into denx-master?
I rather stick with denx-master mainline if at all possible, but right now the functionality only exist in p-ti-u-boot-2013.04, right?
I've done RAW mode booting on my omap5_uevm as well as am335x-based platforms, on SD card and eMMC. But in the case of eMMC it's always the user partitions. I suspect the answer is that for automotive booting you need silicon that supports that, much like the difference between HS and GP devices. I'm not sure what code in p-ti-u-boot-2013.04 hasn't been merged to mainline but if you can give me some pointers I can go and poke some folks.

On 21/11/13 01:09 PM, Tom Rini wrote:
I've done RAW mode booting on my omap5_uevm as well as am335x-based platforms, on SD card and eMMC. But in the case of eMMC it's always the user partitions. I suspect the answer is that for automotive booting you need silicon that supports that, much like the difference between HS and GP devices.
Agreed. If by silicon you mean the CPU, then all the docs I've seen (the TRM for DRA7xx and SYSBOOT in automotive peripheral mode seem to indicate that the SoC is capable or Raw eMMC boot partition booting.
I'm not sure what code in p-ti-u-boot-2013.04 hasn't been merged to mainline but if you can give me some pointers I can go and poke some folks.
Thanks for the offer, poke gently :)
I think it is essentially all the code that touches /drivers/mmc/spl_mmc.c on the ti tree here:
http://git.omapzoom.org/?p=repo/u-boot.git;a=history;f=drivers/mmc/spl_mmc.c...
Thanks for your time, Tom.

On Thu, Nov 21, 2013 at 01:20:08PM -0500, Richard Retanubun wrote:
On 21/11/13 01:09 PM, Tom Rini wrote:
I've done RAW mode booting on my omap5_uevm as well as am335x-based platforms, on SD card and eMMC. But in the case of eMMC it's always the user partitions. I suspect the answer is that for automotive booting you need silicon that supports that, much like the difference between HS and GP devices.
Agreed. If by silicon you mean the CPU, then all the docs I've seen (the TRM for DRA7xx and SYSBOOT in automotive peripheral mode seem to indicate that the SoC is capable or Raw eMMC boot partition booting.
Well, I think it's a little more than that, perhaps depending on eFuse stuff or similar as well.
I'm not sure what code in p-ti-u-boot-2013.04 hasn't been merged to mainline but if you can give me some pointers I can go and poke some folks.
Thanks for the offer, poke gently :)
I think it is essentially all the code that touches /drivers/mmc/spl_mmc.c on the ti tree here:
http://git.omapzoom.org/?p=repo/u-boot.git;a=history;f=drivers/mmc/spl_mmc.c...
Ah, OK, I see where the confusion comes from. There are three things in that tree, roughly, from reading the commits on that file: 1) Android Fastboot support 2) A custom version of "falcon mode" 3) Other odds and ends changes
Looking over the code there, one might think mainline doesn't support eMMC booting or needs changes, because we always say "use mmc device 0". That's fine however because SPL looks at if we came in (hardware numbering now) from MMC1 or MMC2 and then only register that MMC device. So we're always s/w wise mmc device 0.
There's a few patches floating around to add Fastboot support to mainline, and I'd love to see one pushed all the way to mainline.
participants (5)
-
Michael Pratt
-
Rao, Shankar
-
Richard Retanubun
-
Shankar Rao
-
Tom Rini