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

Rudolf J Streif rudolf.streif at ibeeto.com
Wed May 20 01:11:14 CEST 2020


Hi Fabio

On 5/19/20 5:23 AM, Fabio Estevam wrote:
> 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

Thank you so much. You pointed me into the right direction. I was able
to find a solution for my board.

Much appreciated.

Rudi

-- 
-----
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200519/21d9fa26/attachment.sig>


More information about the U-Boot mailing list