U-Boot DM device tree and Linux device tree - what are the differences and why?

Fabio Estevam festevam at gmail.com
Tue May 19 14:23:10 CEST 2020


Hi Rudolf,

On Tue, May 19, 2020 at 1:28 AM Rudolf J Streif
<rudolf.streif at ibeeto.com> wrote:
>
> I solved the problem with u-boot not recognizing the eMMC. The device
> tree is working now for u-boot.
>
> However, i.MX6 is using SPL which is loaded into OCRAM. If I flash SPL
> and u-boot to a boot partition on the eMMC the boot ROM loads SPL just
> fine but then SPL cannot load u-boot from eMMC:
>
> Trying to boot from MMC1
> MMC: no card present
> spl: mmc init failed with error: -123
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
>
> If I enable CONFIG_SPL_DM=y and CONFIG_SPL_DM_MMC=y then I am getting
> this undefined reference (and a whole slew of other related to DM):
>
> common/built-in.o:(.u_boot_list_2_uclass_2_usb_hub+0x8): undefined
> reference to `dm_scan_fdt_dev'
>
> Even if I get this to link then the next question of course is if it
> will fit into the 68k OCRAM that the SoC has (the whole device tree
> infrastructure has a rather large footprint). It is hard to follow why
> the DM now is essentially enforced for storage media but does not seem
> to be tested with SPL.

I had a similar issue on a pico-imx6ul board. I preferred to put the
MMC initialization code in SPL rather than relying on DM as in SPL we
are very tight in memory.

Please see this commit:
https://gitlab.denx.de/u-boot/u-boot/-/commit/9b8d9ec41a6f161d53d32bf71f79332236b44ba1


More information about the U-Boot mailing list