RockPro64 dmesg/hang

2019-08-16 Thread J Sisson
Picked up a RockPro64 and I'm toying around with getting OpenBSD
installed.  After picking up a SanDisk SD card (could not get any of
my PNY cards to boot properly), I have the board getting as far as:

root on rd0a swap on rd0b dump on rd0b
WARNING: clock gained 40474 days
WARNING: CHECK AND RESET THE DATE!

The dtb from https://github.com/jasperla/openbsd-rockpro64 is on the
sd card, and the output shows it being read (complete output below).

I did try booting via bootp at one point, but it keeps acting like the
dtb isn't present (per jasperla instructions above).

Any ideas or suggestions?

serial output with dmesg:

DDR Version 1.19 20190305
In
channel 0
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 400MHz 0,1
channel 0
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 1
CS = 0
MR0=0xB8
MR4=0x1
MR5=0xFF
MR8=0x10
MR12=0x72
MR14=0x72
MR18=0x0
MR19=0x0
MR24=0x8
MR25=0x0
channel 0 training pass!
channel 1 training pass!
change freq to 800MHz 1,0
Channel 0: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
Channel 1: LPDDR4,800MHz
Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x40
ch 1 ddrconfig = 0x101, ddrsize = 0x40
pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD
OUT
U-Boot SPL board init

U-Boot SPL 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:34)
booted from SPI flash
Trying to boot from SPI
NOTICE:  BL31: v1.3(debug):370ab80
NOTICE:  BL31: Built : 09:23:41, Mar  4 2019
NOTICE:  BL31: Rockchip release version: v1.1
INFO:GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:Using opteed sec cpu_context!
INFO:boot cpu mask: 0
INFO:plat_rockchip_pmu_init(1181): pd status 3e
INFO:BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without
OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:BL31: Preparing for EL3 exit to normal world
INFO:Entry point address = 0x20
INFO:SPSR = 0x3c9


U-Boot 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:49 +)

Model: Pine64 RockPro64
DRAM:  3.9 GiB
DCDC_REG1@vdd_center: ; enabling
DCDC_REG2@vdd_cpu_l: ; enabling
DCDC_REG3@vcc_ddr: ; enabling (ret: -38)
DCDC_REG4@vcc_1v8: set 180 uV; enabling
LDO_REG1@vcc1v8_dvp: set 180 uV; enabling
LDO_REG2@vcc3v0_touch: set 300 uV; enabling
LDO_REG3@vcc1v8_pmu: set 180 uV; enabling
LDO_REG4@vcc_sd: set 330 uV; enabling
LDO_REG5@vcca3v0_codec: set 300 uV; enabling
LDO_REG6@vcc_1v5: set 150 uV; enabling
LDO_REG7@vcca1v8_codec: set 180 uV; enabling
LDO_REG8@vcc_3v0: set 300 uV; enabling
SWITCH_REG1@vcc3v3_s3: ; enabling (ret: -38)
SWITCH_REG2@vcc3v3_s0: ; enabling (ret: -38)
vcc1v8-s0@vcc1v8_s0: set 180 uV; enabling (ret: -38)
dc-12v@dc_12v: set 1200 uV; enabling (ret: -38)
vcc-sys@vcc_sys: set 500 uV; enabling (ret: -38)
vcc3v3-sys@vcc3v3_sys: set 330 uV; enabling (ret: -38)
vcc-phy-regulator@vcc_phy: ; enabling (ret: -38)
vdd-log@vdd_log: ; enabling (ret: -38)
MMC:   sdhci@fe33: 0, dwmmc@fe32: 1
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:serial@ff1a
Out:   serial@ff1a
Err:   serial@ff1a
Model: Pine64 RockPro64
Net:   eth0: ethernet@fe30
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
mmc_init: -95, time 20
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
reading /dtb/rockchip/rk3399-rockpro64.dtb
63046 bytes read in 11 ms (5.5 MiB/s)
Found EFI removable media binary efi/boot/bootaa64.efi
reading efi/boot/bootaa64.efi
161090 bytes read in 22 ms (7 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 0200 ...
Card did not respond to voltage select!
mmc_init: -95, time 20
Scanning disk sd...@fe33.blk...
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)
Scanning disk dw...@fe32.blk...
Found 2 disks
disks: sd0* sd1
>> OpenBSD/arm64 BOOTAA64 0.19
boot>
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 2193996+619260+8747640+741504
[220743+109+511728+198149]=0xff0268
type 0x2 pa 0x20 va 0x20 pages 0x4000 attr 0x8
type 0x7 pa 0x420 va 0x20 pages 0x4000 attr 0x8
type 0x4 pa 0x820 va 0x820 pages 0xc attr 0x8
type 0x7 pa 0x820d000 va 0x20 pages 0xebfa4 attr 0x8
type 0x2 pa 0xf41b1000 va 0xf41b1000 pages 0x4 attr 0x8
type 0x2 pa 0xf41b5000 va 0xf41b5000 pages 0x4 attr 0x8
type 0x2 pa 0xf41b

Re: RockPro64 dmesg/hang

2019-08-16 Thread J Sisson
Apologies.  Found the issue:

$ file /tmp/rk3399-rockpro64.dtb
/tmp/rk3399-rockpro64.dtb: Non-ISO extended-ASCII HTML document text

Downloaded another copy and now see:
$ file /tmp/rk3399-rockpro64.dtb
/tmp/rk3399-rockpro64.dtb: data

Sorry for the noise.  I'll supply a full dmesg shortly (hopefully) =)

Jonathon

On Fri, Aug 16, 2019 at 3:45 AM J Sisson  wrote:
>
> Picked up a RockPro64 and I'm toying around with getting OpenBSD
> installed.  After picking up a SanDisk SD card (could not get any of
> my PNY cards to boot properly), I have the board getting as far as:
>
> root on rd0a swap on rd0b dump on rd0b
> WARNING: clock gained 40474 days
> WARNING: CHECK AND RESET THE DATE!
>
> The dtb from https://github.com/jasperla/openbsd-rockpro64 is on the
> sd card, and the output shows it being read (complete output below).
>
> I did try booting via bootp at one point, but it keeps acting like the
> dtb isn't present (per jasperla instructions above).
>
> Any ideas or suggestions?
>
> serial output with dmesg:
>
> DDR Version 1.19 20190305
> In
> channel 0
> CS = 0
> MR0=0xB8
> MR4=0x1
> MR5=0xFF
> MR8=0x10
> MR12=0x72
> MR14=0x72
> MR18=0x0
> MR19=0x0
> MR24=0x8
> MR25=0x0
> channel 1
> CS = 0
> MR0=0xB8
> MR4=0x1
> MR5=0xFF
> MR8=0x10
> MR12=0x72
> MR14=0x72
> MR18=0x0
> MR19=0x0
> MR24=0x8
> MR25=0x0
> channel 0 training pass!
> channel 1 training pass!
> change freq to 400MHz 0,1
> channel 0
> CS = 0
> MR0=0xB8
> MR4=0x1
> MR5=0xFF
> MR8=0x10
> MR12=0x72
> MR14=0x72
> MR18=0x0
> MR19=0x0
> MR24=0x8
> MR25=0x0
> channel 1
> CS = 0
> MR0=0xB8
> MR4=0x1
> MR5=0xFF
> MR8=0x10
> MR12=0x72
> MR14=0x72
> MR18=0x0
> MR19=0x0
> MR24=0x8
> MR25=0x0
> channel 0 training pass!
> channel 1 training pass!
> change freq to 800MHz 1,0
> Channel 0: LPDDR4,800MHz
> Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
> Channel 1: LPDDR4,800MHz
> Bus Width=32 Col=10 Bank=8 Row=16 CS=1 Die Bus-Width=16 Size=2048MB
> 256B stride
> ch 0 ddrconfig = 0x101, ddrsize = 0x40
> ch 1 ddrconfig = 0x101, ddrsize = 0x40
> pmugrf_os_reg[2] = 0x32C1F2C1, stride = 0xD
> OUT
> U-Boot SPL board init
>
> U-Boot SPL 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:34)
> booted from SPI flash
> Trying to boot from SPI
> NOTICE:  BL31: v1.3(debug):370ab80
> NOTICE:  BL31: Built : 09:23:41, Mar  4 2019
> NOTICE:  BL31: Rockchip release version: v1.1
> INFO:GICv3 with legacy support detected. ARM GICV3 driver initialized in 
> EL3
> INFO:Using opteed sec cpu_context!
> INFO:boot cpu mask: 0
> INFO:plat_rockchip_pmu_init(1181): pd status 3e
> INFO:BL31: Initializing runtime services
> WARNING: No OPTEE provided by BL2 boot loader, Booting device without
> OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
> ERROR:   Error initializing runtime service opteed_fast
> INFO:BL31: Preparing for EL3 exit to normal world
> INFO:Entry point address = 0x20
> INFO:SPSR = 0x3c9
>
>
> U-Boot 2017.09-rockchip-ayufan-1063-g29843fbd42 (Jul 08 2019 - 11:55:49 +)
>
> Model: Pine64 RockPro64
> DRAM:  3.9 GiB
> DCDC_REG1@vdd_center: ; enabling
> DCDC_REG2@vdd_cpu_l: ; enabling
> DCDC_REG3@vcc_ddr: ; enabling (ret: -38)
> DCDC_REG4@vcc_1v8: set 180 uV; enabling
> LDO_REG1@vcc1v8_dvp: set 180 uV; enabling
> LDO_REG2@vcc3v0_touch: set 300 uV; enabling
> LDO_REG3@vcc1v8_pmu: set 180 uV; enabling
> LDO_REG4@vcc_sd: set 330 uV; enabling
> LDO_REG5@vcca3v0_codec: set 300 uV; enabling
> LDO_REG6@vcc_1v5: set 150 uV; enabling
> LDO_REG7@vcca1v8_codec: set 180 uV; enabling
> LDO_REG8@vcc_3v0: set 300 uV; enabling
> SWITCH_REG1@vcc3v3_s3: ; enabling (ret: -38)
> SWITCH_REG2@vcc3v3_s0: ; enabling (ret: -38)
> vcc1v8-s0@vcc1v8_s0: set 180 uV; enabling (ret: -38)
> dc-12v@dc_12v: set 1200 uV; enabling (ret: -38)
> vcc-sys@vcc_sys: set 500 uV; enabling (ret: -38)
> vcc3v3-sys@vcc3v3_sys: set 330 uV; enabling (ret: -38)
> vcc-phy-regulator@vcc_phy: ; enabling (ret: -38)
> vdd-log@vdd_log: ; enabling (ret: -38)
> MMC:   sdhci@fe33: 0, dwmmc@fe32: 1
> SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
> *** Warning - bad CRC, using default environment
>
> In:serial@ff1a
> Out:   serial@ff1a
> Err:   serial@ff1a
> Model: Pine64 RockPro64
> Net:   eth0: ethernet@fe30
> Hit any key to stop autoboot:  0
> Card did not respond to voltage select!
> mmc_init: -95, time 20
> switch to partitions #0, OK
> mmc1 is current device
> Scanning mmc 1:1...
> reading /dtb/rockchip/rk3399-rockpro64.dtb
> 63046 bytes read in 11 ms (5.5 MiB/s)
> Found EFI removable media binary efi/boot/bootaa64.efi
> reading efi/boot/bootaa64.efi
> 161090 bytes read in 22 ms (7 MiB/s)
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> ## Starting EFI application at 0200 ...
> Card did not respond to voltage select!
> mmc_init: -95, time 20
> Scanning disk sd...@fe33.blk...
> MMC: block number 0x1 exceeds max(0x0)
> MMC: block

Re: RockPro64 dmesg/hang

2019-08-16 Thread J Sisson
Remember kiddies, always checksum downloaded files.  Sigh.

dmesg below.

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-beta (GENERIC.MP) #181: Fri Aug 16 02:18:12 MDT 2019
dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 4096454656 (3906MB)
avail mem = 3899707392 (3719MB)
mainbus0 at root: Pine64 RockPro64
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: 512KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.0.5
efi0: Das U-boot rev 0x0
apm0 at mainbus0
psci0 at mainbus0: PSCI 1.0
agintc0 at mainbus0 sec shift 3:4 nirq 288 nredist 6 ipi: 0, 1:
"interrupt-controller"
agintcmsi0 at agintc0
syscon0 at mainbus0: "qos"
syscon1 at mainbus0: "qos"
syscon2 at mainbus0: "qos"
syscon3 at mainbus0: "qos"
syscon4 at mainbus0: "qos"
syscon5 at mainbus0: "qos"
syscon6 at mainbus0: "qos"
syscon7 at mainbus0: "qos"
syscon8 at mainbus0: "qos"
syscon9 at mainbus0: "qos"
syscon10 at mainbus0: "qos"
syscon11 at mainbus0: "qos"
syscon12 at mainbus0: "qos"
syscon13 at mainbus0: "qos"
syscon14 at mainbus0: "qos"
syscon15 at mainbus0: "qos"
syscon16 at mainbus0: "qos"
syscon17 at mainbus0: "qos"
syscon18 at mainbus0: "qos"
syscon19 at mainbus0: "qos"
syscon20 at mainbus0: "qos"
syscon21 at mainbus0: "qos"
syscon22 at mainbus0: "qos"
syscon23 at mainbus0: "qos"
syscon24 at mainbus0: "qos"
syscon25 at mainbus0: "power-management"
"power-controller" at syscon25 not configured
syscon26 at mainbus0: "syscon"
"io-domains" at syscon26 not configured
"reboot-mode" at syscon26 not configured
"pmu-pvtm" at syscon26 not configured
rkclock0 at mainbus0
rkclock_set_frequency: 0x002c
rkclock1 at mainbus0
rkclock_set_frequency: 0x00d9
rkclock_set_frequency: 0x01d9
rkclock_set_frequency: 0x00db
rkclock_set_frequency: 0x01db
rkclock_set_frequency: 0x00d0
syscon27 at mainbus0: "syscon"
"io-domains" at syscon27 not configured
"phy" at syscon27 not configured
"usb2-phy" at syscon27 not configured
"usb2-phy" at syscon27 not configured
"pvtm" at syscon27 not configured
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
rkgpio4 at rkpinctrl0
"ddr_timing" at mainbus0 not configured
"pmu_a53" at mainbus0 not configured
"pmu_a72" at mainbus0 not configured
agtimer0 at mainbus0: tick rate 24000 KHz
"xin24m" at mainbus0 not configured
"dummy_cpll" at mainbus0 not configured
"dummy_vpll" at mainbus0 not configured
"amba" at mainbus0 not configured
dwge0 at mainbus0
dwge0: address: b6:ab:8e:4c:f1:51
rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 6
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, mmc high-speed, dma
sdhc0 at mainbus0
sdhc0: SDHC 3.0, 200 MHz base clock
sdmmc1 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma
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.00 addr 1
ohci0 at mainbus0: version 1.0
ehci1 at mainbus0
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev
2.00/1.00 addr 1
ohci1 at mainbus0: version 1.0
rkdwusb0 at mainbus0: "usb"
xhci0 at rkdwusb0, xHCI 1.10
usb2 at xhci0: USB revision 3.0
uhub2 at usb2 configuration 1 interface 0 "Generic xHCI root hub" rev
3.00/1.00 addr 1
rkdwusb1 at mainbus0: "usb"
xhci1 at rkdwusb1, xHCI 1.10
usb3 at xhci1: USB revision 3.0
uhub3 at usb3 configuration 1 interface 0 "Generic xHCI root hub" rev
3.00/1.00 addr 1
"dp" at mainbus0 not configured
"saradc" at mainbus0 not configured
rkiic0 at mainbus0
iic0 at rkiic0
fanpwr0 at iic0 addr 0x40: SYR827, 1.00 VDC
fanpwr1 at iic0 addr 0x41: SYR828, 1.00 VDC
rkpmic0 at iic0 addr 0x1b: RK808
rkiic1 at mainbus0
iic1 at rkiic1
"everest,es8316" at iic1 addr 0x10 not configured
com0 at mainbus0: ns16550, no working fifo
com0: console
"spi" at mainbus0 not configured
"thermal-zones" at mainbus0 not configured
rktemp0 at mainbus0
rkiic2 at mainbus0
iic2 at rkiic2
"fairchild,fusb302" at iic2 addr 0x22 not configured
"pcie-phy" at mainbus0 not configured
rkpcie0 at mainbus0
rkpcie0: link training timeout
"pwm" at mainbus0 not configured
"pwm" at mainbus0 not configured
"pwm" at mainbus0 not configured
"iommu" at mainbus0 not configured
"iommu" at mainbus0 not configured
"efuse" at mainbus0 not configured
"phy" at mainbus0 not configured
"phy" at mainbus0 not configured
"watchdog" at mainbus0 not configured
"rktimer" at mainbus0 not configured
"spdif" at mainbus0 not configured
"i2s" at mainbus0 not configured
"i2s" at mainbus0 not configured
"i2s" at mainbus0 not configured
"gpu" at mainbus0 not configured
"vop" at mainbus0 not configured
"vop" at mainbus0 not configured
"iommu" at mainbus0 not configured
"hdmi" at mainbus0 not configure

Re: RockPro64 dmesg/hang

2019-08-16 Thread Mark Kettenis
> From: J Sisson 
> Date: Fri, 16 Aug 2019 04:15:52 -0500
> 
> Remember kiddies, always checksum downloaded files.  Sigh.

That said, you're probably better off using the firmware I built more
recently:

https://marc.info/?l=openbsd-arm&m=156114869709200&w=2

You're probably better off using this without the .dtb file for now,
but I have one that adds PCIe support that I'll have to dig out.  I'll
try to put the file in the same location as the other firmware
binaries.

Hopefully we can streamline all this when U-Boot 2019.10 is released
somewhere in October.



Re: RockPro64 dmesg/hang

2019-08-16 Thread J Sisson
On Fri, Aug 16, 2019 at 5:00 AM Mark Kettenis  wrote:
>
> > From: J Sisson 
> > Date: Fri, 16 Aug 2019 04:15:52 -0500
> >
> > Remember kiddies, always checksum downloaded files.  Sigh.
>
> That said, you're probably better off using the firmware I built more
> recently:
>
> https://marc.info/?l=openbsd-arm&m=156114869709200&w=2

I did try this prior to discovering the PNY sd card issue.  I'll give it
another try now that I have a decent sd card.

> You're probably better off using this without the .dtb file for now,
> but I have one that adds PCIe support that I'll have to dig out.  I'll
> try to put the file in the same location as the other firmware
> binaries.
>
> Hopefully we can streamline all this when U-Boot 2019.10 is released
> somewhere in October.

Sounds great.  Thanks for working on this!

-Jonathon