> From: Kurt Miller <k...@intricatesoftware.com>
> Date: Mon, 07 Oct 2019 16:45:43 -0400
> 
> On Tue, 2019-10-08 at 02:25 +1100, Jonathan Gray wrote:
> > On Mon, Oct 07, 2019 at 10:33:27AM -0400, Kurt Miller wrote:
> > > 
> > > On Mon, 2019-10-07 at 13:35 +1100, Jonathan Gray wrote:
> > > > 
> > > > On Sun, Oct 06, 2019 at 09:51:20PM -0400, Kurt Miller wrote:
> > > > > 
> > > > > 
> > > > > On Sun, 2019-10-06 at 18:47 +0200, Mark Kettenis wrote:
> > > > > > 
> > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Date: Sun, 6 Oct 2019 11:42:03 +1100
> > > > > > > From: Jonathan Gray <j...@jsg.id.au>
> > > > > > > 
> > > > > > > On Sat, Oct 05, 2019 at 12:20:57PM -0400, 
> > > > > > > k...@intricatesoftware.com wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Various rockchip u-boot 2019.10rc4 aarch64 improvements:
> > > > > > > > * u-boot.itb is included in the all target for rockpro64 and
> > > > > > > >   firefly-rk3399 so remove duplicate make for it.
> > > > > > > > * Build rock64-rk3328, except exclude idbloader.img which is 
> > > > > > > > broken.
> > > > > > > > * Install u-boot-spl-dtb.bin and mkimage for rock64, rockpro64 
> > > > > > > > and
> > > > > > > >   firefly-rk3399 so that idbloader.img can be created using 
> > > > > > > > rkbin TPL
> > > > > > > >   layer.
> > > > > > > > * Provide a script to make idbloader.img from rkbin's TPL layer.
> > > > > > > > * For rockpro64 backport PCIe support from 5.3 dtb.
> > > > > > > > * For rock64 backport most 4.20 dtb components and additional 
> > > > > > > > bug
> > > > > > > >   fixes.
> > > > > > > > 
> > > > > > > > For rockpro64, I no longer need to have an updated dtb installed
> > > > > > > > in the i partition for PCIe to work. Although I am using the
> > > > > > > > rkbin TPL layer because the u-boot one doesn't recognize half
> > > > > > > > of my memory (other versions of this board dont have this 
> > > > > > > > problem).
> > > > > > > > 
> > > > > > > > For rock64 the dtb updates corrects the clock bindings so an
> > > > > > > > updated dtb is not needed in the i partition as well. However,
> > > > > > > > u-boot's TPL layer isn't working yet so the following steps
> > > > > > > > are needed to create a usable idbloader.img on a uSD for
> > > > > > > > install with miniroot66.fs:
> > > > > > > > 
> > > > > > > > /usr/local/libexec/u-boot/mkidbloader-rkbin rock64-rk3328
> > > > > > > > dd if=miniroot66.fs of=/dev/<uSD> bs=1m
> > > > > > > > dd if=idbloader.img of=/dev/<uSD> bs=512 seek=64 conv=sync
> > > > > > > > dd if=/usr/local/share/u-boot/rock64-rk3328/u-boot.itb \
> > > > > > > >    of=/dev/<uSD> bs=512 seek=16384 conv=sync
> > > > > > > > 
> > > > > > > > One of the downsides of installing mkimage is the removal of
> > > > > > > > PKG_ARCH=*, but we get better support for both rock64 and
> > > > > > > > rockpro64 for where rkbin is still needed. I'm not sure how
> > > > > > > > well firefly works with the the u-boot TPL layer so it may
> > > > > > > > benefit from the ability to build idbloader.img with the
> > > > > > > > rkbin TPL layer as well.
> > > > > > > > 
> > > > > > > > Thoughts?
> > > > > > > Dropping PKG_ARCH=* isn't something we should do in my opinion.  
> > > > > > > For
> > > > > > > example arm package snapshots seem to be made every few months 
> > > > > > > and with
> > > > > > > U-Boot 2019.10 final planned for Monday US time there wouldn't be 
> > > > > > > a
> > > > > > > package available for arm in time for the final release build.
> > > > > > > 
> > > > > > > I think for now you should drop the rk3328/mkimage parts and keep 
> > > > > > > the
> > > > > > > rockpro64 dtb change.
> > > > > > Simon South just posted two patches to the U-Boot mailing list that
> > > > > > apparently fixes ro rock64 issues.  That removes the need to use the
> > > > > > propriatary Rockchip loader in favour of U-Boot TPL.
> > > > > I've adjusted the u-boot changes to address dropping PKG_ARCH=*
> > > > > and incorporated Simon South's changes to see if the Rock64
> > > > > will work with u-boot's TPL layer. Please see the attached diff
> > > > > for review.
> > > > This looks good but it isn't clear to me what the 3328 dts files
> > > > (rk3328.dtsi rk3328-rock64.dts) are synced against?
> > > > 
> > > > There is quite a difference in rk3328.dtsi rk3328-rock64.dts and
> > > > linux 5.3.  The other files have no or expected diffs to 5.3.
> > > > 
> > > For rk3328.dtsi I synced to 4.20, but the following headers were
> > > not yet in u-boot so I left out components related to them:
> > > 
> > > #include <dt-bindings/power/rk3328-power.h>
> > > #include <dt-bindings/soc/rockchip,boot-mode.h>
> > > #include <dt-bindings/thermal/thermal.h>
> > > 
> > > I needed to keep the mmc[0-2] aliases because rk3328-evb.dts
> > > referred to them.
> > > 
> > > For rk3328-rock64.dts I synced to 4.20 but I noticed that
> > > the usb3 entry was later removed as well as some future bug fixes:
> > > 
> > > https://github.com/torvalds/linux/commit/26e2d7b03ea7ff254bf78305aa44dda62e70b78e
> > > https://github.com/torvalds/linux/commit/9301d28dccd05bbcea0e69c382886d6a8b8e6bc2
> > > 
> > > I removed vcc-host1-5v-regulator when doing that since it
> > > wasn't referenced and not configured.
> > > 
> > > Please let me know if you would like a different approach.
> > Thanks for the explanation.  So the baud changes should be the only
> > thing to keep if/when U-Boot resyncs with linux.
> > 
> 
> kettenis@ felt that given how far behind u-boot is with rk3328 dtb,
> the partial updates of rk3328.dtsi & rk3328-rock64.dts was not a good
> idea. However, updating the clock definitions in the rk3328-cru.h
> header are helpful. Attached is an updated diff for consideration
> which removes the partial update of the rk3328 dtb files.
> 
> okay?

ok kettenis@

> Here are the boot message on Rock64 with the attach version from
> Klaus Küchemann:
> 
> U-Boot TPL 2019.10-rc4 (Oct 06 2019 - 17:11:49)
> LPDDR3
> Trying to boot from BOOTROM
> Returning to boot ROM...
> 
> U-Boot SPL 2019.10-rc4 (Oct 06 2019 - 17:11:49 -0400)
> Trying to boot from MMC1
> dwmmc@ff520000 - probe failed: -22
> NOTICE:  BL31: v2.1(debug):2.1
> NOTICE:  BL31: Built : 10:16:27, Sep 27 2019
> ERROR:   over or zero region, nr=4187432, max=10
> NOTICE:  BL31:Rockchip release version: v1.2
> INFO:    ARM GICv2 driver initialized
> INFO:    plat_rockchip_pmu_init: pd status 0xe
> INFO:    BL31: Initializing runtime services
> WARNING: BL31: cortex_a53: CPU workaround for 819472 was missing!
> WARNING: BL31: cortex_a53: CPU workaround for 824069 was missing!
> WARNING: BL31: cortex_a53: CPU workaround for 827319 was missing!
> WARNING: BL31: cortex_a53: CPU workaround for 855873 was missing!
> INFO:    BL31: Preparing for EL3 exit to normal world
> INFO:    Entry point address = 0x200000
> INFO:    SPSR = 0x3c9
> 
> 
> U-Boot 2019.10-rc4 (Oct 06 2019 - 17:11:49 -0400)
> 
> Model: Pine64 Rock64
> DRAM:  4 GiB
> MMC:   dwmmc@ff520000 - probe failed: -22
> dwmmc@ff500000: 1
> Loading Environment from MMC... *** Warning - bad CRC, using default 
> environment
> 
> In:    serial@ff130000
> Out:   serial@ff130000
> Err:   serial@ff130000
> Model: Pine64 Rock64
> Net:
> Warning: ethernet@ff540000 (eth0) using random MAC address - de:5a:74:12:d0:ce
> eth0: ethernet@ff540000
> Hit any key to stop autoboot:  0
> no mmc device at slot 0
> switch to partitions #0, OK
> mmc1 is current device
> Scanning mmc 1:1...
> Found EFI removable media binary efi/boot/bootaa64.efi
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> Scanning disk dw...@ff500000.blk...
> Scanning disk dw...@ff520000.blk...
> Disk dw...@ff520000.blk not ready
> Found 3 disks
> BootOrder not defined
> EFI boot manager: Cannot load any image
> 161090 bytes read in 13 ms (11.8 MiB/s)
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> disks: sd0*
> >> OpenBSD/arm64 BOOTAA64 0.19
> boot>
> cannot open sd0a:/etc/random.seed: No such file or directory
> booting sd0a:/bsd: 2228316+623504+8769504+741040 
> [221760+109+519552+200640]=0xf0
> type 0x2 pa 0x200000 va 0x200000 pages 0x4000 attr 0x8
> type 0x7 pa 0x4200000 va 0x4200000 pages 0x3ef2 attr 0x8
> type 0x4 pa 0x80f2000 va 0x80f2000 pages 0x1c attr 0x8
> type 0x7 pa 0x810e000 va 0x810e000 pages 0xf30a8 attr 0x8
> type 0x2 pa 0xfb1b6000 va 0xfb1b6000 pages 0xc34 attr 0x8
> type 0x4 pa 0xfbdea000 va 0xfbdea000 pages 0x1 attr 0x8
> type 0x2 pa 0xfbdeb000 va 0xfbdeb000 pages 0x3 attr 0x8
> type 0x7 pa 0xfbdee000 va 0xfbdee000 pages 0x1 attr 0x8
> type 0x2 pa 0xfbdef000 va 0xfbdef000 pages 0x100 attr 0x8
> type 0x1 pa 0xfbeef000 va 0xfbeef000 pages 0x28 attr 0x8
> type 0x0 pa 0xfbf17000 va 0xfbf17000 pages 0x7 attr 0x8
> type 0x4 pa 0xfbf1e000 va 0xfbf1e000 pages 0x1 attr 0x8
> type 0x6 pa 0xfbf1f000 va 0x3e024be000 pages 0x1 attr 0x8000000000000008
> type 0x4 pa 0xfbf20000 va 0xfbf20000 pages 0x2 attr 0x8
> type 0x0 pa 0xfbf22000 va 0xfbf22000 pages 0x4 attr 0x8
> type 0x4 pa 0xfbf26000 va 0xfbf26000 pages 0x2 attr 0x8
> type 0x6 pa 0xfbf28000 va 0x3e024c7000 pages 0x1 attr 0x8000000000000008
> type 0x2 pa 0xfbf29000 va 0xfbf29000 pages 0x3007 attr 0x8
> type 0x5 pa 0xfef30000 va 0x3e054cf000 pages 0x10 attr 0x8000000000000008
> type 0x2 pa 0xfef40000 va 0xfef40000 pages 0xc0 attr 0x8
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>         The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org
> 
> OpenBSD 6.6 (RAMDISK) #247: Sun Oct  6 13:06:15 MDT 2019
>     dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/RAMDISK
> real mem  = 4210663424 (4015MB)
> avail mem = 4004032512 (3818MB)
> mainbus0 at root: Pine64 Rock64
> cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
> cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
> cpu0: 256KB 64b/line 16-way L2 cache
> efi0 at mainbus0: UEFI 2.8
> efi0: Das U-Boot rev 0x20191000
> psci0 at mainbus0: PSCI 1.1, SMCCC 1.1
> syscon0 at mainbus0: "syscon"
> "io-domains" at syscon0 not configured
> "grf-gpio" at syscon0 not configured
> rkclock0 at mainbus0
> syscon1 at mainbus0: "syscon"
> "usb2-phy" at syscon1 not configured
> ampintc0 at mainbus0 nirq 160, ncpu 4: "interrupt-controller"
> rkpinctrl0 at mainbus0: "pinctrl"
> rkgpio0 at rkpinctrl0
> rkgpio1 at rkpinctrl0
> rkgpio2 at rkpinctrl0
> rkgpio3 at rkpinctrl0
> "fit-images" at mainbus0 not configured
> "opp_table0" at mainbus0 not configured
> simplebus0 at mainbus0: "amba"
> "dmac" at simplebus0 not configured
> "arm-pmu" at mainbus0 not configured
> "display-subsystem" at mainbus0 not configured
> agtimer0 at mainbus0: tick rate 24000 KHz
> "xin24m" at mainbus0 not configured
> "spdif" at mainbus0 not configured
> com0 at mainbus0: ns16550, no working fifo
> com0: console
> rkiic0 at mainbus0
> iic0 at rkiic0
> rkpmic0 at iic0 addr 0x18: RK805
> "spi" at mainbus0 not configured
> "watchdog" at mainbus0 not configured
> "tsadc" at mainbus0 not configured
> "efuse" at mainbus0 not configured
> "gpu" at mainbus0 not configured
> "vop" at mainbus0 not configured
> "iommu" at mainbus0 not configured
> "hdmi" at mainbus0 not configured
> "phy" at mainbus0 not configured
> dwmmc0 at mainbus0: 50 MHz base clock
> sdmmc0 at dwmmc0: 4-bit, sd high-speed, mmc high-speed, dma
> dwmmc1 at mainbus0: 50 MHz base clock
> sdmmc1 at dwmmc1: 8-bit, mmc high-speed, dma
> dwge0 at mainbus0: address de:5a:74:12:d0:ce
> rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 6
> "usb" at mainbus0 not configured
> ehci0 at mainbus0
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 
> 2.00/1.001
> ohci0 at mainbus0: version 1.0
> "external-gmac-clock" at mainbus0 not configured
> "sdmmc-regulator" at mainbus0 not configured
> "vcc-host-5v-regulator" at mainbus0 not configured
> "vcc-sys" at mainbus0 not configured
> "sound" at mainbus0 not configured
> "spdif-dit" at mainbus0 not configured
> "dmc" at mainbus0 not configured
> "usb" at mainbus0 not configured
> usb1 at ohci0: USB revision 1.0
> uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 
> 1.00/1.001
> scsibus0 at sdmmc0: 2 targets, initiator 0
> sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC16G, 0080> removable
> sd0: 15193MB, 512 bytes/sector, 31116288 sectors
> sdmmc1: can't enable card
> softraid0 at root
> scsibus1 at softraid0: 256 targets
> bootfile: sd0a:/bsd
> boot device: sd0
> root on rd0a swap on rd0b dump on rd0b
> erase ^?, werase ^W, kill ^U, intr ^C, status ^T
> 
> Welcome to the OpenBSD/arm64 6.6 installation program.
> (I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
> 
> [2:text/plain Show Save:u-boot-rockchip_v3.txt (14kB)]
> 

Reply via email to