On Mon, Jan 11, 2021 at 08:41:02PM +0100, Patrick Wildt wrote: > Am Sun, Jan 10, 2021 at 09:56:02PM +1100 schrieb Jonathan Gray: > > On Fri, Jan 08, 2021 at 03:42:31PM -0500, Kurt Miller wrote: > > > On Fri, 2021-01-08 at 11:48 -0500, Kurt Miller wrote: > > > > On Fri, 2021-01-08 at 10:27 +1100, Jonathan Gray wrote: > > > > > > > > > > On Thu, Jan 07, 2021 at 04:29:35PM -0500, Kurt Miller wrote: > > > > > > > > > > > > > > > > > > On Thu, 2020-12-31 at 19:24 +1100, Jonathan Gray wrote: > > > > > > > > > > > > > > > > > > > > > https://trustedfirmware-a.readthedocs.io/en/latest/change-log.html#version-2-4 > > > > > > > > > > > > > > Tests welcome as I don't have rk3328/rk3399/sun50i_a64 hardware. > > > > > > This update appears ok on rk3328 and rk3399, however my rockpro64 > > > > > > will not boot with u-boot 2020.10: > > > > > > > > > > > > Rock64 Gen3 w/ v2020.10 u-boot and atf 2.4 works > > > > > > Rockpro64 w/2020.10 u-boot and atf 2.4 and 2.3 fails > > > > > > Rockpro64 w/2020.07 u-boot and atf 2.4 and 2.3 works > > > > > > > > > > > > With 2020.10 u-boot the rockpro64 freezes just after attempting to > > > > > > boot the kernel. Here's a diff of v2020.07 with atf 2.3 that works > > > > > > against v2020.10 with atf 2.3 that freezes: > > > > > > > > > > > > rocky$ diff -u v2020.07.boot v2020-10.boot > > > > > > --- v2020.07.boot Thu Jan 7 16:20:58 2021 > > > > > > +++ v2020-10.boot Thu Jan 7 16:10:27 2021 > > > > > > @@ -1,19 +1,18 @@ > > > > > > -U-Boot TPL 2020.07 (Jul 07 2020 - 19:02:53) > > > > > > +U-Boot TPL 2020.10 (Jan 02 2021 - 11:16:03) > > > > > > Channel 0: LPDDR4, 50MHz > > > > > > BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB > > > > > > Channel 1: LPDDR4, 50MHz > > > > > > BW=32 Col=10 Bk=8 CS0 Row=16/15 CS=1 Die BW=16 Size=2048MB > > > > > > 256B stride > > > > > > -256B stride > > > > > > lpddr4_set_rate: change freq to 400000000 mhz 0, 1 > > > > > > lpddr4_set_rate: change freq to 800000000 mhz 1, 0 > > > > > > Trying to boot from BOOTROM > > > > > > Returning to boot ROM... > > > > > > > > > > > > -U-Boot SPL 2020.07 (Jul 07 2020 - 19:02:53 -0600) > > > > > > +U-Boot SPL 2020.10 (Jan 02 2021 - 11:16:03 -0700) > > > > > > Trying to boot from MMC1 > > > > > > NOTICE: BL31: v2.3():2.3 > > > > > > -NOTICE: BL31: Built : 18:41:43, Jul 7 2020 > > > > > > +NOTICE: BL31: Built : 10:45:12, Jan 2 2021 > > > > > > INFO: GICv3 with legacy support detected. > > > > > > INFO: ARM GICv3 driver initialized in EL3 > > > > > > INFO: plat_rockchip_pmu_init(1624): pd status 3e > > > > > > @@ -24,7 +23,7 @@ > > > > > > INFO: SPSR = 0x3c9 > > > > > > > > > > > > > > > > > > -U-Boot 2020.07 (Jul 07 2020 - 19:02:53 -0600) > > > > > > +U-Boot 2020.10 (Jan 02 2021 - 11:16:03 -0700) > > > > > > > > > > > > SoC: Rockchip rk3399 > > > > > > Reset cause: RST > > > > > > @@ -32,14 +31,29 @@ > > > > > > DRAM: 3.9 GiB > > > > > > PMIC: RK808 > > > > > > MMC: mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0 > > > > > > -Loading Environment from SPI Flash... SF: Detected gd25q128 with > > > > > > page size 256 Bytes, erase size 4 KiB, total 16 > > > > > > MiB > > > > > > -*** Warning - bad CRC, using default environment > > > > > > +Loading Environment from SPIFlash... Invalid bus 0 (err=-19) > > > > > > +*** Warning - spi_flash_probe_bus_cs() failed, using default > > > > > > environment > > > > > > > > > > > > In: serial > > > > > > Out: serial > > > > > > Err: serial > > > > > > Model: Pine64 RockPro64 v2.1 > > > > > > Net: eth0: ethernet@fe300000 > > > > > > +starting USB... > > > > > > +Bus usb@fe380000: USB EHCI 1.00 > > > > > > +Bus usb@fe3a0000: USB OHCI 1.0 > > > > > > +Bus usb@fe3c0000: USB EHCI 1.00 > > > > > > +Bus usb@fe3e0000: USB OHCI 1.0 > > > > > > +Bus dwc3: usb maximum-speed not found > > > > > > +Register 2000140 NbrPorts 2 > > > > > > +Starting the controller > > > > > > +USB XHCI 1.10 > > > > > > +scanning bus usb@fe380000 for devices... 1 USB Device(s) found > > > > > > +scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found > > > > > > +scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found > > > > > > +scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found > > > > > > +scanning bus dwc3 for devices... 1 USB Device(s) found > > > > > > + scanning usb for storage devices... 0 Storage Device(s) > > > > > > found > > > > > > Hit any key to stop autoboot: 0 > > > > > > Card did not respond to voltage select! > > > > > > switch to partitions #0, OK > > > > > > @@ -56,11 +70,14 @@ > > > > > > Scanning disk sd...@fe330000.blk... > > > > > > Disk sd...@fe330000.blk not ready > > > > > > Found 3 disks > > > > > > +No EFI system partition > > > > > > BootOrder not defined > > > > > > EFI boot manager: Cannot load any image > > > > > > -168728 bytes read in 14 ms (11.5 MiB/s) > > > > > > +168728 bytes read in 13 ms (12.4 MiB/s) > > > > > > libfdt fdt_check_header(): FDT_ERR_BADMAGIC > > > > > > +Booting /efi\boot\bootaa64.efi > > > > > > disks: sd0* > > > > > > >> OpenBSD/arm64 BOOTAA64 1.3 > > > > > > boot> > > > > > > -booting sd0a:/bsd: 8657572+1775464+561576+826224 > > > > > > [629354+109+1059720+622048]=0xf87520 > > > > > > +booting sd0a:/bsd: 8663848+1773392+563520+828336 > > > > > > [629656+109+1059720+621958]=0xf885c8 > > > > > > > > > > > > v2020.07 u-boot continues from here, v2020.10 u-boot freezes. > > > > > > > > > > > > Ideas? > > > > > Can you try build the latest U-Boot git? I think you'll have to > > > > > bisect. > > > > Bisecting shows this commit is the culprit: > > > > > > > > commit 3ae64582fb8ceead4fc464cd2055eb3eaef78ccc (refs/bisect/bad) > > > > Author: Jagan Teki <ja...@amarulasolutions.com> > > > > Date: Mon Jul 20 14:53:09 2020 +0530 > > > > > > > > rockchip: rockpro64: Enable USB3.0 Host > > > > > > > > Enable USB3.0 Host support for RockPro64 boards. > > > > > > > > Signed-off-by: Jagan Teki <ja...@amarulasolutions.com> > > > > Reviewed-by: Kever Yang <kever.y...@rock-chips.com> > > > > > > > > diff --git a/configs/rockpro64-rk3399_defconfig > > > > b/configs/rockpro64-rk3399_defconfig > > > > index 31b3ee2aa4..25cf5c781c 100644 > > > > --- a/configs/rockpro64-rk3399_defconfig > > > > +++ b/configs/rockpro64-rk3399_defconfig > > > > @@ -49,6 +49,8 @@ CONFIG_ETH_DESIGNWARE=y > > > > CONFIG_GMAC_ROCKCHIP=y > > > > CONFIG_NVME=y > > > > CONFIG_PCI=y > > > > +CONFIG_PHY_ROCKCHIP_INNO_USB2=y > > > > +CONFIG_PHY_ROCKCHIP_TYPEC=y > > > > CONFIG_PMIC_RK8XX=y > > > > CONFIG_REGULATOR_PWM=y > > > > CONFIG_REGULATOR_RK8XX=y > > > > @@ -66,6 +68,8 @@ CONFIG_USB_EHCI_HCD=y > > > > CONFIG_USB_EHCI_GENERIC=y > > > > CONFIG_USB_OHCI_HCD=y > > > > CONFIG_USB_OHCI_GENERIC=y > > > > +CONFIG_USB_DWC3=y > > > > +CONFIG_USB_DWC3_GENERIC=y > > > > CONFIG_USB_KEYBOARD=y > > > > CONFIG_USB_HOST_ETHER=y > > > > CONFIG_USB_ETHER_ASIX=y > > > > > > > > > > > > However, a strait revert of this using v2020.10 tag results in > > > > undefined refs: > > > > drivers/usb/host/built-in.o: In function `xhci_dwc3_remove': > > > > /home/truk/rockpro64/u-boot/drivers/usb/host/xhci-dwc3.c:172: undefined > > > > reference to `dwc3_shutdown_phy' > > > > drivers/usb/host/built-in.o: In function `xhci_dwc3_probe': > > > > /home/truk/rockpro64/u-boot/drivers/usb/host/xhci-dwc3.c:129: undefined > > > > reference to `dwc3_setup_phy' > > > > > > > > I haven't been able to figure out how to resolve this. > > > > > > > > -Kurt > > > > > > > > > > Here's a u-boot work-around that allows the kernel to boot by > > > disabling the "usb start" preboot command in u-boot. I've tested > > > this with atf 2.4. This should get things working again until > > > someone can dive into why the kernel freezes when "usb start" > > > is issued in u-boot. > > > > > > okay? > > > > Removing CONFIG_USE_PREBOOT should also work. > > > > I wonder what happens on pinebook pro which may also have the same > > problem? > > I updated my Pinebook Pro to the current package. The only issue I > see is that it doesn't recognize the SPI flash anymore and that's why > it boots to Linux (on the eMMC) instead of OpenBSD (on the NVMe). > But both Linux and OpenBSD boot up just fine.
Thanks, in that case I think we want to backport: commit 92cb207af110855ee9ae132c638b3d289a53d930 Author: Hugh Cole-Baker <sigma...@gmail.com> Date: Sun Nov 22 13:03:44 2020 +0000 rockchip: pinebook-pro: default to SPI bus 1 for SPI-flash SPI flash on this machine is located on bus 1, default to using bus 1 for SPI flash and stop aliasing it to bus 0. Signed-off-by: Hugh Cole-Baker <sigma...@gmail.com> Suggested-by: Simon Glass <s...@chromium.org> Fixes: c4cea2bb ("rockchip: Enable building a SPI ROM image on bob") arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 4 ---- configs/pinebook-pro-rk3399_defconfig | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) And perhaps also commit b197c934b11f611dcc1a083d90e68019d1e010cf Author: Peter Robinson <pbrobin...@gmail.com> Date: Tue Nov 10 10:09:06 2020 +0000 rockchip: Pinebook Pro: Fix USB Improve USB config so keyboard and USB-A ports work. Signed-off-by: Peter Robinson <pbrobin...@gmail.com> configs/pinebook-pro-rk3399_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) > > U-Boot TPL 2020.10 (Jan 08 2021 - 07:11:56) > Channel 0: LPDDR4, 50MHz > BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB > Channel 1: LPDDR4, 50MHz > BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB > 256B stride > lpddr4_set_rate: change freq to 400000000 mhz 0, 1 > lpddr4_set_rate: change freq to 800000000 mhz 1, 0 > Trying to boot from BOOTROM > Returning to boot ROM... > > U-Boot SPL 2020.10 (Jan 08 2021 - 07:11:56 -0700) > Trying to boot from MMC2 > NOTICE: BL31: v2.3():2.3 > NOTICE: BL31: Built : 22:44:50, Jan BL31: Preparing for EL3 exit to > normal world > INFO: Entry point address = 0x200000 > INFO: SPSR = 0x3c9 > > > U-Boot 2020.10 (Jan 08 2021 - 07:11:56 -0700) > > SoC: Rockchip rk3399 > Reset cause: POR > Model: Pine64 Pinebook Pro > DRAM: 3.9 GiB > PMIC: RK808 > MMC: mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0 > Loading Environment from SPIFlash... Invalid bus 0 (err=-19) > *** Warning - spi_flash_probe_bus_cs() failed, using default environment > > In: serial > Out: serial > Err: serial > Model: Pine64 Pinebook Pro > Net: No ethernet found. > starting USB... > Bus usb@fe380000: failed to get usb phy > Port not available. > Bus usb@fe3a0000: failed to get usb phy > Port not available. > Bus usb@fe3c0000: failed to get usb phy > Port not available. > Bus usb@fe3e0000: failed to get usb phy > Port not available. > Bus dwc3: Failed to get PHY0 for dwc3 > Port not available. > Bus dwc3: Failed to get PHY0 for dwc3 > Port not available. > Hit any key to stop autoboot: 0 > => run bootcmd_nvme0 > > Device 0: Vendor: 0x1987 Rev: ECFM22.5 Prod: 17A8079A10BE00256917 > Type: Hard Disk > Capacity: 244198.3 MB = 238.4 GB (500118192 x 512) > ... is now current device > Scanning nvme 0:1... > 59993 bytes read in 3 ms (19.1 MiB/s) > Found EFI removable media binary efi/boot/bootaa64.efi > Card did not respond to voltage select! > Scanning disk m...@fe310000.blk... > Disk m...@fe310000.blk not ready > Card did not respond to voltage select! > Scanning disk m...@fe320000.blk... > Disk m...@fe320000.blk not ready > Scanning disk sd...@fe330000.blk... > Scanning disk nvme#0.blk#0... > ** Unrecognized filesystem type ** > Found 6 disks > No EFI system partition > BootOrder not defined > EFI boot manager: Cannot load any image > 168728 bytes read in 2 ms (80.5 MiB/s) > Booting /efi\boot\bootaa64.efi > disks: sd0* sd1 > >> OpenBSD/arm64 BOOTAA64 1.3 > boot> > booting sd0a:/bsd: 8666112+1773184+562424+827784 > [631696+109+1060296+622304]=0xf88ae8 > [... skipped, but it does boot up fine!] >