* [U-Boot] ROCK64 fails to boot using U-Boot TPL
@ 2019-09-19 8:56 Simon South
2019-09-19 15:48 ` Matwey V. Kornilov
` (5 more replies)
0 siblings, 6 replies; 28+ messages in thread
From: Simon South @ 2019-09-19 8:56 UTC (permalink / raw)
To: u-boot
I've been unable so far to boot NetBSD on my PINE64 ROCK64 (v2.0,
Rockchip RK3328) using U-Boot built with its own TPL, the default since
commit ff3dd0a474.
The same NetBSD image boots fine using the binary TPL supplied by Rockchip.
The exact failure varies but it always seems memory-related. Typically
the NetBSD kernel fails right after starting with a panic in its
virtual-memory system, uvm.
Also significant may be these messages sometimes output by U-Boot at
startup, which I haven't seen when the Rockchip TPL is used:
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
I've pasted the output from a typical failed boot below and have
submitted a problem report (with a bit more detail) to the NetBSD project:
https://gnats.netbsd.org/54557
Does anyone know why this might be happening? Is there perhaps some
additional setup the U-Boot TPL expects from the OS to finish
configuring the RK3328's memory controller that's currently missing from
NetBSD?
How I can diagnose this further?
----------
U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29)
LPDDR3
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:12:31 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default
environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address -
da:e0:78:b1:50:d2
eth0: ethernet at ff540000
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
53513 bytes read in 9 ms (5.7 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
205136 bytes read in 16 ms (12.2 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
-
>> NetBSD/evbarm EFI Boot (aarch64), Revision 1.11 (Wed Sep 18 15:50:45
UTC 2019) (from NetBSD 9.99.12)
Press return to boot now, any other key for boot prompt
booting netbsd - starting in 0 seconds.
6100056+2730512+1985652+1823764+490622=0xec5b00
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005,
[ 1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015, 2016, 2017,
[ 1.0000000] 2018, 2019 The NetBSD Foundation, Inc. All rights
reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All
rights reserved.
[ 1.0000000] NetBSD 9.99.12 (GENERIC64) #16: Wed Sep 18 12:30:03 EDT 2019
[ 1.0000000] ssouth at laptop:/usr/src/sys/arch/evbarm/compile/obj/GENERIC64
[ 1.0000000] total memory = 4064 MB
[ 1.0000000] avail memory = 3918 MB
[ 1.0000000] panic: kernel diagnostic assertion "ucpu ==
VM_FREE_PAGE_TO_CPU(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line
852
[ 1.0000000] cpu0: Begin traceback...
[ 1.0000000] trace fp ffffffc000bec8d0
[ 1.0000000] fp ffffffc000bec8f0 vpanic() at ffffffc0004924c0
netbsd:vpanic+0x198
[ 1.0000000] fp ffffffc000bec950 kern_assert() at ffffffc0005cdf24
netbsd:kern_assert+0x5c
[ 1.0000000] fp ffffffc000bec9e0 uvm_pagealloc_pgfl() at
ffffffc00040f388 netbsd:uvm_pagealloc_pgfl+0x5c8
[ 1.0000000] fp ffffffc000beca40 uvm_pagealloc_strat() at
ffffffc000410034 netbsd:uvm_pagealloc_strat+0x18c
[ 1.0000000] fp ffffffc000becad0 uvm_km_kmem_alloc() at
ffffffc000403b30 netbsd:uvm_km_kmem_alloc+0x60
[ 1.0000000] fp ffffffc000becb40 pool_page_alloc() at ffffffc00048b0c0
netbsd:pool_page_alloc+0x28
[ 1.0000000] fp ffffffc000becb60 pool_grow() at ffffffc00048d294
netbsd:pool_grow+0x35c
[ 1.0000000] fp ffffffc000becbd0 pool_get() at ffffffc00048c5e8
netbsd:pool_get+0xa0
[ 1.0000000] fp ffffffc000becc30 pool_cache_get_slow() at
ffffffc00048e8a4 netbsd:pool_cache_get_slow+0x1dc
[ 1.0000000] fp ffffffc000becc80 pool_cache_get_paddr() at
ffffffc0004901e8 netbsd:pool_cache_get_paddr+0x258
[ 1.0000000] fp ffffffc000becce0 kmem_intr_alloc() at ffffffc0004859f0
netbsd:kmem_intr_alloc+0x60
[ 1.0000000] fp ffffffc000becd10 kmem_intr_zalloc() at
ffffffc000485b20 netbsd:kmem_intr_zalloc+0x10
[ 1.0000000] fp ffffffc000becd30 kmem_zalloc() at ffffffc000485dc4
netbsd:kmem_zalloc+0x84
[ 1.0000000] fp ffffffc000becd50 module_builtin_add() at
ffffffc0004432a0 netbsd:module_builtin_add+0x98
[ 1.0000000] fp ffffffc000becdf0 module_init() at ffffffc0004437f8
netbsd:module_init+0xf0
[ 1.0000000] fp ffffffc000bece50 main() at ffffffc0005d0b08
netbsd:main+0x108
[ 1.0000000] fp 0000000000000000 aarch64_start() at ffffffc00000183c
netbsd:aarch64_start+0x103c
[ 1.0000000] cpu0: End traceback...
Stopped in pid 0.1 (system) at netbsd:cpu_Debugger+0x4: ret
db{0}>
--
Simon South
simon at simonsouth.net
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-19 8:56 [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
@ 2019-09-19 15:48 ` Matwey V. Kornilov
2019-09-20 0:06 ` Simon South
2019-09-19 16:29 ` Jagan Teki
` (4 subsequent siblings)
5 siblings, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-19 15:48 UTC (permalink / raw)
To: u-boot
19.09.2019 11:56, Simon South пишет:
> I've been unable so far to boot NetBSD on my PINE64 ROCK64 (v2.0,
> Rockchip RK3328) using U-Boot built with its own TPL, the default since
> commit ff3dd0a474.
>
> The same NetBSD image boots fine using the binary TPL supplied by Rockchip.
>
> The exact failure varies but it always seems memory-related. Typically
> the NetBSD kernel fails right after starting with a panic in its
> virtual-memory system, uvm.
>
> Also significant may be these messages sometimes output by U-Boot at
> startup, which I haven't seen when the Rockchip TPL is used:
>
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>
> I've pasted the output from a typical failed boot below and have
> submitted a problem report (with a bit more detail) to the NetBSD project:
>
> https://gnats.netbsd.org/54557
>
> Does anyone know why this might be happening? Is there perhaps some
> additional setup the U-Boot TPL expects from the OS to finish
> configuring the RK3328's memory controller that's currently missing from
> NetBSD?
>
> How I can diagnose this further?
Hi,
I have no idea what is going on. But are you sure that you tested the
same u-boot binaries with or without binary TPL? u-boot-tpl.bin and
rk3328_ddr_333MHz_v1.16.bin should be fully interchangeable while
deploying the bootloader.
>
> ----------
>
> U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29)
> LPDDR3
> Trying to boot from BOOTROM
> Returning to boot ROM...
>
> U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29 -0400)
> Trying to boot from MMC2
> Card did not respond to voltage select!
> spl: mmc init failed with error: -95
> Trying to boot from MMC1
> NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
> NOTICE: BL31: Built : 12:10:07, Sep 12 2019
> ERROR: over or zero region, nr=4187432, max=10
> NOTICE: BL31:Rockchip release version: v1.2
>
>
> U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:12:31 -0400)
>
> Model: Pine64 Rock64
> DRAM: 4 GiB
> MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
> Loading Environment from MMC... *** Warning - bad CRC, using default
> environment
>
> In: serial at ff130000
> Out: serial at ff130000
> Err: serial at ff130000
> Model: Pine64 Rock64
> Net:
> Warning: ethernet at ff540000 (eth0) using random MAC address -
> da:e0:78:b1:50:d2
> eth0: ethernet at ff540000
> Hit any key to stop autoboot: 0
> Card did not respond to voltage select!
> switch to partitions #0, OK
> mmc1 is current device
> Scanning mmc 1:1...
> 53513 bytes read in 9 ms (5.7 MiB/s)
> Found EFI removable media binary efi/boot/bootaa64.efi
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> Scanning disk rksdmmc at ff500000.blk...
> Card did not respond to voltage select!
> Scanning disk rksdmmc at ff520000.blk...
> Disk rksdmmc at ff520000.blk not ready
> Found 3 disks
> BootOrder not defined
> EFI boot manager: Cannot load any image
> 205136 bytes read in 16 ms (12.2 MiB/s)
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> -
>
>>> NetBSD/evbarm EFI Boot (aarch64), Revision 1.11 (Wed Sep 18 15:50:45
> UTC 2019) (from NetBSD 9.99.12)
> Press return to boot now, any other key for boot prompt
> booting netbsd - starting in 0 seconds.
> 6100056+2730512+1985652+1823764+490622=0xec5b00
> [ 1.0000000] NetBSD/evbarm (fdt) booting ...
> [ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
> 2003, 2004, 2005,
> [ 1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
> 2015, 2016, 2017,
> [ 1.0000000] 2018, 2019 The NetBSD Foundation, Inc. All rights
> reserved.
> [ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
> [ 1.0000000] The Regents of the University of California. All
> rights reserved.
>
> [ 1.0000000] NetBSD 9.99.12 (GENERIC64) #16: Wed Sep 18 12:30:03 EDT 2019
> [ 1.0000000]
> ssouth at laptop:/usr/src/sys/arch/evbarm/compile/obj/GENERIC64
> [ 1.0000000] total memory = 4064 MB
> [ 1.0000000] avail memory = 3918 MB
> [ 1.0000000] panic: kernel diagnostic assertion "ucpu ==
> VM_FREE_PAGE_TO_CPU(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line
> 852
> [ 1.0000000] cpu0: Begin traceback...
> [ 1.0000000] trace fp ffffffc000bec8d0
> [ 1.0000000] fp ffffffc000bec8f0 vpanic() at ffffffc0004924c0
> netbsd:vpanic+0x198
> [ 1.0000000] fp ffffffc000bec950 kern_assert() at ffffffc0005cdf24
> netbsd:kern_assert+0x5c
> [ 1.0000000] fp ffffffc000bec9e0 uvm_pagealloc_pgfl() at
> ffffffc00040f388 netbsd:uvm_pagealloc_pgfl+0x5c8
> [ 1.0000000] fp ffffffc000beca40 uvm_pagealloc_strat() at
> ffffffc000410034 netbsd:uvm_pagealloc_strat+0x18c
> [ 1.0000000] fp ffffffc000becad0 uvm_km_kmem_alloc() at
> ffffffc000403b30 netbsd:uvm_km_kmem_alloc+0x60
> [ 1.0000000] fp ffffffc000becb40 pool_page_alloc() at ffffffc00048b0c0
> netbsd:pool_page_alloc+0x28
> [ 1.0000000] fp ffffffc000becb60 pool_grow() at ffffffc00048d294
> netbsd:pool_grow+0x35c
> [ 1.0000000] fp ffffffc000becbd0 pool_get() at ffffffc00048c5e8
> netbsd:pool_get+0xa0
> [ 1.0000000] fp ffffffc000becc30 pool_cache_get_slow() at
> ffffffc00048e8a4 netbsd:pool_cache_get_slow+0x1dc
> [ 1.0000000] fp ffffffc000becc80 pool_cache_get_paddr() at
> ffffffc0004901e8 netbsd:pool_cache_get_paddr+0x258
> [ 1.0000000] fp ffffffc000becce0 kmem_intr_alloc() at ffffffc0004859f0
> netbsd:kmem_intr_alloc+0x60
> [ 1.0000000] fp ffffffc000becd10 kmem_intr_zalloc() at
> ffffffc000485b20 netbsd:kmem_intr_zalloc+0x10
> [ 1.0000000] fp ffffffc000becd30 kmem_zalloc() at ffffffc000485dc4
> netbsd:kmem_zalloc+0x84
> [ 1.0000000] fp ffffffc000becd50 module_builtin_add() at
> ffffffc0004432a0 netbsd:module_builtin_add+0x98
> [ 1.0000000] fp ffffffc000becdf0 module_init() at ffffffc0004437f8
> netbsd:module_init+0xf0
> [ 1.0000000] fp ffffffc000bece50 main() at ffffffc0005d0b08
> netbsd:main+0x108
> [ 1.0000000] fp 0000000000000000 aarch64_start() at ffffffc00000183c
> netbsd:aarch64_start+0x103c
> [ 1.0000000] cpu0: End traceback...
> Stopped in pid 0.1 (system) at netbsd:cpu_Debugger+0x4: ret
> db{0}>
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-19 8:56 [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
2019-09-19 15:48 ` Matwey V. Kornilov
@ 2019-09-19 16:29 ` Jagan Teki
2019-09-20 0:10 ` Simon South
2019-09-19 16:49 ` Matwey V. Kornilov
` (3 subsequent siblings)
5 siblings, 1 reply; 28+ messages in thread
From: Jagan Teki @ 2019-09-19 16:29 UTC (permalink / raw)
To: u-boot
On Thu, Sep 19, 2019 at 4:02 PM Simon South <simon@simonsouth.net> wrote:
>
> I've been unable so far to boot NetBSD on my PINE64 ROCK64 (v2.0,
> Rockchip RK3328) using U-Boot built with its own TPL, the default since
> commit ff3dd0a474.
>
> The same NetBSD image boots fine using the binary TPL supplied by Rockchip.
>
> The exact failure varies but it always seems memory-related. Typically
> the NetBSD kernel fails right after starting with a panic in its
> virtual-memory system, uvm.
>
> Also significant may be these messages sometimes output by U-Boot at
> startup, which I haven't seen when the Rockchip TPL is used:
>
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>
> I've pasted the output from a typical failed boot below and have
> submitted a problem report (with a bit more detail) to the NetBSD project:
>
> https://gnats.netbsd.org/54557
>
> Does anyone know why this might be happening? Is there perhaps some
> additional setup the U-Boot TPL expects from the OS to finish
> configuring the RK3328's memory controller that's currently missing from
> NetBSD?
>
> How I can diagnose this further?
>
> ----------
>
> U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29)
> LPDDR3
> Trying to boot from BOOTROM
> Returning to boot ROM...
>
> U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29 -0400)
> Trying to boot from MMC2
> Card did not respond to voltage select!
> spl: mmc init failed with error: -95
> Trying to boot from MMC1
> NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
> NOTICE: BL31: Built : 12:10:07, Sep 12 2019
> ERROR: over or zero region, nr=4187432, max=10
> NOTICE: BL31:Rockchip release version: v1.2
>
>
> U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:12:31 -0400)
>
> Model: Pine64 Rock64
> DRAM: 4 GiB
> MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
> Loading Environment from MMC... *** Warning - bad CRC, using default
> environment
>
> In: serial at ff130000
> Out: serial at ff130000
> Err: serial at ff130000
> Model: Pine64 Rock64
> Net:
> Warning: ethernet at ff540000 (eth0) using random MAC address -
> da:e0:78:b1:50:d2
> eth0: ethernet at ff540000
> Hit any key to stop autoboot: 0
> Card did not respond to voltage select!
> switch to partitions #0, OK
> mmc1 is current device
> Scanning mmc 1:1...
> 53513 bytes read in 9 ms (5.7 MiB/s)
> Found EFI removable media binary efi/boot/bootaa64.efi
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
It seems to be a memory overlap or similar. replace TPL with rkbin
would be worth checking since the DRAM is managed by rkbin instead of
TPL here.
rkbin => SPL => U-Boot proper
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-19 8:56 [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
2019-09-19 15:48 ` Matwey V. Kornilov
2019-09-19 16:29 ` Jagan Teki
@ 2019-09-19 16:49 ` Matwey V. Kornilov
2019-09-20 10:03 ` Mark Kettenis
` (2 subsequent siblings)
5 siblings, 0 replies; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-19 16:49 UTC (permalink / raw)
To: u-boot
19.09.2019 11:56, Simon South пишет:
> I've been unable so far to boot NetBSD on my PINE64 ROCK64 (v2.0,
> Rockchip RK3328) using U-Boot built with its own TPL, the default since
> commit ff3dd0a474.
>
> The same NetBSD image boots fine using the binary TPL supplied by Rockchip.
>
> The exact failure varies but it always seems memory-related. Typically
> the NetBSD kernel fails right after starting with a panic in its
> virtual-memory system, uvm.
>
> Also significant may be these messages sometimes output by U-Boot at
> startup, which I haven't seen when the Rockchip TPL is used:
>
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>
> I've pasted the output from a typical failed boot below and have
> submitted a problem report (with a bit more detail) to the NetBSD project:
>
> https://gnats.netbsd.org/54557
>
> Does anyone know why this might be happening? Is there perhaps some
> additional setup the U-Boot TPL expects from the OS to finish
> configuring the RK3328's memory controller that's currently missing from
> NetBSD?
>
> How I can diagnose this further?
>
> ----------
>
> U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29)
I've just checked this commit: EFI Grub + Linux 5.2 is still booting for me.
> LPDDR3
> Trying to boot from BOOTROM
> Returning to boot ROM...
>
> U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:11:29 -0400)
> Trying to boot from MMC2
> Card did not respond to voltage select!
> spl: mmc init failed with error: -95
> Trying to boot from MMC1
> NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
> NOTICE: BL31: Built : 12:10:07, Sep 12 2019
> ERROR: over or zero region, nr=4187432, max=10
> NOTICE: BL31:Rockchip release version: v1.2
>
>
> U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 19 2019 - 03:12:31 -0400)
>
> Model: Pine64 Rock64
> DRAM: 4 GiB
> MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
> Loading Environment from MMC... *** Warning - bad CRC, using default
> environment
>
> In: serial at ff130000
> Out: serial at ff130000
> Err: serial at ff130000
> Model: Pine64 Rock64
> Net:
> Warning: ethernet at ff540000 (eth0) using random MAC address -
> da:e0:78:b1:50:d2
> eth0: ethernet at ff540000
> Hit any key to stop autoboot: 0
> Card did not respond to voltage select!
> switch to partitions #0, OK
> mmc1 is current device
> Scanning mmc 1:1...
> 53513 bytes read in 9 ms (5.7 MiB/s)
> Found EFI removable media binary efi/boot/bootaa64.efi
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> Scanning disk rksdmmc at ff500000.blk...
> Card did not respond to voltage select!
> Scanning disk rksdmmc at ff520000.blk...
> Disk rksdmmc at ff520000.blk not ready
> Found 3 disks
> BootOrder not defined
> EFI boot manager: Cannot load any image
> 205136 bytes read in 16 ms (12.2 MiB/s)
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> -
>
>>> NetBSD/evbarm EFI Boot (aarch64), Revision 1.11 (Wed Sep 18 15:50:45
> UTC 2019) (from NetBSD 9.99.12)
> Press return to boot now, any other key for boot prompt
> booting netbsd - starting in 0 seconds.
> 6100056+2730512+1985652+1823764+490622=0xec5b00
> [ 1.0000000] NetBSD/evbarm (fdt) booting ...
> [ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
> 2003, 2004, 2005,
> [ 1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
> 2015, 2016, 2017,
> [ 1.0000000] 2018, 2019 The NetBSD Foundation, Inc. All rights
> reserved.
> [ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
> [ 1.0000000] The Regents of the University of California. All
> rights reserved.
>
> [ 1.0000000] NetBSD 9.99.12 (GENERIC64) #16: Wed Sep 18 12:30:03 EDT 2019
> [ 1.0000000]
> ssouth at laptop:/usr/src/sys/arch/evbarm/compile/obj/GENERIC64
> [ 1.0000000] total memory = 4064 MB
> [ 1.0000000] avail memory = 3918 MB
> [ 1.0000000] panic: kernel diagnostic assertion "ucpu ==
> VM_FREE_PAGE_TO_CPU(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line
> 852
> [ 1.0000000] cpu0: Begin traceback...
> [ 1.0000000] trace fp ffffffc000bec8d0
> [ 1.0000000] fp ffffffc000bec8f0 vpanic() at ffffffc0004924c0
> netbsd:vpanic+0x198
> [ 1.0000000] fp ffffffc000bec950 kern_assert() at ffffffc0005cdf24
> netbsd:kern_assert+0x5c
> [ 1.0000000] fp ffffffc000bec9e0 uvm_pagealloc_pgfl() at
> ffffffc00040f388 netbsd:uvm_pagealloc_pgfl+0x5c8
> [ 1.0000000] fp ffffffc000beca40 uvm_pagealloc_strat() at
> ffffffc000410034 netbsd:uvm_pagealloc_strat+0x18c
> [ 1.0000000] fp ffffffc000becad0 uvm_km_kmem_alloc() at
> ffffffc000403b30 netbsd:uvm_km_kmem_alloc+0x60
> [ 1.0000000] fp ffffffc000becb40 pool_page_alloc() at ffffffc00048b0c0
> netbsd:pool_page_alloc+0x28
> [ 1.0000000] fp ffffffc000becb60 pool_grow() at ffffffc00048d294
> netbsd:pool_grow+0x35c
> [ 1.0000000] fp ffffffc000becbd0 pool_get() at ffffffc00048c5e8
> netbsd:pool_get+0xa0
> [ 1.0000000] fp ffffffc000becc30 pool_cache_get_slow() at
> ffffffc00048e8a4 netbsd:pool_cache_get_slow+0x1dc
> [ 1.0000000] fp ffffffc000becc80 pool_cache_get_paddr() at
> ffffffc0004901e8 netbsd:pool_cache_get_paddr+0x258
> [ 1.0000000] fp ffffffc000becce0 kmem_intr_alloc() at ffffffc0004859f0
> netbsd:kmem_intr_alloc+0x60
> [ 1.0000000] fp ffffffc000becd10 kmem_intr_zalloc() at
> ffffffc000485b20 netbsd:kmem_intr_zalloc+0x10
> [ 1.0000000] fp ffffffc000becd30 kmem_zalloc() at ffffffc000485dc4
> netbsd:kmem_zalloc+0x84
> [ 1.0000000] fp ffffffc000becd50 module_builtin_add() at
> ffffffc0004432a0 netbsd:module_builtin_add+0x98
> [ 1.0000000] fp ffffffc000becdf0 module_init() at ffffffc0004437f8
> netbsd:module_init+0xf0
> [ 1.0000000] fp ffffffc000bece50 main() at ffffffc0005d0b08
> netbsd:main+0x108
> [ 1.0000000] fp 0000000000000000 aarch64_start() at ffffffc00000183c
> netbsd:aarch64_start+0x103c
> [ 1.0000000] cpu0: End traceback...
> Stopped in pid 0.1 (system) at netbsd:cpu_Debugger+0x4: ret
> db{0}>
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-19 15:48 ` Matwey V. Kornilov
@ 2019-09-20 0:06 ` Simon South
2019-09-20 7:39 ` Matwey V. Kornilov
0 siblings, 1 reply; 28+ messages in thread
From: Simon South @ 2019-09-20 0:06 UTC (permalink / raw)
To: u-boot
On 2019-09-19 11:48 a.m., Matwey V. Kornilov wrote:
> I have no idea what is going on. But are you sure that you tested the
> same u-boot binaries with or without binary TPL?
I believe so. Here's how I build U-Boot with its own TPL:
make -j2 distclean; rm idbloader.img
make -j2 rock64-rk3328_defconfig all u-boot.itb
With the Rockchip TPL instead, it's:
make -j2 distclean; rm idbloader.img
make -j2 rock64-rk3328_defconfig all u-boot.itb
tools/mkimage -n rk3328 -T rksd -d
~/src/rockchip-linux/rkbin/bin/rk33/rk3328_ddr_333MHz_v1.16.bin
idbloader.img
cat spl/u-boot-spl.bin >> idbloader.img
In either case I install on the microSD card with
sudo dd if=idbloader.img of=/dev/sdb seek=64
sudo dd if=u-boot.itb of=/dev/sdb seek=16384
Does this look right?
--
Simon South
simon at simonsouth.net
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-19 16:29 ` Jagan Teki
@ 2019-09-20 0:10 ` Simon South
0 siblings, 0 replies; 28+ messages in thread
From: Simon South @ 2019-09-20 0:10 UTC (permalink / raw)
To: u-boot
On 2019-09-19 12:29 p.m., Jagan Teki wrote:
> It seems to be a memory overlap or similar. replace TPL with rkbin
> would be worth checking since the DRAM is managed by rkbin instead of
> TPL here.
>
> rkbin => SPL => U-Boot proper
That configuration works and allows NetBSD to boot just fine. It's only
when using U-Boot's own TPL that the kernel panics shortly after starting.
Can you think of what the difference might be between the two TPLs?
--
Simon South
simon at simonsouth.net
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 0:06 ` Simon South
@ 2019-09-20 7:39 ` Matwey V. Kornilov
2019-09-20 9:28 ` Simon South
0 siblings, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-20 7:39 UTC (permalink / raw)
To: u-boot
20.09.2019 3:06, Simon South пишет:
> On 2019-09-19 11:48 a.m., Matwey V. Kornilov wrote:
>> I have no idea what is going on. But are you sure that you tested the
>> same u-boot binaries with or without binary TPL?
> I believe so. Here's how I build U-Boot with its own TPL:
>
> make -j2 distclean; rm idbloader.img
> make -j2 rock64-rk3328_defconfig all u-boot.itb
>
> With the Rockchip TPL instead, it's:
>
> make -j2 distclean; rm idbloader.img
> make -j2 rock64-rk3328_defconfig all u-boot.itb
> tools/mkimage -n rk3328 -T rksd -d
> ~/src/rockchip-linux/rkbin/bin/rk33/rk3328_ddr_333MHz_v1.16.bin
> idbloader.img
> cat spl/u-boot-spl.bin >> idbloader.img
>
> In either case I install on the microSD card with
>
> sudo dd if=idbloader.img of=/dev/sdb seek=64
> sudo dd if=u-boot.itb of=/dev/sdb seek=16384
>
> Does this look right?
>
Yes. I think so.
Could you please provide us console logs for both successful and
unsuccessful cases? Maybe one could see some meaning difference.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 7:39 ` Matwey V. Kornilov
@ 2019-09-20 9:28 ` Simon South
2019-09-20 10:07 ` Matwey V. Kornilov
0 siblings, 1 reply; 28+ messages in thread
From: Simon South @ 2019-09-20 9:28 UTC (permalink / raw)
To: u-boot
On 2019-09-20 3:39 a.m., Matwey V. Kornilov wrote:
> Could you please provide us console logs for both successful and
> unsuccessful cases?
Attached.
The only differences I see are
- The random Ethernet address assigned in each case, and
- The "FDT_ERR_BADMAGIC" error messages that are output only when the
U-Boot TPL is used.
--
Simon South
simon at simonsouth.net
-------------- next part --------------
DDR version 1.16 20190528
ID:0x805 Y
In
LPDDR3
333MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:55:01 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:56:02 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address - 36:69:6f:cb:26:ed
eth0: ethernet at ff540000
Hit any key to stop autoboot: 2 \b\b\b 1 \b\b\b 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
53513 bytes read in 10 ms (5.1 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
205136 bytes read in 17 ms (11.5 MiB/s)
|\b/\b-\b\\b|\b/\b-\b
>> NetBSD/evbarm EFI Boot (aarch64), Revision 1.11 (Wed Sep 18 15:50:45 UTC 2019) (from NetBSD 9.99.12)
Press return to boot now, any other key for boot prompt
booting netbsd - starting in 5 seconds. \b\b\b\b\b\b\b\b\b\b\b4 seconds. \b\b\b\b\b\b\b\b\b\b\b3 seconds. \b\b\b\b\b\b\b\b\b\b\b2 seconds. \b\b\b\b\b\b\b\b\b\b\b1 seconds. \b\b\b\b\b\b\b\b\b\b\b0 seconds.
\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b6100056|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b+2730512|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b+1985652-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b+1823764-\b\\b [701640|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b+490622\\b|\b/\b-\b\\b|\b/\b]=0xec5b00
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[ 1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[ 1.0000000] 2018, 2019 The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights reserved.
[ 1.0000000] NetBSD 9.99.12 (GENERIC64) #16: Wed Sep 18 12:30:03 EDT 2019
[ 1.0000000] ssouth at laptop:/usr/src/sys/arch/evbarm/compile/obj/GENERIC64
[ 1.0000000] total memory = 4064 MB
[ 1.0000000] avail memory = 3918 MB
[ 1.0000000] armfdt0 (root)
[ 1.0000000] simplebus0 at armfdt0: Pine64 Rock64
[ 1.0000000] cpus0 at simplebus0
[ 1.0000000] simplebus1 at simplebus0
[ 1.0000000] simplebus2 at simplebus0
[ 1.0000000] cpu0 at cpus0: Cortex-A53 r0p4 (Cortex V8-A core)
[ 1.0000000] cpu0: package 0, core 0, smt 0
[ 1.0000000] cpu0: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[ 1.0000000] cpu0: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[ 1.0000000] cpu0: Dcache line 64, Icache line 64
...
-------------- next part --------------
U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:55:01)
LPDDR3
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:55:01 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:56:02 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address - 02:f5:da:18:50:8d
eth0: ethernet at ff540000
Hit any key to stop autoboot: 2 \b\b\b 1 \b\b\b 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
53513 bytes read in 10 ms (5.1 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
205136 bytes read in 17 ms (11.5 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
|\b/\b-\b\\b|\b/\b-\b
>> NetBSD/evbarm EFI Boot (aarch64), Revision 1.11 (Wed Sep 18 15:50:45 UTC 2019) (from NetBSD 9.99.12)
Press return to boot now, any other key for boot prompt
booting netbsd - starting in 5 seconds. \b\b\b\b\b\b\b\b\b\b\b4 seconds. \b\b\b\b\b\b\b\b\b\b\b3 seconds. \b\b\b\b\b\b\b\b\b\b\b2 seconds. \b\b\b\b\b\b\b\b\b\b\b1 seconds. \b\b\b\b\b\b\b\b\b\b\b0 seconds.
\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b6100056|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b+2730512|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b+1985652-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b+1823764-\b\\b [701640|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b+490622\\b|\b/\b-\b\\b|\b/\b]=0xec5b00
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] panic: kernel diagnostic assertion "ucpu == VM_FREE_PAGE_TO_CPU(pg)" failed: file "/usr/src/sys/uvm/uvm_page.c", line 852
[ 1.0000000] cpu0: Begin traceback...
[ 1.0000000] trace fp ffffffc000bec850
[ 1.0000000] fp ffffffc000bec870 ?() at ffffffc0004924c0
[ 1.0000000] fp ffffffc000bec8d0 ?() at ffffffc0005cdf24
[ 1.0000000] fp ffffffc000bec960 ?() at ffffffc00040f388
[ 1.0000000] fp ffffffc000bec9c0 ?() at ffffffc000410034
[ 1.0000000] fp ffffffc000beca50 ?() at ffffffc000403b30
[ 1.0000000] fp ffffffc000becad0 ?() at ffffffc000499928
[ 1.0000000] fp ffffffc000becbb0 ?() at ffffffc000499e1c
[ 1.0000000] fp ffffffc000becc10 ?() at ffffffc00048ad88
[ 1.0000000] fp ffffffc000becc30 ?() at ffffffc00048d294
[ 1.0000000] fp ffffffc000becca0 ?() at ffffffc00048c5e8
[ 1.0000000] fp ffffffc000becd20 ?() at ffffffc00048f530
[ 1.0000000] fp ffffffc000becd90 ?() at ffffffc000485924
[ 1.0000000] fp ffffffc000bece00 ?() at ffffffc000485ef0
[ 1.0000000] fp ffffffc000bece30 ?() at ffffffc0004029c4
[ 1.0000000] fp ffffffc000bece50 ?() at ffffffc0005d0ac0
[ 1.0000000] fp 0000000000000000 ?() at ffffffc00000183c
[ 1.0000000] cpu0: End traceback...
Stopped in pid 0.1 (system) at ffffffc0000751c0: ret
db{0}>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-19 8:56 [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
` (2 preceding siblings ...)
2019-09-19 16:49 ` Matwey V. Kornilov
@ 2019-09-20 10:03 ` Mark Kettenis
2019-09-20 10:22 ` Simon South
2019-09-21 14:26 ` [U-Boot] u-boot 2017 doesn't recognized pATA microdrive Carlo Pisani
2019-09-23 12:37 ` [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
5 siblings, 1 reply; 28+ messages in thread
From: Mark Kettenis @ 2019-09-20 10:03 UTC (permalink / raw)
To: u-boot
> From: Simon South <simon@simonsouth.net>
> Date: Thu, 19 Sep 2019 04:56:57 -0400
>
> I've been unable so far to boot NetBSD on my PINE64 ROCK64 (v2.0,
> Rockchip RK3328) using U-Boot built with its own TPL, the default since
> commit ff3dd0a474.
>
> The same NetBSD image boots fine using the binary TPL supplied by Rockchip.
>
> The exact failure varies but it always seems memory-related. Typically
> the NetBSD kernel fails right after starting with a panic in its
> virtual-memory system, uvm.
>
> Also significant may be these messages sometimes output by U-Boot at
> startup, which I haven't seen when the Rockchip TPL is used:
>
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
>
> I've pasted the output from a typical failed boot below and have
> submitted a problem report (with a bit more detail) to the NetBSD project:
>
> https://gnats.netbsd.org/54557
>
> Does anyone know why this might be happening? Is there perhaps some
> additional setup the U-Boot TPL expects from the OS to finish
> configuring the RK3328's memory controller that's currently missing from
> NetBSD?
Hi Simon,
One thing to look at is whether (voltage) regulators and/or clocks are
set up right. I've seen the OpenBSD kernel crash because one of the
voltages supplied to the SoC was too low. I beieve that was on the
rockpro64. The regulator in question was a "boot-on" regulator so the
OpenBSD kernel assumed the regulator was already properly configured.
But I believe the Linux kernel doesn't trust the bootloader and will
configure such a regulator anyway.
In my rockpro64 case the regulator was skipped because of some
DM-conversion fall-out. Using the U=boot "dm" commands you can check
whether drivers for various regulators are enabled. If a "boot-on"
regulator doesn't have a "*" next to it, that is a clear indication of
a problem. Worth looking at "always-on" regulators as well.
Cheers,
Mark
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 9:28 ` Simon South
@ 2019-09-20 10:07 ` Matwey V. Kornilov
2019-09-20 10:14 ` Martin Husemann
0 siblings, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-20 10:07 UTC (permalink / raw)
To: u-boot
пт, 20 сент. 2019 г. в 12:30, Simon South <simon@simonsouth.net>:
>
> On 2019-09-20 3:39 a.m., Matwey V. Kornilov wrote:
> > Could you please provide us console logs for both successful and
> > unsuccessful cases?
>
> Attached.
>
> The only differences I see are
>
> - The random Ethernet address assigned in each case, and
> - The "FDT_ERR_BADMAGIC" error messages that are output only when the
> U-Boot TPL is used.
Missed correct FDT file may cause booting errors like your. At least
in Linux kernel world. I am not an NetBSD expert.
The question is that FDT is not directly related to TPL in any way.
Do you have an idea where is correct FDT supposed to came from in
NetBSD case? For Linux, the file is placed on the boot partition and
retrieved by u-boot while looking for EFI application, etc.
Another backup FDT is bundled with the u-boot image itself, however it
never worked for me for booting Linux.
>
> --
> Simon South
> simon at simonsouth.net
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 10:07 ` Matwey V. Kornilov
@ 2019-09-20 10:14 ` Martin Husemann
2019-09-20 16:43 ` Matwey V. Kornilov
0 siblings, 1 reply; 28+ messages in thread
From: Martin Husemann @ 2019-09-20 10:14 UTC (permalink / raw)
To: u-boot
On Fri, Sep 20, 2019 at 01:07:12PM +0300, Matwey V. Kornilov wrote:
> Do you have an idea where is correct FDT supposed to came from in
> NetBSD case? For Linux, the file is placed on the boot partition and
> retrieved by u-boot while looking for EFI application, etc.
Same for NetBSD. Assuming that other parts have not been changed, Simon's
experiments should have used the same .dtb for all tests.
Martin
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 10:03 ` Mark Kettenis
@ 2019-09-20 10:22 ` Simon South
0 siblings, 0 replies; 28+ messages in thread
From: Simon South @ 2019-09-20 10:22 UTC (permalink / raw)
To: u-boot
On 2019-09-20 6:03 a.m., Mark Kettenis wrote:
> One thing to look at is whether (voltage) regulators and/or clocks are
> set up right...
Thanks, Mark. This is helpful.
> But I believe the Linux kernel doesn't trust the bootloader and will
> configure such a regulator anyway.
This is my assumption right now as well, that Linux is itself
configuring the RK3328 "correctly" and either the U-Boot TPL or the
NetBSD kernel needs to be updated to do the same thing.
I'm going to grab the Linux source and see if I can spot anything it
does at startup that's missing from the TPL.
> Using the U=boot "dm" commands you can check
> whether drivers for various regulators are enabled.
I tried capturing the output of these commands when each TPL is used and
comparing them. Unfortunately nothing jumps out: After booting with
U-Boot's TPL "dm tree" shows additional entries for the S/PDIF and MMC
controllers, and when booting with Rockchip's TPL a (possibly spurious)
"Initializing UCLASS_EFI" message is output, but otherwise they're the same.
I've attached the two capture logs in case anyone is curious.
--
Simon South
simon at simonsouth.net
-------------- next part --------------
dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
firmware 0 [ ] psci |-- psci
clk 0 [ + ] fixed_rate_clock |-- xin24m
syscon 0 [ + ] rk3328_syscon |-- syscon at ff100000
serial 0 [ + ] ns16550_serial |-- serial at ff130000
syscon 1 [ ] syscon |-- power-management at ff140000
i2c 0 [ ] i2c_rockchip |-- i2c at ff160000
simple_bus 0 [ ] generic_simple_bus |-- amba
clk 1 [ + ] rockchip_rk3328_cru |-- clock-controller at ff440000
sysreset 0 [ ] rockchip_sysreset | `-- sysreset
mmc 0 [ + ] rockchip_rk3288_dw_m |-- rksdmmc at ff500000
blk 0 [ + ] mmc_blk | `-- rksdmmc at ff500000.blk
mmc 1 [ + ] rockchip_rk3288_dw_m |-- rksdmmc at ff520000
blk 1 [ ] mmc_blk | `-- rksdmmc at ff520000.blk
eth 0 [ + ] gmac_rockchip |-- ethernet at ff540000
usb 0 [ ] ehci_generic |-- usb at ff5c0000
usb 1 [ ] ohci_generic |-- usb at ff5d0000
usb 2 [ ] dwc2_usb |-- usb at ff580000
pinctrl 0 [ + ] rockchip_rk3328_pinc |-- pinctrl
gpio 0 [ + ] gpio_rockchip | |-- gpio0 at ff210000
gpio 1 [ + ] gpio_rockchip | |-- gpio1 at ff220000
gpio 2 [ ] gpio_rockchip | |-- gpio2 at ff230000
gpio 3 [ ] gpio_rockchip | |-- gpio3 at ff240000
pinconfig 0 [ ] pinconfig | |-- pcfg-pull-up
pinconfig 1 [ ] pinconfig | |-- pcfg-pull-down
pinconfig 2 [ ] pinconfig | |-- pcfg-pull-none
pinconfig 3 [ ] pinconfig | |-- pcfg-pull-none-2ma
pinconfig 4 [ ] pinconfig | |-- pcfg-pull-up-2ma
pinconfig 5 [ ] pinconfig | |-- pcfg-pull-up-4ma
pinconfig 6 [ ] pinconfig | |-- pcfg-pull-none-4ma
pinconfig 7 [ ] pinconfig | |-- pcfg-pull-down-4ma
pinconfig 8 [ ] pinconfig | |-- pcfg-pull-none-8ma
pinconfig 9 [ ] pinconfig | |-- pcfg-pull-up-8ma
pinconfig 10 [ ] pinconfig | |-- pcfg-pull-none-12ma
pinconfig 11 [ ] pinconfig | |-- pcfg-pull-up-12ma
pinconfig 12 [ ] pinconfig | |-- pcfg-output-high
pinconfig 13 [ ] pinconfig | |-- pcfg-output-low
pinconfig 14 [ ] pinconfig | |-- pcfg-input-high
pinconfig 15 [ ] pinconfig | |-- pcfg-input
pinconfig 16 [ ] pinconfig | |-- i2c0
pinconfig 17 [ ] pinconfig | | `-- i2c0-xfer
pinconfig 18 [ ] pinconfig | |-- i2c1
pinconfig 19 [ ] pinconfig | | `-- i2c1-xfer
pinconfig 20 [ ] pinconfig | |-- i2c2
pinconfig 21 [ ] pinconfig | | `-- i2c2-xfer
pinconfig 22 [ ] pinconfig | |-- i2c3
pinconfig 23 [ ] pinconfig | | |-- i2c3-xfer
pinconfig 24 [ ] pinconfig | | `-- i2c3-gpio
pinconfig 25 [ ] pinconfig | |-- hdmi_i2c
pinconfig 26 [ ] pinconfig | | `-- hdmii2c-xfer
pinconfig 27 [ ] pinconfig | |-- uart0
pinconfig 28 [ ] pinconfig | | |-- uart0-xfer
pinconfig 29 [ ] pinconfig | | |-- uart0-cts
pinconfig 30 [ ] pinconfig | | |-- uart0-rts
pinconfig 31 [ ] pinconfig | | `-- uart0-rts-gpio
pinconfig 32 [ ] pinconfig | |-- uart1
pinconfig 33 [ ] pinconfig | | |-- uart1-xfer
pinconfig 34 [ ] pinconfig | | |-- uart1-cts
pinconfig 35 [ ] pinconfig | | |-- uart1-rts
pinconfig 36 [ ] pinconfig | | `-- uart1-rts-gpio
pinconfig 37 [ ] pinconfig | |-- uart2-0
pinconfig 38 [ ] pinconfig | | `-- uart2m0-xfer
pinconfig 39 [ + ] pinconfig | |-- uart2-1
pinconfig 40 [ + ] pinconfig | | `-- uart2m1-xfer
pinconfig 41 [ ] pinconfig | |-- spi0-0
pinconfig 42 [ ] pinconfig | | |-- spi0m0-clk
pinconfig 43 [ ] pinconfig | | |-- spi0m0-cs0
pinconfig 44 [ ] pinconfig | | |-- spi0m0-tx
pinconfig 45 [ ] pinconfig | | |-- spi0m0-rx
pinconfig 46 [ ] pinconfig | | `-- spi0m0-cs1
pinconfig 47 [ ] pinconfig | |-- spi0-1
pinconfig 48 [ ] pinconfig | | |-- spi0m1-clk
pinconfig 49 [ ] pinconfig | | |-- spi0m1-cs0
pinconfig 50 [ ] pinconfig | | |-- spi0m1-tx
pinconfig 51 [ ] pinconfig | | |-- spi0m1-rx
pinconfig 52 [ ] pinconfig | | `-- spi0m1-cs1
pinconfig 53 [ ] pinconfig | |-- spi0-2
pinconfig 54 [ ] pinconfig | | |-- spi0m2-clk
pinconfig 55 [ ] pinconfig | | |-- spi0m2-cs0
pinconfig 56 [ ] pinconfig | | |-- spi0m2-tx
pinconfig 57 [ ] pinconfig | | `-- spi0m2-rx
pinconfig 58 [ ] pinconfig | |-- i2s1
pinconfig 59 [ ] pinconfig | | |-- i2s1-mclk
pinconfig 60 [ ] pinconfig | | |-- i2s1-sclk
pinconfig 61 [ ] pinconfig | | |-- i2s1-lrckrx
pinconfig 62 [ ] pinconfig | | |-- i2s1-lrcktx
pinconfig 63 [ ] pinconfig | | |-- i2s1-sdi
pinconfig 64 [ ] pinconfig | | |-- i2s1-sdo
pinconfig 65 [ ] pinconfig | | |-- i2s1-sdio1
pinconfig 66 [ ] pinconfig | | |-- i2s1-sdio2
pinconfig 67 [ ] pinconfig | | |-- i2s1-sdio3
pinconfig 68 [ ] pinconfig | | `-- i2s1-sleep
pinconfig 69 [ ] pinconfig | |-- i2s2-0
pinconfig 70 [ ] pinconfig | | |-- i2s2m0-mclk
pinconfig 71 [ ] pinconfig | | |-- i2s2m0-sclk
pinconfig 72 [ ] pinconfig | | |-- i2s2m0-lrckrx
pinconfig 73 [ ] pinconfig | | |-- i2s2m0-lrcktx
pinconfig 74 [ ] pinconfig | | |-- i2s2m0-sdi
pinconfig 75 [ ] pinconfig | | |-- i2s2m0-sdo
pinconfig 76 [ ] pinconfig | | `-- i2s2m0-sleep
pinconfig 77 [ ] pinconfig | |-- i2s2-1
pinconfig 78 [ ] pinconfig | | |-- i2s2m1-mclk
pinconfig 129 [ + ] pinconfig | | `-- emmc-bus8
pinconfig 130 [ ] pinconfig | |-- pwm0
pinconfig 131 [ ] pinconfig | | `-- pwm0-pin
pinconfig 132 [ ] pinconfig | |-- pwm1
pinconfig 133 [ ] pinconfig | | `-- pwm1-pin
pinconfig 134 [ ] pinconfig | |-- pwm2
pinconfig 135 [ ] pinconfig | | `-- pwm2-pin
pinconfig 136 [ ] pinconfig | |-- pwmir
pinconfig 137 [ ] pinconfig | | `-- pwmir-pin
pinconfig 138 [ ] pinconfig | |-- gmac-0
pinconfig 139 [ ] pinconfig | | |-- rgmiim0-pins
pinconfig 140 [ ] pinconfig | | `-- rmiim0-pins
pinconfig 141 [ + ] pinconfig | |-- gmac-1
pinconfig 142 [ + ] pinconfig | | |-- rgmiim1-pins
pinconfig 143 [ ] pinconfig | | `-- rmiim1-pins
pinconfig 144 [ ] pinconfig | |-- gmac2phy
pinconfig 145 [ ] pinconfig | | |-- fephyled-speed100
pinconfig 146 [ ] pinconfig | | |-- fephyled-speed10
pinconfig 147 [ ] pinconfig | | |-- fephyled-duplex
pinconfig 148 [ ] pinconfig | | |-- fephyled-rxm0
pinconfig 149 [ ] pinconfig | | |-- fephyled-txm0
pinconfig 150 [ ] pinconfig | | |-- fephyled-linkm0
pinconfig 151 [ ] pinconfig | | |-- fephyled-rxm1
pinconfig 152 [ ] pinconfig | | |-- fephyled-txm1
pinconfig 153 [ ] pinconfig | | `-- fephyled-linkm1
pinconfig 154 [ ] pinconfig | |-- tsadc_pin
pinconfig 155 [ ] pinconfig | | |-- tsadc-int
pinconfig 156 [ ] pinconfig | | `-- tsadc-gpio
pinconfig 157 [ ] pinconfig | |-- hdmi_pin
pinconfig 158 [ ] pinconfig | | |-- hdmi-cec
pinconfig 159 [ ] pinconfig | | `-- hdmi-hpd
pinconfig 160 [ ] pinconfig | |-- cif-0
pinconfig 161 [ ] pinconfig | | `-- dvp-d2d9-m0
pinconfig 162 [ ] pinconfig | |-- cif-1
pinconfig 163 [ ] pinconfig | | `-- dvp-d2d9-m1
pinconfig 164 [ ] pinconfig | |-- pmic
pinconfig 165 [ ] pinconfig | | `-- pmic-int-l
pinconfig 166 [ + ] pinconfig | `-- usb2
pinconfig 167 [ + ] pinconfig | `-- usb20-host-drv
clk 2 [ + ] fixed_rate_clock |-- external-gmac-clock
regulator 0 [ + ] fixed regulator |-- sdmmc-regulator
regulator 1 [ + ] fixed regulator |-- vcc-host-5v-regulator
regulator 2 [ + ] fixed regulator |-- vcc-sys
ram 0 [ ] rockchip_rk3328_dmc |-- dmc
usb 3 [ ] xhci_rockchip `-- usb at ff600000
=> dm c\b \buclass
uclass 0: root
0 * root_driver @ fcf36050, seq 0, (req -1)
uclass 13: adc
uclass 17: blk
0 * rksdmmc at ff500000.blk @ fcf36c60, seq 0, (req -1)
1 rksdmmc at ff520000.blk @ fcf36fc0
uclass 21: clk
0 * xin24m @ fcf36230, seq 1, (req -1)
1 * clock-controller at ff440000 @ fcf36800, seq 0, (req -1)
2 * external-gmac-clock @ fcf3ec80, seq 2, (req -1)
EFI: Initializing UCLASS_EFI
uclass 26: efi
uclass 27: eth
0 * ethernet at ff540000 @ fcf37160, seq 0, (req -1)
uclass 28: firmware
0 psci @ fcf36140
uclass 30: gpio
0 * gpio0 at ff210000 @ fcf37600, seq 0, (req -1)
1 * gpio1 at ff220000 @ fcf376b0, seq 1, (req -1)
2 gpio2 at ff230000 @ fcf37760
3 gpio3 at ff240000 @ fcf37810
uclass 32: i2c
0 i2c at ff160000 @ fcf36640, seq -1, (req 1)
uclass 34: i2c_generic
uclass 43: usb_mass_storage
uclass 47: mmc
0 * rksdmmc at ff500000 @ fcf36a00, seq 1, (req 1)
1 * rksdmmc at ff520000 @ fcf36da0, seq 0, (req 0)
uclass 50: nop
uclass 59: phy
uclass 60: pinconfig
0 pcfg-pull-up @ fcf37900
1 pcfg-pull-down @ fcf379b0
2 pcfg-pull-none @ fcf37a60
3 pcfg-pull-none-2ma @ fcf37b10
4 pcfg-pull-up-2ma @ fcf37bc0
5 pcfg-pull-up-4ma @ fcf37c70
6 pcfg-pull-none-4ma @ fcf37d20
7 pcfg-pull-down-4ma @ fcf37dd0
8 pcfg-pull-none-8ma @ fcf37e80
9 pcfg-pull-up-8ma @ fcf37f30
10 pcfg-pull-none-12ma @ fcf37fe0
11 pcfg-pull-up-12ma @ fcf38090
12 pcfg-output-high @ fcf38140
13 pcfg-output-low @ fcf381f0
14 pcfg-input-high @ fcf382a0
15 pcfg-input @ fcf38350
16 i2c0 @ fcf38400
17 i2c0-xfer @ fcf384b0
18 i2c1 @ fcf38560
19 i2c1-xfer @ fcf38610
20 i2c2 @ fcf386c0
21 i2c2-xfer @ fcf38770
22 i2c3 @ fcf38820
23 i2c3-xfer @ fcf388d0
24 i2c3-gpio @ fcf38980
25 hdmi_i2c @ fcf38a30
26 hdmii2c-xfer @ fcf38ae0
27 uart0 @ fcf38b90
28 uart0-xfer @ fcf38c40
29 uart0-cts @ fcf38cf0
30 uart0-rts @ fcf38da0
31 uart0-rts-gpio @ fcf38e50
32 uart1 @ fcf38f00
33 uart1-xfer @ fcf38fb0
34 uart1-cts @ fcf39060
35 uart1-rts @ fcf39110
36 uart1-rts-gpio @ fcf391c0
37 uart2-0 @ fcf39270
38 uart2m0-xfer @ fcf39320
39 * uart2-1 @ fcf393d0, seq 4, (req -1)
40 * uart2m1-xfer @ fcf39480, seq 5, (req -1)
41 spi0-0 @ fcf39530
42 spi0m0-clk @ fcf395e0
43 spi0m0-cs0 @ fcf39690
44 spi0m0-tx @ fcf39740
45 spi0m0-rx @ fcf397f0
46 spi0m0-cs1 @ fcf398a0
47 spi0-1 @ fcf39950
48 spi0m1-clk @ fcf39a00
49 spi0m1-cs0 @ fcf39ab0
50 spi0m1-tx @ fcf39b60
51 spi0m1-rx @ fcf39c10
52 spi0m1-cs1 @ fcf39cc0
53 spi0-2 @ fcf39d70
54 spi0m2-clk @ fcf39e20
55 spi0m2-cs0 @ fcf39ed0
56 spi0m2-tx @ fcf39f80
57 spi0m2-rx @ fcf3a030
58 i2s1 @ fcf3a0e0
59 i2s1-mclk @ fcf3a190
60 i2s1-sclk @ fcf3a240
61 i2s1-lrckrx @ fcf3a2f0
62 i2s1-lrcktx @ fcf3a3a0
63 i2s1-sdi @ fcf3a450
64 i2s1-sdo @ fcf3a500
65 i2s1-sdio1 @ fcf3a5b0
66 i2s1-sdio2 @ fcf3a660
67 i2s1-sdio3 @ fcf3a710
68 i2s1-sleep @ fcf3a7c0
69 i2s2-0 @ fcf3a870
70 i2s2m0-mclk @ fcf3a920
71 i2s2m0-sclk @ fcf3a9d0
72 i2s2m0-lrckrx @ fcf3aa80
73 i2s2m0-lrcktx @ fcf3ab30
74 i2s2m0-sdi @ fcf3abe0
75 i2s2m0-sdo @ fcf3ac90
76 i2s2m0-sleep @ fcf3ad40
77 i2s2-1 @ fcf3adf0
78 i2s2m1-mclk @ fcf3aea0
79 i2s2m1-sclk @ fcf3af50
80 i2sm1-lrckrx @ fcf3b000
81 i2s2m1-lrcktx @ fcf3b0b0
82 i2s2m1-sdi @ fcf3b160
83 i2s2m1-sdo @ fcf3b210
84 i2s2m1-sleep @ fcf3b2c0
85 spdif-0 @ fcf3b370
86 spdifm0-tx @ fcf3b420
87 spdif-1 @ fcf3b4d0
88 spdifm1-tx @ fcf3b580
89 spdif-2 @ fcf3b630
90 spdifm2-tx @ fcf3b6e0
91 sdmmc0-0 @ fcf3b790
92 sdmmc0m0-pwren @ fcf3b840
93 sdmmc0m0-gpio @ fcf3b8f0
94 * sdmmc0-1 @ fcf3b9a0, seq 0, (req -1)
95 sdmmc0m1-pwren @ fcf3ba50
96 * sdmmc0m1-gpio @ fcf3bb00, seq 1, (req -1)
97 * sdmmc0 @ fcf3bbb0, seq 10, (req -1)
98 * sdmmc0-clk @ fcf3bc60, seq 11, (req -1)
99 * sdmmc0-cmd @ fcf3bd10, seq 12, (req -1)
100 * sdmmc0-dectn @ fcf3bdc0, seq 13, (req -1)
101 sdmmc0-wrprt @ fcf3be70
102 sdmmc0-bus1 @ fcf3bf20
103 * sdmmc0-bus4 @ fcf3bfd0, seq 14, (req -1)
104 sdmmc0-gpio @ fcf3c080
105 sdmmc0ext @ fcf3c130
106 sdmmc0ext-clk @ fcf3c1e0
107 sdmmc0ext-cmd @ fcf3c290
108 sdmmc0ext-wrprt @ fcf3c340
109 sdmmc0ext-dectn @ fcf3c3f0
110 sdmmc0ext-bus1 @ fcf3c4a0
111 sdmmc0ext-bus4 @ fcf3c550
112 sdmmc0ext-gpio @ fcf3c600
113 sdmmc1 @ fcf3c6b0
114 sdmmc1-clk @ fcf3c760
115 sdmmc1-cmd @ fcf3c810
116 sdmmc1-pwren @ fcf3c8c0
117 sdmmc1-wrprt @ fcf3c970
118 sdmmc1-dectn @ fcf3ca20
119 sdmmc1-bus1 @ fcf3cad0
120 sdmmc1-bus4 @ fcf3cb80
121 sdmmc1-gpio @ fcf3cc30
122 * emmc @ fcf3cce0, seq 6, (req -1)
123 * emmc-clk @ fcf3cd90, seq 7, (req -1)
124 * emmc-cmd @ fcf3ce40, seq 8, (req -1)
125 emmc-pwren @ fcf3cef0
126 emmc-rstnout @ fcf3cfa0
127 emmc-bus1 @ fcf3d050
128 emmc-bus4 @ fcf3d100
129 * emmc-bus8 @ fcf3d1b0, seq 9, (req -1)
130 pwm0 @ fcf3d260
131 pwm0-pin @ fcf3d310
132 pwm1 @ fcf3d3c0
133 pwm1-pin @ fcf3d470
134 pwm2 @ fcf3d520
135 pwm2-pin @ fcf3d5d0
136 pwmir @ fcf3d680
137 pwmir-pin @ fcf3d730
138 gmac-0 @ fcf3d7e0
139 rgmiim0-pins @ fcf3d890
140 rmiim0-pins @ fcf3d940
141 * gmac-1 @ fcf3d9f0, seq 15, (req -1)
142 * rgmiim1-pins @ fcf3daa0, seq 16, (req -1)
143 rmiim1-pins @ fcf3db50
144 gmac2phy @ fcf3dc00
145 fephyled-speed100 @ fcf3dcb0
146 fephyled-speed10 @ fcf3dd60
147 fephyled-duplex @ fcf3de10
148 fephyled-rxm0 @ fcf3dec0
149 fephyled-txm0 @ fcf3df70
150 fephyled-linkm0 @ fcf3e020
151 fephyled-rxm1 @ fcf3e0d0
152 fephyled-txm1 @ fcf3e180
153 fephyled-linkm1 @ fcf3e230
154 tsadc_pin @ fcf3e2e0
155 tsadc-int @ fcf3e390
156 tsadc-gpio @ fcf3e440
157 hdmi_pin @ fcf3e4f0
158 hdmi-cec @ fcf3e5a0
159 hdmi-hpd @ fcf3e650
160 cif-0 @ fcf3e700
161 dvp-d2d9-m0 @ fcf3e7b0
162 cif-1 @ fcf3e860
163 dvp-d2d9-m1 @ fcf3e910
164 pmic @ fcf3e9c0
165 pmic-int-l @ fcf3ea70
166 * usb2 @ fcf3eb20, seq 2, (req -1)
167 * usb20-host-drv @ fcf3ebd0, seq 3, (req -1)
uclass 61: pinctrl
0 * pinctrl @ fcf37510, seq 0, (req -1)
uclass 62: pmic
uclass 64: pwm
uclass 66: ram
0 dmc @ fcf3f180
uclass 67: regulator
0 * sdmmc-regulator @ fcf3edb0, seq 0, (req -1)
1 * vcc-host-5v-regulator @ fcf3eee0, seq 1, (req -1)
2 * vcc-sys @ fcf3f010, seq 2, (req -1)
uclass 69: reset
uclass 72: serial
0 * serial at ff130000 @ fcf36450, seq 2, (req 2)
uclass 73: simple_bus
0 amba @ fcf36730
uclass 76: spi
uclass 77: spi_flash
uclass 78: spi_generic
uclass 80: syscon
0 * syscon at ff100000 @ fcf36360, seq 0, (req -1)
1 power-management at ff140000 @ fcf36530
uclass 81: sysreset
0 sysreset @ fcf368f0
uclass 86: usb
0 usb at ff5c0000 @ fcf372c0
1 usb at ff5d0000 @ fcf37370
2 usb at ff580000 @ fcf37420
3 usb at ff600000 @ fcf3f230
uclass 87: usb_dev_generic
uclass 88: usb_hub
uclass 89: usb
=> dm devres
=>
-------------- next part --------------
m tre\b \b\b \b\b \b\b \b\b \b\b \b\b \bdm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
firmware 0 [ ] psci |-- psci
clk 0 [ + ] fixed_rate_clock |-- xin24m
syscon 0 [ + ] rk3328_syscon |-- syscon at ff100000
serial 0 [ + ] ns16550_serial |-- serial at ff130000
syscon 1 [ ] syscon |-- power-management at ff140000
i2c 0 [ ] i2c_rockchip |-- i2c at ff160000
simple_bus 0 [ ] generic_simple_bus |-- amba
clk 1 [ + ] rockchip_rk3328_cru |-- clock-controller at ff440000
sysreset 0 [ ] rockchip_sysreset | `-- sysreset
mmc 0 [ + ] rockchip_rk3288_dw_m |-- rksdmmc at ff500000
blk 0 [ + ] mmc_blk | `-- rksdmmc at ff500000.blk
mmc 1 [ + ] rockchip_rk3288_dw_m |-- rksdmmc at ff520000
blk 1 [ ] mmc_blk | `-- rksdmmc at ff520000.blk
eth 0 [ + ] gmac_rockchip |-- ethernet at ff540000
usb 0 [ ] ehci_generic |-- usb at ff5c0000
usb 1 [ ] ohci_generic |-- usb at ff5d0000
usb 2 [ ] dwc2_usb |-- usb at ff580000
pinctrl 0 [ + ] rockchip_rk3328_pinc |-- pinctrl
gpio 0 [ + ] gpio_rockchip | |-- gpio0 at ff210000
gpio 1 [ + ] gpio_rockchip | |-- gpio1 at ff220000
gpio 2 [ ] gpio_rockchip | |-- gpio2 at ff230000
gpio 3 [ ] gpio_rockchip | |-- gpio3 at ff240000
pinconfig 0 [ ] pinconfig | |-- pcfg-pull-up
pinconfig 1 [ ] pinconfig | |-- pcfg-pull-down
pinconfig 2 [ ] pinconfig | |-- pcfg-pull-none
pinconfig 3 [ ] pinconfig | |-- pcfg-pull-none-2ma
pinconfig 4 [ ] pinconfig | |-- pcfg-pull-up-2ma
pinconfig 5 [ ] pinconfig | |-- pcfg-pull-up-4ma
pinconfig 6 [ ] pinconfig | |-- pcfg-pull-none-4ma
pinconfig 7 [ ] pinconfig | |-- pcfg-pull-down-4ma
pinconfig 8 [ ] pinconfig | |-- pcfg-pull-none-8ma
pinconfig 9 [ ] pinconfig | |-- pcfg-pull-up-8ma
pinconfig 10 [ ] pinconfig | |-- pcfg-pull-none-12ma
pinconfig 11 [ ] pinconfig | |-- pcfg-pull-up-12ma
pinconfig 12 [ ] pinconfig | |-- pcfg-output-high
pinconfig 13 [ ] pinconfig | |-- pcfg-output-low
pinconfig 14 [ ] pinconfig | |-- pcfg-input-high
pinconfig 15 [ ] pinconfig | |-- pcfg-input
pinconfig 16 [ ] pinconfig | |-- i2c0
pinconfig 17 [ ] pinconfig | | `-- i2c0-xfer
pinconfig 18 [ ] pinconfig | |-- i2c1
pinconfig 19 [ ] pinconfig | | `-- i2c1-xfer
pinconfig 20 [ ] pinconfig | |-- i2c2
pinconfig 21 [ ] pinconfig | | `-- i2c2-xfer
pinconfig 22 [ ] pinconfig | |-- i2c3
pinconfig 23 [ ] pinconfig | | |-- i2c3-xfer
pinconfig 24 [ ] pinconfig | | `-- i2c3-gpio
pinconfig 25 [ ] pinconfig | |-- hdmi_i2c
pinconfig 26 [ ] pinconfig | | `-- hdmii2c-xfer
pinconfig 27 [ ] pinconfig | |-- uart0
pinconfig 28 [ ] pinconfig | | |-- uart0-xfer
pinconfig 29 [ ] pinconfig | | |-- uart0-cts
pinconfig 30 [ ] pinconfig | | |-- uart0-rts
pinconfig 31 [ ] pinconfig | | `-- uart0-rts-gpio
pinconfig 32 [ ] pinconfig | |-- uart1
pinconfig 33 [ ] pinconfig | | |-- uart1-xfer
pinconfig 34 [ ] pinconfig | | |-- uart1-cts
pinconfig 35 [ ] pinconfig | | |-- uart1-rts
pinconfig 36 [ ] pinconfig | | `-- uart1-rts-gpio
pinconfig 37 [ ] pinconfig | |-- uart2-0
pinconfig 38 [ ] pinconfig | | `-- uart2m0-xfer
pinconfig 39 [ + ] pinconfig | |-- uart2-1
pinconfig 40 [ + ] pinconfig | | `-- uart2m1-xfer
pinconfig 41 [ ] pinconfig | |-- spi0-0
pinconfig 42 [ ] pinconfig | | |-- spi0m0-clk
pinconfig 43 [ ] pinconfig | | |-- spi0m0-cs0
pinconfig 44 [ ] pinconfig | | |-- spi0m0-tx
pinconfig 45 [ ] pinconfig | | |-- spi0m0-rx
pinconfig 46 [ ] pinconfig | | `-- spi0m0-cs1
pinconfig 47 [ ] pinconfig | |-- spi0-1
pinconfig 48 [ ] pinconfig | | |-- spi0m1-clk
pinconfig 49 [ ] pinconfig | | |-- spi0m1-cs0
pinconfig 50 [ ] pinconfig | | |-- spi0m1-tx
pinconfig 51 [ ] pinconfig | | |-- spi0m1-rx
pinconfig 52 [ ] pinconfig | | `-- spi0m1-cs1
pinconfig 53 [ ] pinconfig | |-- spi0-2
pinconfig 54 [ ] pinconfig | | |-- spi0m2-clk
pinconfig 55 [ ] pinconfig | | |-- spi0m2-cs0
pinconfig 56 [ ] pinconfig | | |-- spi0m2-tx
pinconfig 57 [ ] pinconfig | | `-- spi0m2-rx
pinconfig 58 [ ] pinconfig | |-- i2s1
pinconfig 59 [ ] pinconfig | | |-- i2s1-mclk
pinconfig 60 [ ] pinconfig | | |-- i2s1-sclk
pinconfig 61 [ ] pinconfig | | |-- i2s1-lrckrx
pinconfig 62 [ ] pinconfig | | |-- i2s1-lrcktx
pinconfig 63 [ ] pinconfig | | |-- i2s1-sdi
pinconfig 64 [ ] pinconfig | | |-- i2s1-sdo
pinconfig 65 [ ] pinconfig | | |-- i2s1-sdio1
pinconfig 66 [ ] pinconfig | | |-- i2s1-sdio2
pinconfig 67 [ ] pinconfig | | |-- i2s1-sdio3
pinconfig 68 [ ] pinconfig | | `-- i2s1-sleep
pinconfig 69 [ ] pinconfig | |-- i2s2-0
pinconfig 70 [ ] pinconfig | | |-- i2s2m0-mclk
pinconfig 71 [ ] pinconfig | | |-- i2s2m0-sclk
pinconfig 72 [ ] pinconfig | | |-- i2s2m0-lrckrx
pinconfig 73 [ ] pinconfig | | |-- i2s2m0-lrcktx
pinconfig 74 [ ] pinconfig | | |-- i2s2m0-sdi
pinconfig 75 [ ] pinconfig | | |-- i2s2m0-sdo
pinconfig 76 [ ] pinconfig | | `-- i2s2m0-sleep
pinconfig 77 [ ] pinconfig | |-- i2s2-1
pinconfig 78 [ ] pinconfig | | |-- i2s2m1-mclk
pinconfig 79 [ ] pinconfig | | |-- i2s2m1-sclk
pinconfig 80 [ ] pinconfig | | |-- i2sm1-lrckrx
pinconfig 81 [ ] pinconfig | | |-- i2s2m1-lrcktx
pinconfig 82 [ ] pinconfig | | |-- i2s2m1-sdi
pinconfig 83 [ ] pinconfig | | |-- i2s2m1-sdo
pinconfig 84 [ ] pinconfig | | `-- i2s2m1-sleep
pinconfig 85 [ ] pinconfig | |-- spdif-0
pinconfig 86 [ ] pinconfig | | `-- spdifm0-tx
pinconfig 87 [ ] pinconfig | |-- spdif-1
pinconfig 88 [ ] pinconfig | | `-- spdifm1-tx
pinconfig 89 [ ] pinconfig | |-- spdif-2
pinconfig 90 [ ] pinconfig | | `-- spdifm2-tx
pinconfig 91 [ ] pinconfig | |-- sdmmc0-0
pinconfig 92 [ ] pinconfig | | |-- sdmmc0m0-pwren
pinconfig 93 [ ] pinconfig | | `-- sdmmc0m0-gpio
pinconfig 94 [ + ] pinconfig | |-- sdmmc0-1
pinconfig 95 [ ] pinconfig | | |-- sdmmc0m1-pwren
pinconfig 96 [ + ] pinconfig | | `-- sdmmc0m1-gpio
pinconfig 97 [ + ] pinconfig | |-- sdmmc0
pinconfig 98 [ + ] pinconfig | | |-- sdmmc0-clk
pinconfig 99 [ + ] pinconfig | | |-- sdmmc0-cmd
pinconfig 100 [ + ] pinconfig | | |-- sdmmc0-dectn
pinconfig 101 [ ] pinconfig | | |-- sdmmc0-wrprt
pinconfig 102 [ ] pinconfig | | |-- sdmmc0-bus1
pinconfig 103 [ + ] pinconfig | | |-- sdmmc0-bus4
pinconfig 104 [ ] pinconfig | | `-- sdmmc0-gpio
pinconfig 105 [ ] pinconfig | |-- sdmmc0ext
pinconfig 106 [ ] pinconfig | | |-- sdmmc0ext-clk
pinconfig 107 [ ] pinconfig | | |-- sdmmc0ext-cmd
pinconfig 108 [ ] pinconfig | | |-- sdmmc0ext-wrprt
pinconfig 109 [ ] pinconfig | | |-- sdmmc0ext-dectn
pinconfig 110 [ ] pinconfig | | |-- sdmmc0ext-bus1
pinconfig 111 [ ] pinconfig | | |-- sdmmc0ext-bus4
pinconfig 112 [ ] pinconfig | | `-- sdmmc0ext-gpio
pinconfig 113 [ ] pinconfig | |-- sdmmc1
pinconfig 114 [ ] pinconfig | | |-- sdmmc1-clk
pinconfig 115 [ ] pinconfig | | |-- sdmmc1-cmd
pinconfig 116 [ ] pinconfig | | |-- sdmmc1-pwren
pinconfig 117 [ ] pinconfig | | |-- sdmmc1-wrprt
pinconfig 118 [ ] pinconfig | | |-- sdmmc1-dectn
pinconfig 119 [ ] pinconfig | | |-- sdmmc1-bus1
pinconfig 120 [ ] pinconfig | | |-- sdmmc1-bus4
pinconfig 121 [ ] pinconfig | | `-- sdmmc1-gpio
pinconfig 122 [ + ] pinconfig | |-- emmc
pinconfig 123 [ + ] pinconfig | | |-- emmc-clk
pinconfig 124 [ + ] pinconfig | | |-- emmc-cmd
pinconfig 125 [ ] pinconfig | | |-- emmc-pwren
pinconfig 126 [ ] pinconfig | | |-- emmc-rstnout
pinconfig 127 [ ] pinconfig | | |-- emmc-bus1
pinconfig 128 [ ] pinconfig | | |-- emmc-bus4
pinconfig 129 [ + ] pinconfig | | `-- emmc-bus8
pinconfig 130 [ ] pinconfig | |-- pwm0
pinconfig 131 [ ] pinconfig | | `-- pwm0-pin
pinconfig 132 [ ] pinconfig | |-- pwm1
pinconfig 133 [ ] pinconfig | | `-- pwm1-pin
pinconfig 134 [ ] pinconfig | |-- pwm2
pinconfig 135 [ ] pinconfig | | `-- pwm2-pin
pinconfig 136 [ ] pinconfig | |-- pwmir
pinconfig 137 [ ] pinconfig | | `-- pwmir-pin
pinconfig 138 [ ] pinconfig | |-- gmac-0
pinconfig 139 [ ] pinconfig | | |-- rgmiim0-pins
pinconfig 140 [ ] pinconfig | | `-- rmiim0-pins
pinconfig 141 [ + ] pinconfig | |-- gmac-1
pinconfig 142 [ + ] pinconfig | | |-- rgmiim1-pins
pinconfig 143 [ ] pinconfig | | `-- rmiim1-pins
pinconfig 144 [ ] pinconfig | |-- gmac2phy
pinconfig 145 [ ] pinconfig | | |-- fephyled-speed100
pinconfig 146 [ ] pinconfig | | |-- fephyled-speed10
pinconfig 147 [ ] pinconfig | | |-- fephyled-duplex
pinconfig 148 [ ] pinconfig | | |-- fephyled-rxm0
pinconfig 149 [ ] pinconfig | | |-- fephyled-txm0
pinconfig 150 [ ] pinconfig | | |-- fephyled-linkm0
pinconfig 151 [ ] pinconfig | | |-- fephyled-rxm1
pinconfig 152 [ ] pinconfig | | |-- fephyled-txm1
pinconfig 153 [ ] pinconfig | | `-- fephyled-linkm1
pinconfig 154 [ ] pinconfig | |-- tsadc_pin
pinconfig 155 [ ] pinconfig | | |-- tsadc-int
pinconfig 156 [ ] pinconfig | | `-- tsadc-gpio
pinconfig 157 [ ] pinconfig | |-- hdmi_pin
pinconfig 158 [ ] pinconfig | | |-- hdmi-cec
pinconfig 159 [ ] pinconfig | | `-- hdmi-hpd
pinconfig 160 [ ] pinconfig | |-- cif-0
pinconfig 161 [ ] pinconfig | | `-- dvp-d2d9-m0
pinconfig 162 [ ] pinconfig | |-- cif-1
pinconfig 163 [ ] pinconfig | | `-- dvp-d2d9-m1
pinconfig 164 [ ] pinconfig | |-- pmic
pinconfig 165 [ ] pinconfig | | `-- pmic-int-l
pinconfig 166 [ + ] pinconfig | `-- usb2
pinconfig 167 [ + ] pinconfig | `-- usb20-host-drv
clk 2 [ + ] fixed_rate_clock |-- external-gmac-clock
regulator 0 [ + ] fixed regulator |-- sdmmc-regulator
regulator 1 [ + ] fixed regulator |-- vcc-host-5v-regulator
regulator 2 [ + ] fixed regulator |-- vcc-sys
ram 0 [ ] rockchip_rk3328_dmc |-- dmc
usb 3 [ ] xhci_rockchip `-- usb at ff600000
=> dm uclass
uclass 0: root
0 * root_driver @ fcf36050, seq 0, (req -1)
uclass 13: adc
uclass 17: blk
0 * rksdmmc at ff500000.blk @ fcf36c60, seq 0, (req -1)
1 rksdmmc at ff520000.blk @ fcf36fc0
uclass 21: clk
0 * xin24m @ fcf36230, seq 1, (req -1)
1 * clock-controller at ff440000 @ fcf36800, seq 0, (req -1)
2 * external-gmac-clock @ fcf3ec80, seq 2, (req -1)
uclass 26: efi
uclass 27: eth
0 * ethernet at ff540000 @ fcf37160, seq 0, (req -1)
uclass 28: firmware
0 psci @ fcf36140
uclass 30: gpio
0 * gpio0 at ff210000 @ fcf37600, seq 0, (req -1)
1 * gpio1 at ff220000 @ fcf376b0, seq 1, (req -1)
2 gpio2 at ff230000 @ fcf37760
3 gpio3 at ff240000 @ fcf37810
uclass 32: i2c
0 i2c at ff160000 @ fcf36640, seq -1, (req 1)
uclass 34: i2c_generic
uclass 43: usb_mass_storage
uclass 47: mmc
0 * rksdmmc at ff500000 @ fcf36a00, seq 1, (req 1)
1 * rksdmmc at ff520000 @ fcf36da0, seq 0, (req 0)
uclass 50: nop
uclass 59: phy
uclass 60: pinconfig
0 pcfg-pull-up @ fcf37900
1 pcfg-pull-down @ fcf379b0
2 pcfg-pull-none @ fcf37a60
3 pcfg-pull-none-2ma @ fcf37b10
4 pcfg-pull-up-2ma @ fcf37bc0
5 pcfg-pull-up-4ma @ fcf37c70
6 pcfg-pull-none-4ma @ fcf37d20
7 pcfg-pull-down-4ma @ fcf37dd0
8 pcfg-pull-none-8ma @ fcf37e80
9 pcfg-pull-up-8ma @ fcf37f30
10 pcfg-pull-none-12ma @ fcf37fe0
11 pcfg-pull-up-12ma @ fcf38090
12 pcfg-output-high @ fcf38140
13 pcfg-output-low @ fcf381f0
14 pcfg-input-high @ fcf382a0
15 pcfg-input @ fcf38350
16 i2c0 @ fcf38400
17 i2c0-xfer @ fcf384b0
18 i2c1 @ fcf38560
19 i2c1-xfer @ fcf38610
20 i2c2 @ fcf386c0
21 i2c2-xfer @ fcf38770
22 i2c3 @ fcf38820
23 i2c3-xfer @ fcf388d0
24 i2c3-gpio @ fcf38980
25 hdmi_i2c @ fcf38a30
26 hdmii2c-xfer @ fcf38ae0
27 uart0 @ fcf38b90
28 uart0-xfer @ fcf38c40
29 uart0-cts @ fcf38cf0
30 uart0-rts @ fcf38da0
31 uart0-rts-gpio @ fcf38e50
32 uart1 @ fcf38f00
33 uart1-xfer @ fcf38fb0
34 uart1-cts @ fcf39060
35 uart1-rts @ fcf39110
36 uart1-rts-gpio @ fcf391c0
37 uart2-0 @ fcf39270
38 uart2m0-xfer @ fcf39320
39 * uart2-1 @ fcf393d0, seq 4, (req -1)
40 * uart2m1-xfer @ fcf39480, seq 5, (req -1)
41 spi0-0 @ fcf39530
42 spi0m0-clk @ fcf395e0
43 spi0m0-cs0 @ fcf39690
44 spi0m0-tx @ fcf39740
45 spi0m0-rx @ fcf397f0
46 spi0m0-cs1 @ fcf398a0
47 spi0-1 @ fcf39950
48 spi0m1-clk @ fcf39a00
49 spi0m1-cs0 @ fcf39ab0
50 spi0m1-tx @ fcf39b60
51 spi0m1-rx @ fcf39c10
52 spi0m1-cs1 @ fcf39cc0
53 spi0-2 @ fcf39d70
54 spi0m2-clk @ fcf39e20
55 spi0m2-cs0 @ fcf39ed0
56 spi0m2-tx @ fcf39f80
57 spi0m2-rx @ fcf3a030
58 i2s1 @ fcf3a0e0
59 i2s1-mclk @ fcf3a190
60 i2s1-sclk @ fcf3a240
61 i2s1-lrckrx @ fcf3a2f0
62 i2s1-lrcktx @ fcf3a3a0
63 i2s1-sdi @ fcf3a450
64 i2s1-sdo @ fcf3a500
65 i2s1-sdio1 @ fcf3a5b0
66 i2s1-sdio2 @ fcf3a660
67 i2s1-sdio3 @ fcf3a710
68 i2s1-sleep @ fcf3a7c0
69 i2s2-0 @ fcf3a870
70 i2s2m0-mclk @ fcf3a920
71 i2s2m0-sclk @ fcf3a9d0
72 i2s2m0-lrckrx @ fcf3aa80
73 i2s2m0-lrcktx @ fcf3ab30
74 i2s2m0-sdi @ fcf3abe0
75 i2s2m0-sdo @ fcf3ac90
76 i2s2m0-sleep @ fcf3ad40
77 i2s2-1 @ fcf3adf0
78 i2s2m1-mclk @ fcf3aea0
79 i2s2m1-sclk @ fcf3af50
80 i2sm1-lrckrx @ fcf3b000
81 i2s2m1-lrcktx @ fcf3b0b0
82 i2s2m1-sdi @ fcf3b160
83 i2s2m1-sdo @ fcf3b210
84 i2s2m1-sleep @ fcf3b2c0
85 spdif-0 @ fcf3b370
86 spdifm0-tx @ fcf3b420
87 spdif-1 @ fcf3b4d0
88 spdifm1-tx @ fcf3b580
89 spdif-2 @ fcf3b630
90 spdifm2-tx @ fcf3b6e0
91 sdmmc0-0 @ fcf3b790
92 sdmmc0m0-pwren @ fcf3b840
93 sdmmc0m0-gpio @ fcf3b8f0
94 * sdmmc0-1 @ fcf3b9a0, seq 0, (req -1)
95 sdmmc0m1-pwren @ fcf3ba50
96 * sdmmc0m1-gpio @ fcf3bb00, seq 1, (req -1)
97 * sdmmc0 @ fcf3bbb0, seq 10, (req -1)
98 * sdmmc0-clk @ fcf3bc60, seq 11, (req -1)
99 * sdmmc0-cmd @ fcf3bd10, seq 12, (req -1)
100 * sdmmc0-dectn @ fcf3bdc0, seq 13, (req -1)
101 sdmmc0-wrprt @ fcf3be70
102 sdmmc0-bus1 @ fcf3bf20
103 * sdmmc0-bus4 @ fcf3bfd0, seq 14, (req -1)
104 sdmmc0-gpio @ fcf3c080
105 sdmmc0ext @ fcf3c130
106 sdmmc0ext-clk @ fcf3c1e0
107 sdmmc0ext-cmd @ fcf3c290
108 sdmmc0ext-wrprt @ fcf3c340
109 sdmmc0ext-dectn @ fcf3c3f0
110 sdmmc0ext-bus1 @ fcf3c4a0
111 sdmmc0ext-bus4 @ fcf3c550
112 sdmmc0ext-gpio @ fcf3c600
113 sdmmc1 @ fcf3c6b0
114 sdmmc1-clk @ fcf3c760
115 sdmmc1-cmd @ fcf3c810
116 sdmmc1-pwren @ fcf3c8c0
117 sdmmc1-wrprt @ fcf3c970
118 sdmmc1-dectn @ fcf3ca20
119 sdmmc1-bus1 @ fcf3cad0
120 sdmmc1-bus4 @ fcf3cb80
121 sdmmc1-gpio @ fcf3cc30
122 * emmc @ fcf3cce0, seq 6, (req -1)
123 * emmc-clk @ fcf3cd90, seq 7, (req -1)
124 * emmc-cmd @ fcf3ce40, seq 8, (req -1)
125 emmc-pwren @ fcf3cef0
126 emmc-rstnout @ fcf3cfa0
127 emmc-bus1 @ fcf3d050
128 emmc-bus4 @ fcf3d100
129 * emmc-bus8 @ fcf3d1b0, seq 9, (req -1)
130 pwm0 @ fcf3d260
131 pwm0-pin @ fcf3d310
132 pwm1 @ fcf3d3c0
133 pwm1-pin @ fcf3d470
134 pwm2 @ fcf3d520
135 pwm2-pin @ fcf3d5d0
136 pwmir @ fcf3d680
137 pwmir-pin @ fcf3d730
138 gmac-0 @ fcf3d7e0
139 rgmiim0-pins @ fcf3d890
140 rmiim0-pins @ fcf3d940
141 * gmac-1 @ fcf3d9f0, seq 15, (req -1)
142 * rgmiim1-pins @ fcf3daa0, seq 16, (req -1)
143 rmiim1-pins @ fcf3db50
144 gmac2phy @ fcf3dc00
145 fephyled-speed100 @ fcf3dcb0
146 fephyled-speed10 @ fcf3dd60
147 fephyled-duplex @ fcf3de10
148 fephyled-rxm0 @ fcf3dec0
149 fephyled-txm0 @ fcf3df70
150 fephyled-linkm0 @ fcf3e020
151 fephyled-rxm1 @ fcf3e0d0
152 fephyled-txm1 @ fcf3e180
153 fephyled-linkm1 @ fcf3e230
154 tsadc_pin @ fcf3e2e0
155 tsadc-int @ fcf3e390
156 tsadc-gpio @ fcf3e440
157 hdmi_pin @ fcf3e4f0
158 hdmi-cec @ fcf3e5a0
159 hdmi-hpd @ fcf3e650
160 cif-0 @ fcf3e700
161 dvp-d2d9-m0 @ fcf3e7b0
162 cif-1 @ fcf3e860
163 dvp-d2d9-m1 @ fcf3e910
164 pmic @ fcf3e9c0
165 pmic-int-l @ fcf3ea70
166 * usb2 @ fcf3eb20, seq 2, (req -1)
167 * usb20-host-drv @ fcf3ebd0, seq 3, (req -1)
uclass 61: pinctrl
0 * pinctrl @ fcf37510, seq 0, (req -1)
uclass 62: pmic
uclass 64: pwm
uclass 66: ram
0 dmc @ fcf3f180
uclass 67: regulator
0 * sdmmc-regulator @ fcf3edb0, seq 0, (req -1)
1 * vcc-host-5v-regulator @ fcf3eee0, seq 1, (req -1)
2 * vcc-sys @ fcf3f010, seq 2, (req -1)
uclass 69: reset
uclass 72: serial
0 * serial at ff130000 @ fcf36450, seq 2, (req 2)
uclass 73: simple_bus
0 amba @ fcf36730
uclass 76: spi
uclass 77: spi_flash
uclass 78: spi_generic
uclass 80: syscon
0 * syscon at ff100000 @ fcf36360, seq 0, (req -1)
1 power-management at ff140000 @ fcf36530
uclass 81: sysreset
0 sysreset @ fcf368f0
uclass 86: usb
0 usb at ff5c0000 @ fcf372c0
1 usb at ff5d0000 @ fcf37370
2 usb at ff580000 @ fcf37420
3 usb at ff600000 @ fcf3f230
uclass 87: usb_dev_generic
uclass 88: usb_hub
uclass 89: usb
=> dm devres
=>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 10:14 ` Martin Husemann
@ 2019-09-20 16:43 ` Matwey V. Kornilov
2019-09-20 17:27 ` Simon South
0 siblings, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-20 16:43 UTC (permalink / raw)
To: u-boot
пт, 20 сент. 2019 г. в 13:14, Martin Husemann <martin@duskware.de>:
>
> On Fri, Sep 20, 2019 at 01:07:12PM +0300, Matwey V. Kornilov wrote:
> > Do you have an idea where is correct FDT supposed to came from in
> > NetBSD case? For Linux, the file is placed on the boot partition and
> > retrieved by u-boot while looking for EFI application, etc.
>
> Same for NetBSD. Assuming that other parts have not been changed, Simon's
> experiments should have used the same .dtb for all tests.
>
Now I remember that somebody complained about large files reading from eMMC.
Simon,
Could you please use u-boot console and try to locate and load dtb
file manually using `ls` and `load` commands in both scenarios?
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 16:43 ` Matwey V. Kornilov
@ 2019-09-20 17:27 ` Simon South
2019-09-20 17:37 ` Matwey V. Kornilov
2019-09-20 18:09 ` Simon South
0 siblings, 2 replies; 28+ messages in thread
From: Simon South @ 2019-09-20 17:27 UTC (permalink / raw)
To: u-boot
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".
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
-------------- next part --------------
U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:55:01)
LPDDR3
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:55:01 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:56:02 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address - 9a:fd:d8:85:88:9f
eth0: ethernet at ff540000
Hit any key to stop autoboot: 2 \b\b\b 0
=> 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 ............*..*
01f00070: aaa0aaac aaeeab9a aeae84c8 ac2e8aaa ................
01f00080: aaaa88a2 8a8a98a8 aee8aacc 686aa880 ..............jh
01f00090: acaa8a8a ac8eaec4 eaaaec80 aaaaca8c ................
01f000a0: 28acaacd aae88a8a aba88e89 aaa8aaa8 ...(............
01f000b0: 122caca4 a24eacc8 abea8cca 8aa0aa6e ..,...N.....n...
01f000c0: ea08988a aaacc8ca ee8eac8c 2488e89a ...............$
01f000d0: c22ca84e 82a98a8c 88e888ae 8ac0aa92 N.,.............
01f000e0: a8a8a289 aeaaa8c8 8ccceacb aaeaee84 ................
01f000f0: 2feaa947 aae2a628 a3c688a8 ceaee8a9 G../(...........
=> ls mmc 1 /dtb/rockchip
./
../
77017 rk3399-sapphire.dtb
81304 rk3399-sapphire-excavator.dtb
78646 rk3399-rockpro64.dtb
77846 rk3399-rock960.dtb
76155 rk3399-rock-pi-4.dtb
77701 rk3399-roc-pc.dtb
78035 rk3399-puma-haikou.dtb
78483 rk3399-nanopi-m4.dtb
78791 rk3399-nanopc-t4.dtb
86532 rk3399-gru-scarlet-kd.dtb
86507 rk3399-gru-scarlet-inx.dtb
89522 rk3399-gru-kevin.dtb
85495 rk3399-gru-bob.dtb
80312 rk3399-firefly.dtb
78519 rk3399-ficus.dtb
68842 rk3399-evb.dtb
53513 rk3328-rock64.dtb
52150 rk3328-roc-cc.dtb
51134 rk3328-evb.dtb
19 file(s), 2 dir(s)
=> 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.......
01f00070: 04000000 0b000000 01000000 03000000 ................
01f00080: 04000000 1c000000 02000000 03000000 ................
01f00090: 04000000 2b000000 02000000 03000000 .......+........
01f000a0: 0e000000 37000000 656e6950 52203436 .......7Pine64 R
01f000b0: 366b636f 00000034 01000000 61696c61 ock64.......alia
01f000c0: 00736573 03000000 11000000 3d000000 ses............=
01f000d0: 7265732f 406c6169 31316666 30303030 /serial at ff110000
01f000e0: 00000000 03000000 11000000 45000000 ...............E
01f000f0: 7265732f 406c6169 32316666 30303030 /serial at ff120000
=> fdt addr ${fdt_addr_r}
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
=> 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.......
01f00070: 04000000 0b000000 01000000 03000000 ................
01f00080: 04000000 1c000000 02000000 03000000 ................
01f00090: 04000000 2b000000 02000000 03000000 .......+........
01f000a0: 0e000000 37000000 656e6950 52203436 .......7Pine64 R
01f000b0: 366b636f 00000034 01000000 61696c61 ock64.......alia
01f000c0: 00736573 03000000 11000000 3d000000 ses............=
01f000d0: 7265732f 406c6169 31316666 30303030 /serial at ff110000
01f000e0: 00000000 03000000 11000000 45000000 ...............E
01f000f0: 7265732f 406c6169 32316666 30303030 /serial at ff120000
=> fdt addr ${fdt_addr_r}
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
=>
-------------- next part --------------
DDR version 1.16 20190528
ID:0x805 Y
In
LPDDR3
333MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:55:01 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7 (Sep 20 2019 - 04:56:02 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address - 9e:e6:27:9f:84:80
eth0: ethernet at ff540000
Hit any key to stop autoboot: 2 \b\b\b 0
=> md ${fdt_addr_r}
01f00000: adaaaa9a ea23282a baa8aeae aa7aa3aa ....*(#.......z.
01f00010: bef200ab abaa020a a8b6aa88 aa88aafa ................
01f00020: e92a4ca3 aafcf9aa eaaaa8fa aaaaaf89 .L*.............
01f00030: aaa8a0aa aaea888b 62a5ebfa abea6abe ...........b.j..
01f00040: a3b188aa a29aac4a 8aaaaaaa 8eee8cae ....J...........
01f00050: daaaaa4e aaacfeea ea8a6ebe eaa38b8a N........n......
01f00060: aee4f2a9 aaacaaba aaea8ab8 2aeeb8aa ...............*
01f00070: aab1aeac aaeeeb9e aeae84e8 ac2e8aea ................
01f00080: aaae88e6 8aced8ba aeecaacc 686ae884 ..............jh
01f00090: acaaeaaa ac8faec0 eaeeec84 aaaaca8c ................
01f000a0: 68aeaacd aae89a8a abe8ce89 aaaaaaa8 ...h............
01f000b0: 326caca4 e2ceaccc abea8ece 8ae0eaee ..l2............
01f000c0: ea08d88a aaacc8ea ee9eacac 248ae99a ...............$
01f000d0: c2aea8ce 82a98ecc aae888ae 8ac1aa9a ................
01f000e0: acbaa289 aeaeb8cc 8ccceecb aaeaeeac ................
01f000f0: 2feaad43 aae6ee69 a7c688ac eeaee8a9 C../i...........
=> ls mmc 1 /dtb/rockchip
./
../
77017 rk3399-sapphire.dtb
81304 rk3399-sapphire-excavator.dtb
78646 rk3399-rockpro64.dtb
77846 rk3399-rock960.dtb
76155 rk3399-rock-pi-4.dtb
77701 rk3399-roc-pc.dtb
78035 rk3399-puma-haikou.dtb
78483 rk3399-nanopi-m4.dtb
78791 rk3399-nanopc-t4.dtb
86532 rk3399-gru-scarlet-kd.dtb
86507 rk3399-gru-scarlet-inx.dtb
89522 rk3399-gru-kevin.dtb
85495 rk3399-gru-bob.dtb
80312 rk3399-firefly.dtb
78519 rk3399-ficus.dtb
68842 rk3399-evb.dtb
53513 rk3328-rock64.dtb
52150 rk3328-roc-cc.dtb
51134 rk3328-evb.dtb
19 file(s), 2 dir(s)
=> load mmc 1 ${fdt_addr_r} /dtb/rockchip/rk3328-rock64.dtb
53513 bytes read in 9 ms (5.7 MiB/s)
=> md ${fdt_addr_r}
01f00000: edfe0dd0 09d10000 38000000 70ba0000 ...........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.......
01f00070: 04000000 0b000000 01000000 03000000 ................
01f00080: 04000000 1c000000 02000000 03000000 ................
01f00090: 04000000 2b000000 02000000 03000000 .......+........
01f000a0: 0e000000 37000000 656e6950 52203436 .......7Pine64 R
01f000b0: 366b636f 00000034 01000000 61696c61 ock64.......alia
01f000c0: 00736573 03000000 11000000 3d000000 ses............=
01f000d0: 7265732f 406c6169 31316666 30303030 /serial at ff110000
01f000e0: 00000000 03000000 11000000 45000000 ...............E
01f000f0: 7265732f 406c6169 32316666 30303030 /serial at ff120000
=> fdt addr ${fdt_addr_r}
=> boot
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
53513 bytes read in 10 ms (5.1 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
205136 bytes read in 17 ms (11.5 MiB/s)
|\b/\b-\b\\b|\b/\b-\b
>> NetBSD/evbarm EFI Boot (aarch64), Revision 1.11 (Wed Sep 18 15:50:45 UTC 2019) (from NetBSD 9.99.12)
Press return to boot now, any other key for boot prompt
booting netbsd - starting in 5 seconds. \b\b\b\b\b\b\b\b\b\b\b4 seconds. \b\b\b\b\b\b\b\b\b\b\b3 seconds. \b\b\b\b\b\b\b\b\b\b\b2 seconds. \b\b\b\b\b\b\b\b\b\b\b1 seconds. \b\b\b\b\b\b\b\b\b\b\b0 seconds.
\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b6100056|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b+2730512|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b+1985652-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b+1823764-\b\\b [701640|\b/\b-\b\\b|\b/\b-\b\\b|\b/\b-\b+490622\\b|\b/\b-\b\\b|\b/\b]=0xec5b00
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[ 1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[ 1.0000000] 2018, 2019 The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights reserved.
[ 1.0000000] NetBSD 9.99.12 (GENERIC64) #16: Wed Sep 18 12:30:03 EDT 2019
[ 1.0000000] ssouth at laptop:/usr/src/sys/arch/evbarm/compile/obj/GENERIC64
[ 1.0000000] total memory = 4064 MB
[ 1.0000000] avail memory = 3918 MB
[ 1.0000000] armfdt0 (root)
[ 1.0000000] simplebus0 at armfdt0: Pine64 Rock64
[ 1.0000000] cpus0 at simplebus0
[ 1.0000000] simplebus1 at simplebus0
[ 1.0000000] simplebus2 at simplebus0
[ 1.0000000] cpu0 at cpus0: Cortex-A53 r0p4 (Cortex V8-A core)
...
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 17:27 ` Simon South
@ 2019-09-20 17:37 ` Matwey V. Kornilov
2019-09-20 17:43 ` Simon South
2019-09-20 18:09 ` Simon South
1 sibling, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-20 17:37 UTC (permalink / raw)
To: u-boot
пт, 20 сент. 2019 г. в 20:28, Simon South <simon@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
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 17:37 ` Matwey V. Kornilov
@ 2019-09-20 17:43 ` Simon South
2019-09-21 7:47 ` Matwey V. Kornilov
2019-09-21 12:29 ` Matwey V. Kornilov
0 siblings, 2 replies; 28+ messages in thread
From: Simon South @ 2019-09-20 17:43 UTC (permalink / raw)
To: u-boot
On 2019-09-20 1:37 p.m., Matwey V. Kornilov wrote:
> What is the difference? In filesize?
The EFI bootloader:
205136 bootaa64.efi
The DTB file:
53513 rk3328-rock64.dtb
It's about one quarter the size.
It is strange the EFI bootloader and the kernel both seem always to load
reliably when the DTB file doesn't.
----------
=> ls mmc 1 /EFI/BOOT/
./
../
205136 bootaa64.efi
1 file(s), 2 dir(s)
=> ls mmc 1 /dtb/rockchip/
./
../
77017 rk3399-sapphire.dtb
81304 rk3399-sapphire-excavator.dtb
78646 rk3399-rockpro64.dtb
77846 rk3399-rock960.dtb
76155 rk3399-rock-pi-4.dtb
77701 rk3399-roc-pc.dtb
78035 rk3399-puma-haikou.dtb
78483 rk3399-nanopi-m4.dtb
78791 rk3399-nanopc-t4.dtb
86532 rk3399-gru-scarlet-kd.dtb
86507 rk3399-gru-scarlet-inx.dtb
89522 rk3399-gru-kevin.dtb
85495 rk3399-gru-bob.dtb
80312 rk3399-firefly.dtb
78519 rk3399-ficus.dtb
68842 rk3399-evb.dtb
53513 rk3328-rock64.dtb
52150 rk3328-roc-cc.dtb
51134 rk3328-evb.dtb
19 file(s), 2 dir(s)
=>
--
Simon South
simon at simonsouth.net
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 17:27 ` Simon South
2019-09-20 17:37 ` Matwey V. Kornilov
@ 2019-09-20 18:09 ` Simon South
1 sibling, 0 replies; 28+ messages in thread
From: Simon South @ 2019-09-20 18:09 UTC (permalink / raw)
To: u-boot
On 2019-09-20 1:27 p.m., Simon South wrote:
> I'm going to apply Elaine's patches and see if that changes things.
Unfortunately no; other than this line now appearing in the output:
PMIC: RK8050 (on=0x10, off=0x04)
nothing seems to have changed. Either the machine hangs or NetBSD's
kernel panics.
--
Simon South
simon at simonsouth.net
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 17:43 ` Simon South
@ 2019-09-21 7:47 ` Matwey V. Kornilov
2019-09-21 11:59 ` Simon South
2019-09-21 12:29 ` Matwey V. Kornilov
1 sibling, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-21 7:47 UTC (permalink / raw)
To: u-boot
Could you please try to revert this commit and see what's happening then?
https://github.com/u-boot/u-boot/commit/16593ccd07afdbb24a937eac4ea7e16269ff51e0
пт, 20 сент. 2019, 20:44 Simon South <simon@simonsouth.net>:
> On 2019-09-20 1:37 p.m., Matwey V. Kornilov wrote:
> > What is the difference? In filesize?
>
> The EFI bootloader:
>
> 205136 bootaa64.efi
>
> The DTB file:
>
> 53513 rk3328-rock64.dtb
>
> It's about one quarter the size.
>
> It is strange the EFI bootloader and the kernel both seem always to load
> reliably when the DTB file doesn't.
>
> ----------
>
> => ls mmc 1 /EFI/BOOT/
> ./
> ../
> 205136 bootaa64.efi
>
> 1 file(s), 2 dir(s)
>
> => ls mmc 1 /dtb/rockchip/
> ./
> ../
> 77017 rk3399-sapphire.dtb
> 81304 rk3399-sapphire-excavator.dtb
> 78646 rk3399-rockpro64.dtb
> 77846 rk3399-rock960.dtb
> 76155 rk3399-rock-pi-4.dtb
> 77701 rk3399-roc-pc.dtb
> 78035 rk3399-puma-haikou.dtb
> 78483 rk3399-nanopi-m4.dtb
> 78791 rk3399-nanopc-t4.dtb
> 86532 rk3399-gru-scarlet-kd.dtb
> 86507 rk3399-gru-scarlet-inx.dtb
> 89522 rk3399-gru-kevin.dtb
> 85495 rk3399-gru-bob.dtb
> 80312 rk3399-firefly.dtb
> 78519 rk3399-ficus.dtb
> 68842 rk3399-evb.dtb
> 53513 rk3328-rock64.dtb
> 52150 rk3328-roc-cc.dtb
> 51134 rk3328-evb.dtb
>
> 19 file(s), 2 dir(s)
>
> =>
>
> --
> Simon South
> simon at simonsouth.net
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-21 7:47 ` Matwey V. Kornilov
@ 2019-09-21 11:59 ` Simon South
0 siblings, 0 replies; 28+ messages in thread
From: Simon South @ 2019-09-21 11:59 UTC (permalink / raw)
To: u-boot
On 2019-09-21 3:47 a.m., Matwey V. Kornilov wrote:
> Could you please try to revert this commit and see what's happening then?
Unfortunately undoing that change makes things worse: Either the NetBSD
EFI bootloader hangs immediately on start (without any output) or it
crashes with output like
"Synchronous Abort" handler, esr 0x96000044
elr: fffffffffd1ad760 lr : fffffffffd1ac030 (reloc)
elr: 00000000fbeeb760 lr : 00000000fbeea030
x0 : 00000000fcf679a0 x1 : 00000000fef3e628
x2 : 0000000000000000 x3 : 00000000fbf17408
(...)
In either case I still see the "FDT_ERR_BADMAGIC" messages from U-Boot.
Applying Elaine's patches for RK805 support makes no difference.
Complete log attached.
--
Simon South
simon at simonsouth.net
-------------- next part --------------
U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:45:04)
LPDDR3
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:45:04 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:46:10 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address - 92:21:88:52:60:47
eth0: ethernet at ff540000
Hit any key to stop autoboot: 2 \b\b\b 1 \b\b\b 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
53513 bytes read in 16 ms (3.2 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
205136 bytes read in 35 ms (5.6 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:45:04)
LPDDR3
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:45:04 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:46:10 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address - fe:f0:6b:1f:55:ce
eth0: ethernet at ff540000
Hit any key to stop autoboot: 2 \b\b\b 1 \b\b\b 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
53513 bytes read in 16 ms (3.2 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
205136 bytes read in 35 ms (5.6 MiB/s)
"Synchronous Abort" handler, esr 0x96000044
elr: fffffffffd1ad760 lr : fffffffffd1ac030 (reloc)
elr: 00000000fbeeb760 lr : 00000000fbeea030
x0 : 00000000fcf679a0 x1 : 00000000fef3e628
x2 : 0000000000000000 x3 : 00000000fbf17408
x4 : 0000000000000000 x5 : 0000000000000018
x6 : 00000000fcf679a0 x7 : 00000000fefa8a00
x8 : 000000000000fbee x9 : 0000000000000008
x10: 0000000000000001 x11: 00000000fcf29acc
x12: 00000000000000c0 x13: 00000000fcf29a8c
x14: 00000000080ef000 x15: 0000000000000002
x16: 00000000fef41c54 x17: 0000000000000000
x18: 0000000000000000 x19: 00000000fef3e628
x20: 00000000fcf29e30 x21: 0000000000000000
x22: 00000000fefa8a00 x23: 00000000fef3e628
x24: 00000000fefec000 x25: 00000000fefec000
x26: 0000000000000000 x27: 0000000000000000
x28: 00000000fcf5d250 x29: 00000000fcf29d80
UEFI image [0x00000000fbee9000:0x00000000fbf17fff] pc=0x2760 '/efi\boot\bootaa64.efi'
Resetting CPU ...
resetting ...
U-Boot TPL 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:45:04)
LPDDR3
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:45:04 -0400)
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC1
NOTICE: BL31: v2.1(release):v2.1-678-g2fc6ffc4-dirty
NOTICE: BL31: Built : 12:10:07, Sep 12 2019
ERROR: over or zero region, nr=4187432, max=10
NOTICE: BL31:Rockchip release version: v1.2
U-Boot 2019.10-rc3-00361-ga9fa70b7b7-dirty (Sep 21 2019 - 07:46:10 -0400)
Model: Pine64 Rock64
DRAM: 4 GiB
MMC: rksdmmc at ff500000: 1, rksdmmc at ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial at ff130000
Out: serial at ff130000
Err: serial at ff130000
Model: Pine64 Rock64
Net:
Warning: ethernet at ff540000 (eth0) using random MAC address - fe:83:b7:02:40:87
eth0: ethernet at ff540000
Hit any key to stop autoboot: 2 \b\b\b 1 \b\b\b 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
53513 bytes read in 19 ms (2.7 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
Scanning disk rksdmmc at ff500000.blk...
Card did not respond to voltage select!
Scanning disk rksdmmc at ff520000.blk...
Disk rksdmmc at ff520000.blk not ready
Found 3 disks
BootOrder not defined
EFI boot manager: Cannot load any image
205136 bytes read in 40 ms (4.9 MiB/s)
## Application terminated, r = 1
EFI LOAD FAILED: continuing...
starting USB...
Bus usb at ff5c0000: USB EHCI 1.00
Bus usb at ff5d0000: USB OHCI 1.0
Bus usb at ff580000: Bus usb at ff600000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb at ff5c0000 for devices... 1 USB Device(s) found
scanning bus usb at ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb at ff580000 for devices... 1 USB Device(s) found
scanning bus usb at ff600000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
ethernet at ff540000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet at ff540000
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
ethernet at ff540000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet at ff540000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
ethernet at ff540000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet at ff540000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
ethernet at ff540000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet at ff540000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
ethernet at ff540000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet at ff540000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
ethernet at ff540000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet at ff540000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
ethernet at ff540000 Waiting for PHY auto negotiation to complete..
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-20 17:43 ` Simon South
2019-09-21 7:47 ` Matwey V. Kornilov
@ 2019-09-21 12:29 ` Matwey V. Kornilov
2019-09-21 13:37 ` Simon South
1 sibling, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-21 12:29 UTC (permalink / raw)
To: u-boot
Could you try to load dtb (and check that dtb is valid) into the other
memory location?
For instance into ${kernel_addr_r} which is a place for loading EFI
application binary?
пт, 20 сент. 2019 г. в 20:44, Simon South <simon@simonsouth.net>:
>
> On 2019-09-20 1:37 p.m., Matwey V. Kornilov wrote:
> > What is the difference? In filesize?
>
> The EFI bootloader:
>
> 205136 bootaa64.efi
>
> The DTB file:
>
> 53513 rk3328-rock64.dtb
>
> It's about one quarter the size.
>
> It is strange the EFI bootloader and the kernel both seem always to load
> reliably when the DTB file doesn't.
>
> ----------
>
> => ls mmc 1 /EFI/BOOT/
> ./
> ../
> 205136 bootaa64.efi
>
> 1 file(s), 2 dir(s)
>
> => ls mmc 1 /dtb/rockchip/
> ./
> ../
> 77017 rk3399-sapphire.dtb
> 81304 rk3399-sapphire-excavator.dtb
> 78646 rk3399-rockpro64.dtb
> 77846 rk3399-rock960.dtb
> 76155 rk3399-rock-pi-4.dtb
> 77701 rk3399-roc-pc.dtb
> 78035 rk3399-puma-haikou.dtb
> 78483 rk3399-nanopi-m4.dtb
> 78791 rk3399-nanopc-t4.dtb
> 86532 rk3399-gru-scarlet-kd.dtb
> 86507 rk3399-gru-scarlet-inx.dtb
> 89522 rk3399-gru-kevin.dtb
> 85495 rk3399-gru-bob.dtb
> 80312 rk3399-firefly.dtb
> 78519 rk3399-ficus.dtb
> 68842 rk3399-evb.dtb
> 53513 rk3328-rock64.dtb
> 52150 rk3328-roc-cc.dtb
> 51134 rk3328-evb.dtb
>
> 19 file(s), 2 dir(s)
>
> =>
>
> --
> Simon South
> simon at simonsouth.net
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-21 12:29 ` Matwey V. Kornilov
@ 2019-09-21 13:37 ` Simon South
2019-09-21 17:15 ` Matwey V. Kornilov
0 siblings, 1 reply; 28+ messages in thread
From: Simon South @ 2019-09-21 13:37 UTC (permalink / raw)
To: u-boot
On 2019-09-21 8:29 a.m., Matwey V. Kornilov wrote:
> Could you try to load dtb (and check that dtb is valid) into the other
> memory location?
Same result: With the U-Boot TPL this fails (the FDT header is corrupt);
with the Rockchip TPL this works fine. See below.
I notice though it always seems to be only that one single bit (bit 7 of
the first 32-bit word loaded) that differs between the two runs.
Everything else in memory looks fine. And with the U-Boot TPL in use I
can manually set a new value for that word, and it seems to stick:
=> md ${kernel_addr_r} 2
02080000: edfe0d50 09d10000 P.......
=> fdt addr ${kernel_addr_r}
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
=> nm ${kernel_addr_r}
02080000: edfe0d50 ? edfe0dd0
02080000: edfe0dd0 ? q
=> md ${kernel_addr_r} 2
02080000: edfe0dd0 09d10000 ........
=> fdt addr ${kernel_addr_r}
=>
I wonder if this is a clue as to what's going on.
----------
U-Boot TPL:
Hit any key to stop autoboot: 0
=> print kernel_addr_r
kernel_addr_r=0x02080000
=> md ${kernel_addr_r} 20
02080000: adaaaa8a ea22286a baa0aeae aa7aa1aa ....j(".......z.
02080010: a8b200ab abaa000a a8a2aa08 aa88aaea ................
02080020: e92a00a3 2aacf8aa eaaaa8fa aaaaab88 ..*....*........
02080030: aaa8a0aa 2aa8888a 22a5e2ba 8aea4a3c .......*..."<J..
02080040: 23b188aa a28a884a 82aaaaaa 8eee8cae ...#J...........
02080050: 92aaaa4a aaa4feaa ea8a2eae eaa38b8a J...............
02080060: aee4b2a8 aaacaaba aaea8ab8 2aee982a ............*..*
02080070: aaa0aaac aaeeab9a aeae84c8 ac2e8aaa ................
=> load mmc 1 ${kernel_addr_r} /dtb/rockchip/rk3328-rock64.dtb
53513 bytes read in 10 ms (5.1 MiB/s)
=> md ${kernel_addr_r} 20
02080000: edfe0d50 09d10000 38000000 70ba0000 P..........8...p
02080010: 28000000 11000000 10000000 00000000 ...(............
02080020: 99120000 38ba0000 00000000 00000000 .......8........
02080030: 00000000 00000000 01000000 00000000 ................
02080040: 03000000 1e000000 00000000 656e6970 ............pine
02080050: 722c3436 366b636f 6f720034 68636b63 64,rock64.rockch
02080060: 722c7069 3233336b 00000038 03000000 ip,rk3328.......
02080070: 04000000 0b000000 01000000 03000000 ................
=> fdt addr ${kernel_addr_r}
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
=>
Rockchip TPL:
Hit any key to stop autoboot: 0
=> print kernel_addr_r
kernel_addr_r=0x02080000
=> md ${kernel_addr_r} 20
02080000: adaaaa9a ea23286a baa8aeae aa7aa3aa ....j(#.......z.
02080010: aaf200ab abaa080a a8b2aa88 aa88aafa ................
02080020: e92a4ca3 aafcf8aa eaaaa8fa aaaaab88 .L*.............
02080030: aaa8a0aa 2aea888b e2a5ebfa abea6abe .......*.....j..
02080040: abb188aa a29aac4a 8aaaaaaa 8eee8cae ....J...........
02080050: d2aaaace aaa4feea ea8a6ebe eaa38b8a .........n......
02080060: aee4b2a9 aaacaaba aaea8ab8 3aeeb8aa ...............:
02080070: aaa1aaae aaeeab9e aeae8ce8 ae2e8aaa ................
=> load mmc 1 ${kernel_addr_r} /dtb/rockchip/rk3328-rock64.dtb
53513 bytes read in 10 ms (5.1 MiB/s)
=> md ${kernel_addr_r} 20
02080000: edfe0dd0 09d10000 38000000 70ba0000 ...........8...p
02080010: 28000000 11000000 10000000 00000000 ...(............
02080020: 99120000 38ba0000 00000000 00000000 .......8........
02080030: 00000000 00000000 01000000 00000000 ................
02080040: 03000000 1e000000 00000000 656e6970 ............pine
02080050: 722c3436 366b636f 6f720034 68636b63 64,rock64.rockch
02080060: 722c7069 3233336b 00000038 03000000 ip,rk3328.......
02080070: 04000000 0b000000 01000000 03000000 ................
=> fdt addr ${kernel_addr_r}
=>
--
Simon South
simon at simonsouth.net
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] u-boot 2017 doesn't recognized pATA microdrive
2019-09-19 8:56 [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
` (3 preceding siblings ...)
2019-09-20 10:03 ` Mark Kettenis
@ 2019-09-21 14:26 ` Carlo Pisani
2019-09-23 12:37 ` [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
5 siblings, 0 replies; 28+ messages in thread
From: Carlo Pisani @ 2019-09-21 14:26 UTC (permalink / raw)
To: u-boot
hi
I have added the IDE support and I am able to operate with pATA
harddrives, but microdrives are not recognized ...
any help to what and where I have to investigate?
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-21 13:37 ` Simon South
@ 2019-09-21 17:15 ` Matwey V. Kornilov
2019-09-24 16:54 ` Matwey V. Kornilov
0 siblings, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-21 17:15 UTC (permalink / raw)
To: u-boot
сб, 21 сент. 2019 г. в 16:38, Simon South <simon@simonsouth.net>:
>
> On 2019-09-21 8:29 a.m., Matwey V. Kornilov wrote:
> > Could you try to load dtb (and check that dtb is valid) into the other
> > memory location?
>
> Same result: With the U-Boot TPL this fails (the FDT header is corrupt);
> with the Rockchip TPL this works fine. See below.
>
> I notice though it always seems to be only that one single bit (bit 7 of
> the first 32-bit word loaded) that differs between the two runs.
> Everything else in memory looks fine. And with the U-Boot TPL in use I
> can manually set a new value for that word, and it seems to stick:
I have no idea. Only suggestion is that something thinks that this
memory position is MMIO and then it writes 7 bit for the some purpose.
>
> => md ${kernel_addr_r} 2
> 02080000: edfe0d50 09d10000 P.......
> => fdt addr ${kernel_addr_r}
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> => nm ${kernel_addr_r}
> 02080000: edfe0d50 ? edfe0dd0
> 02080000: edfe0dd0 ? q
> => md ${kernel_addr_r} 2
> 02080000: edfe0dd0 09d10000 ........
> => fdt addr ${kernel_addr_r}
> =>
>
> I wonder if this is a clue as to what's going on.
>
> ----------
>
> U-Boot TPL:
>
> Hit any key to stop autoboot: 0
> => print kernel_addr_r
> kernel_addr_r=0x02080000
> => md ${kernel_addr_r} 20
> 02080000: adaaaa8a ea22286a baa0aeae aa7aa1aa ....j(".......z.
> 02080010: a8b200ab abaa000a a8a2aa08 aa88aaea ................
> 02080020: e92a00a3 2aacf8aa eaaaa8fa aaaaab88 ..*....*........
> 02080030: aaa8a0aa 2aa8888a 22a5e2ba 8aea4a3c .......*..."<J..
> 02080040: 23b188aa a28a884a 82aaaaaa 8eee8cae ...#J...........
> 02080050: 92aaaa4a aaa4feaa ea8a2eae eaa38b8a J...............
> 02080060: aee4b2a8 aaacaaba aaea8ab8 2aee982a ............*..*
> 02080070: aaa0aaac aaeeab9a aeae84c8 ac2e8aaa ................
> => load mmc 1 ${kernel_addr_r} /dtb/rockchip/rk3328-rock64.dtb
> 53513 bytes read in 10 ms (5.1 MiB/s)
> => md ${kernel_addr_r} 20
> 02080000: edfe0d50 09d10000 38000000 70ba0000 P..........8...p
> 02080010: 28000000 11000000 10000000 00000000 ...(............
> 02080020: 99120000 38ba0000 00000000 00000000 .......8........
> 02080030: 00000000 00000000 01000000 00000000 ................
> 02080040: 03000000 1e000000 00000000 656e6970 ............pine
> 02080050: 722c3436 366b636f 6f720034 68636b63 64,rock64.rockch
> 02080060: 722c7069 3233336b 00000038 03000000 ip,rk3328.......
> 02080070: 04000000 0b000000 01000000 03000000 ................
> => fdt addr ${kernel_addr_r}
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> =>
>
> Rockchip TPL:
>
> Hit any key to stop autoboot: 0
> => print kernel_addr_r
> kernel_addr_r=0x02080000
> => md ${kernel_addr_r} 20
> 02080000: adaaaa9a ea23286a baa8aeae aa7aa3aa ....j(#.......z.
> 02080010: aaf200ab abaa080a a8b2aa88 aa88aafa ................
> 02080020: e92a4ca3 aafcf8aa eaaaa8fa aaaaab88 .L*.............
> 02080030: aaa8a0aa 2aea888b e2a5ebfa abea6abe .......*.....j..
> 02080040: abb188aa a29aac4a 8aaaaaaa 8eee8cae ....J...........
> 02080050: d2aaaace aaa4feea ea8a6ebe eaa38b8a .........n......
> 02080060: aee4b2a9 aaacaaba aaea8ab8 3aeeb8aa ...............:
> 02080070: aaa1aaae aaeeab9e aeae8ce8 ae2e8aaa ................
> => load mmc 1 ${kernel_addr_r} /dtb/rockchip/rk3328-rock64.dtb
> 53513 bytes read in 10 ms (5.1 MiB/s)
> => md ${kernel_addr_r} 20
> 02080000: edfe0dd0 09d10000 38000000 70ba0000 ...........8...p
> 02080010: 28000000 11000000 10000000 00000000 ...(............
> 02080020: 99120000 38ba0000 00000000 00000000 .......8........
> 02080030: 00000000 00000000 01000000 00000000 ................
> 02080040: 03000000 1e000000 00000000 656e6970 ............pine
> 02080050: 722c3436 366b636f 6f720034 68636b63 64,rock64.rockch
> 02080060: 722c7069 3233336b 00000038 03000000 ip,rk3328.......
> 02080070: 04000000 0b000000 01000000 03000000 ................
> => fdt addr ${kernel_addr_r}
> =>
>
> --
> Simon South
> simon at simonsouth.net
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-19 8:56 [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
` (4 preceding siblings ...)
2019-09-21 14:26 ` [U-Boot] u-boot 2017 doesn't recognized pATA microdrive Carlo Pisani
@ 2019-09-23 12:37 ` Simon South
5 siblings, 0 replies; 28+ messages in thread
From: Simon South @ 2019-09-23 12:37 UTC (permalink / raw)
To: u-boot
On 2019-09-19 4:56 a.m., Simon South wrote:
> I've been unable so far to boot NetBSD on my PINE64 ROCK64 (v2.0,
> Rockchip RK3328) using U-Boot built with its own TPL...
This definitely seems memory-related: After enabling the "mtest" command
(patch attached) and running the memory test at the U-Boot shell I see
all kinds of errors:
Testing 02000000 ... 03ffffff:
Iteration: 1
FAILURE (read/write) @ 0x020014c0: expected 0x00000299, actual
0x00000219)
FAILURE (read/write) @ 0x02001580: expected 0x000002b1, actual
0x00000231)
FAILURE (read/write) @ 0x02001680: expected 0x000002d1, actual
0x00000251)
FAILURE (read/write) @ 0x02001e40: expected 0x000003c9, actual
0x00000349)
...
Using the Rockchip TPL instead the memory test runs fine.
Is anyone else able to reproduce this?
My guess is the supplied configuration parameters (in
arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi) for the RK3328's SDRAM
controller aren't a match for the SpecTek LPDDR3 module on the 4GB
ROCK64. (The Rockchip TPL seems to apply a different configuration, but
also claims to drive the memory at only 333MHz.)
Assuming I'm on the right track here, what's the likelihood I'd be able
to determine from the SpecTek datasheet how the SDRAM controller's
configuration should be tweaked to get this working?
--
Simon South
simon at simonsouth.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rock64-enable-mtest.patch
Type: text/x-patch
Size: 837 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190923/e19d9d5b/attachment.bin>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-21 17:15 ` Matwey V. Kornilov
@ 2019-09-24 16:54 ` Matwey V. Kornilov
2019-09-24 17:54 ` Simon South
0 siblings, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-24 16:54 UTC (permalink / raw)
To: u-boot
Simon, maybe you'll describe a way to obtain SD card image which you
use? For the case if anybody wants to reproduce the issue in situ?
сб, 21 сент. 2019 г. в 20:15, Matwey V. Kornilov <matwey.kornilov@gmail.com>:
>
> сб, 21 сент. 2019 г. в 16:38, Simon South <simon@simonsouth.net>:
> >
> > On 2019-09-21 8:29 a.m., Matwey V. Kornilov wrote:
> > > Could you try to load dtb (and check that dtb is valid) into the other
> > > memory location?
> >
> > Same result: With the U-Boot TPL this fails (the FDT header is corrupt);
> > with the Rockchip TPL this works fine. See below.
> >
> > I notice though it always seems to be only that one single bit (bit 7 of
> > the first 32-bit word loaded) that differs between the two runs.
> > Everything else in memory looks fine. And with the U-Boot TPL in use I
> > can manually set a new value for that word, and it seems to stick:
>
> I have no idea. Only suggestion is that something thinks that this
> memory position is MMIO and then it writes 7 bit for the some purpose.
>
> >
> > => md ${kernel_addr_r} 2
> > 02080000: edfe0d50 09d10000 P.......
> > => fdt addr ${kernel_addr_r}
> > libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> > => nm ${kernel_addr_r}
> > 02080000: edfe0d50 ? edfe0dd0
> > 02080000: edfe0dd0 ? q
> > => md ${kernel_addr_r} 2
> > 02080000: edfe0dd0 09d10000 ........
> > => fdt addr ${kernel_addr_r}
> > =>
> >
> > I wonder if this is a clue as to what's going on.
> >
> > ----------
> >
> > U-Boot TPL:
> >
> > Hit any key to stop autoboot: 0
> > => print kernel_addr_r
> > kernel_addr_r=0x02080000
> > => md ${kernel_addr_r} 20
> > 02080000: adaaaa8a ea22286a baa0aeae aa7aa1aa ....j(".......z.
> > 02080010: a8b200ab abaa000a a8a2aa08 aa88aaea ................
> > 02080020: e92a00a3 2aacf8aa eaaaa8fa aaaaab88 ..*....*........
> > 02080030: aaa8a0aa 2aa8888a 22a5e2ba 8aea4a3c .......*..."<J..
> > 02080040: 23b188aa a28a884a 82aaaaaa 8eee8cae ...#J...........
> > 02080050: 92aaaa4a aaa4feaa ea8a2eae eaa38b8a J...............
> > 02080060: aee4b2a8 aaacaaba aaea8ab8 2aee982a ............*..*
> > 02080070: aaa0aaac aaeeab9a aeae84c8 ac2e8aaa ................
> > => load mmc 1 ${kernel_addr_r} /dtb/rockchip/rk3328-rock64.dtb
> > 53513 bytes read in 10 ms (5.1 MiB/s)
> > => md ${kernel_addr_r} 20
> > 02080000: edfe0d50 09d10000 38000000 70ba0000 P..........8...p
> > 02080010: 28000000 11000000 10000000 00000000 ...(............
> > 02080020: 99120000 38ba0000 00000000 00000000 .......8........
> > 02080030: 00000000 00000000 01000000 00000000 ................
> > 02080040: 03000000 1e000000 00000000 656e6970 ............pine
> > 02080050: 722c3436 366b636f 6f720034 68636b63 64,rock64.rockch
> > 02080060: 722c7069 3233336b 00000038 03000000 ip,rk3328.......
> > 02080070: 04000000 0b000000 01000000 03000000 ................
> > => fdt addr ${kernel_addr_r}
> > libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> > =>
> >
> > Rockchip TPL:
> >
> > Hit any key to stop autoboot: 0
> > => print kernel_addr_r
> > kernel_addr_r=0x02080000
> > => md ${kernel_addr_r} 20
> > 02080000: adaaaa9a ea23286a baa8aeae aa7aa3aa ....j(#.......z.
> > 02080010: aaf200ab abaa080a a8b2aa88 aa88aafa ................
> > 02080020: e92a4ca3 aafcf8aa eaaaa8fa aaaaab88 .L*.............
> > 02080030: aaa8a0aa 2aea888b e2a5ebfa abea6abe .......*.....j..
> > 02080040: abb188aa a29aac4a 8aaaaaaa 8eee8cae ....J...........
> > 02080050: d2aaaace aaa4feea ea8a6ebe eaa38b8a .........n......
> > 02080060: aee4b2a9 aaacaaba aaea8ab8 3aeeb8aa ...............:
> > 02080070: aaa1aaae aaeeab9e aeae8ce8 ae2e8aaa ................
> > => load mmc 1 ${kernel_addr_r} /dtb/rockchip/rk3328-rock64.dtb
> > 53513 bytes read in 10 ms (5.1 MiB/s)
> > => md ${kernel_addr_r} 20
> > 02080000: edfe0dd0 09d10000 38000000 70ba0000 ...........8...p
> > 02080010: 28000000 11000000 10000000 00000000 ...(............
> > 02080020: 99120000 38ba0000 00000000 00000000 .......8........
> > 02080030: 00000000 00000000 01000000 00000000 ................
> > 02080040: 03000000 1e000000 00000000 656e6970 ............pine
> > 02080050: 722c3436 366b636f 6f720034 68636b63 64,rock64.rockch
> > 02080060: 722c7069 3233336b 00000038 03000000 ip,rk3328.......
> > 02080070: 04000000 0b000000 01000000 03000000 ................
> > => fdt addr ${kernel_addr_r}
> > =>
> >
> > --
> > Simon South
> > simon at simonsouth.net
>
>
>
> --
> With best regards,
> Matwey V. Kornilov
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-24 16:54 ` Matwey V. Kornilov
@ 2019-09-24 17:54 ` Simon South
2019-09-24 18:35 ` Matwey V. Kornilov
0 siblings, 1 reply; 28+ messages in thread
From: Simon South @ 2019-09-24 17:54 UTC (permalink / raw)
To: u-boot
On 2019-09-24 12:54 p.m., Matwey V. Kornilov wrote:
> Simon, maybe you'll describe a way to obtain SD card image which you
> use? For the case if anybody wants to reproduce the issue in situ?
Sure---I'd love for other people to test this, and it's pretty easy
since it doesn't require anything other than U-Boot itself.
Assuming the CROSS_COMPILE and BL31 environment variables are set up
appropriately (I'm using ATF 2.1 from the mainline repository):
1. Switch to U-Boot's master branch and/or configure the source tree
identically to my own with
git checkout a9fa70b7b7167487affc5d919e541872c99e814b
2. Apply the attached patch, which enables the "mtest" command, with
patch -p1 < rock64-enable-mtest.patch
3. Build U-Boot as usual:
make distclean; rm -f ./idbloader.img
make rock64-rk3328_defconfig all u-boot.itb
4. Write U-Boot to a microSD card as usual:
sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64
sudo dd if=u-boot.itb of=/dev/mmcblk0 seek=16384
5. Place the microSD card in the ROCK64 and start it. Once the SPL
loads, hit the spacebar to enter the shell and start the memory test with
mtest
On my ROCK64, this immediately begins throwing off errors like
FAILURE (read/write) @ 0x020014c0: expected 0x00000299, actual
0x00000219)
and if I continue the boot process with "boot", the NetBSD kernel will
load but panic almost immediately.
Note mine is a ROCK64 v2.0 with a 32Gb SpecTek LPDDR3 memory
module---there is also a ROCK64 v3.0 and some variance in the memory
chips used, so it could be this is limited to a specific model or
production run.
Now here's what I've discovered lately:
Everything works normally if I have U-Boot TPL's set a slightly lower
clock rate for the memory, by editing
arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi and changing the "800" on
line 27 to "766".
That suggests a hardware issue with my ROCK64, and in fact others have
reported similar problems with the 2.0 version [1]. I'd be willing to
leave it at that, except that if I also patch the (333MHz) Rockchip TPL
to set a _higher_ clock rate for the memory, it continues to work just
fine---all the way up to 933MHz!
So this is not just a hardware problem; there is some incompatibility
between the RK3328 SDRAM driver as it exists in U-Boot and at least one
group of ROCK64s in the world.
At the moment I'm still trying to identify what's different in the
closed-source loader that causes it not to have this issue. Anyone have
any thoughts?
[1] https://forum.pine64.org/showthread.php?tid=7387
--
Simon South
simon@simonsouth.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rock64-enable-mtest.patch
Type: text/x-patch
Size: 837 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190924/cf8ba68b/attachment.bin>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-24 17:54 ` Simon South
@ 2019-09-24 18:35 ` Matwey V. Kornilov
2019-09-24 18:50 ` Simon South
0 siblings, 1 reply; 28+ messages in thread
From: Matwey V. Kornilov @ 2019-09-24 18:35 UTC (permalink / raw)
To: u-boot
24.09.2019 20:54, Simon South пишет:
> On 2019-09-24 12:54 p.m., Matwey V. Kornilov wrote:
>> Simon, maybe you'll describe a way to obtain SD card image which you
>> use? For the case if anybody wants to reproduce the issue in situ?
>
> Sure---I'd love for other people to test this, and it's pretty easy
> since it doesn't require anything other than U-Boot itself.
>
> Assuming the CROSS_COMPILE and BL31 environment variables are set up
> appropriately (I'm using ATF 2.1 from the mainline repository):
>
> 1. Switch to U-Boot's master branch and/or configure the source tree
> identically to my own with
>
> git checkout a9fa70b7b7167487affc5d919e541872c99e814b
>
> 2. Apply the attached patch, which enables the "mtest" command, with
>
> patch -p1 < rock64-enable-mtest.patch
>
> 3. Build U-Boot as usual:
>
> make distclean; rm -f ./idbloader.img
> make rock64-rk3328_defconfig all u-boot.itb
>
> 4. Write U-Boot to a microSD card as usual:
>
> sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64
> sudo dd if=u-boot.itb of=/dev/mmcblk0 seek=16384
>
> 5. Place the microSD card in the ROCK64 and start it. Once the SPL
> loads, hit the spacebar to enter the shell and start the memory test with
>
> mtest
>
> On my ROCK64, this immediately begins throwing off errors like
>
> FAILURE (read/write) @ 0x020014c0: expected 0x00000299, actual
> 0x00000219)
>
> and if I continue the boot process with "boot", the NetBSD kernel will
> load but panic almost immediately.
How do you take NetBSD image?
>
> Note mine is a ROCK64 v2.0 with a 32Gb SpecTek LPDDR3 memory
> module---there is also a ROCK64 v3.0 and some variance in the memory
> chips used, so it could be this is limited to a specific model or
> production run.
>
> Now here's what I've discovered lately:
>
> Everything works normally if I have U-Boot TPL's set a slightly lower
> clock rate for the memory, by editing
> arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi and changing the "800" on
> line 27 to "766".
>
> That suggests a hardware issue with my ROCK64, and in fact others have
> reported similar problems with the 2.0 version [1]. I'd be willing to
> leave it at that, except that if I also patch the (333MHz) Rockchip TPL
> to set a _higher_ clock rate for the memory, it continues to work just
> fine---all the way up to 933MHz!
>
> So this is not just a hardware problem; there is some incompatibility
> between the RK3328 SDRAM driver as it exists in U-Boot and at least one
> group of ROCK64s in the world.
>
> At the moment I'm still trying to identify what's different in the
> closed-source loader that causes it not to have this issue. Anyone have
> any thoughts?
>
> [1] https://forum.pine64.org/showthread.php?tid=7387
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [U-Boot] ROCK64 fails to boot using U-Boot TPL
2019-09-24 18:35 ` Matwey V. Kornilov
@ 2019-09-24 18:50 ` Simon South
0 siblings, 0 replies; 28+ messages in thread
From: Simon South @ 2019-09-24 18:50 UTC (permalink / raw)
To: u-boot
On 2019-09-24 2:35 p.m., Matwey V. Kornilov wrote> How do you take
NetBSD image?
I've been building my own images from NetBSD-CURRENT, following the
guides [1][2].
There was until recently a buffer-alignment issue in NetBSD's EFI
bootloader that prevented it from working with the current version of
U-Boot, but a fix has been committed so something like the following
should now work, without patching:
cd /usr/src # or $HOME/netbsd/usr/src, etc.
cvs update -A -dP -C -D '20190922 1140Z'
./build.sh -U -u -m evbarm64 release
Then write the resulting image to a microSD card with
zcat obj/releasedir/evbarm/binary/gzimg/arm64.img.gz | sudo dd
bs=32768 of=/dev/mmcblk0 skip=512 seek=512
and build and install U-Boot as in my previous email.
[1] https://netbsd.org/docs/current/index.html
[2] https://netbsd.org/docs/guide/en/chap-build.html
--
Simon South
simon at simonsouth.net
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2019-09-24 18:50 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 8:56 [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
2019-09-19 15:48 ` Matwey V. Kornilov
2019-09-20 0:06 ` Simon South
2019-09-20 7:39 ` Matwey V. Kornilov
2019-09-20 9:28 ` Simon South
2019-09-20 10:07 ` Matwey V. Kornilov
2019-09-20 10:14 ` Martin Husemann
2019-09-20 16:43 ` Matwey V. Kornilov
2019-09-20 17:27 ` Simon South
2019-09-20 17:37 ` Matwey V. Kornilov
2019-09-20 17:43 ` Simon South
2019-09-21 7:47 ` Matwey V. Kornilov
2019-09-21 11:59 ` Simon South
2019-09-21 12:29 ` Matwey V. Kornilov
2019-09-21 13:37 ` Simon South
2019-09-21 17:15 ` Matwey V. Kornilov
2019-09-24 16:54 ` Matwey V. Kornilov
2019-09-24 17:54 ` Simon South
2019-09-24 18:35 ` Matwey V. Kornilov
2019-09-24 18:50 ` Simon South
2019-09-20 18:09 ` Simon South
2019-09-19 16:29 ` Jagan Teki
2019-09-20 0:10 ` Simon South
2019-09-19 16:49 ` Matwey V. Kornilov
2019-09-20 10:03 ` Mark Kettenis
2019-09-20 10:22 ` Simon South
2019-09-21 14:26 ` [U-Boot] u-boot 2017 doesn't recognized pATA microdrive Carlo Pisani
2019-09-23 12:37 ` [U-Boot] ROCK64 fails to boot using U-Boot TPL Simon South
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.