[U-Boot] ROCK64 fails to boot using U-Boot TPL

Matwey V. Kornilov matwey.kornilov at gmail.com
Fri Sep 20 17:37:57 UTC 2019


пт, 20 сент. 2019 г. в 20:28, Simon South <simon at simonsouth.net>:
>
> On 2019-09-20 12:43 p.m., Matwey V. Kornilov wrote:
> > Could you please use u-boot console and try to locate and load dtb
> > file manually using `ls` and `load` commands in both scenarios?
>
> Results attached.
>
> I'm using a regular microSD card, not eMMC, but you're right: Using the
> U-Boot TPL the DTB file isn't loaded correctly; it's placed in memory
> but the data is corrupt:
>
>      => md ${fdt_addr_r}
>      01f00000: adaaaa8a ea22282a baa0aeae aa7aa3aa    ....*(".......z.
>      01f00010: a8a200ab abaa000a a8a2aa08 aa88aafa    ................
>      01f00020: e92a00a3 aabcf8a8 eaaaa8fa aaaaab88    ..*.............
>      01f00030: aaa8a0aa 2aa8088a 22a5e3ba 8bea4abe    .......*...".J..
>      01f00040: 23b188aa a20aa84a 82aaaaaa 8eee8cae    ...#J...........
>      01f00050: 92aaaa4a aaa4feaa aa8a2eae eaa38b8a    J...............
>      01f00060: aae4b2a8 aaacaaba aaea8ab8 2aeeb82a    ............*..*
>      (...)
>      => load mmc 1 ${fdt_addr_r} /dtb/rockchip/rk3328-rock64.dtb
>      53513 bytes read in 10 ms (5.1 MiB/s)
>      => md ${fdt_addr_r}
>      01f00000: edfe0d50 09d10000 38000000 70ba0000    P..........8...p
>      01f00010: 28000000 11000000 10000000 00000000    ...(............
>      01f00020: 99120000 38ba0000 00000000 00000000    .......8........
>      01f00030: 00000000 00000000 01000000 00000000    ................
>      01f00040: 03000000 1e000000 00000000 656e6970    ............pine
>      01f00050: 722c3436 366b636f 6f720034 68636b63    64,rock64.rockch
>      01f00060: 722c7069 3233336b 00000038 03000000    ip,rk3328.......
>      (...)
>      => fdt addr ${fdt_addr_r}
>      libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>      =>
>
> Note the magic number at the start, which should be "edfe0dd0".

Note, that EFI application is loaded successfully at the same time.
What is the difference? In filesize?

>
> When the Rockchip TPL is used the same DTB file loads without issue, and
> the magic number is correct.
>
> My current theory (following Mark Kettenis' email) is that all this is
> due to U-Boot's not configuring the RK805 PMIC on the ROCK64. The device
> tree suggests it's used to regulate power to the DRAM and is expected to
> be set up at pre-boot:
>
>      vcc_ddr: DCDC_REG3 {
>          regulator-name = "vcc_ddr";
>          regulator-always-on;
>          regulator-boot-on;
>          regulator-state-mem {
>              regulator-on-in-suspend;
>          };
>      };
>
> However I see only yesterday Elaine Zhang posted patches that enable
> support in U-Boot for the RK805, which makes me think this isn't taking
> place currently. And while NetBSD includes its own RK805 driver it is
> likely assuming this setup has already happened ("regulator-boot-on") by
> the time the kernel starts and does not need to be done again.
>
> Does this sound reasonable?
>
> I'm going to apply Elaine's patches and see if that changes things.
>
> --
> Simon South
> simon at simonsouth.net



-- 
With best regards,
Matwey V. Kornilov


More information about the U-Boot mailing list