From: Jean Lucas Date: Thu, 19 Nov 2020 00:45:05 -0500 Subject: [BUG] Hang shortly after loading FDT when booting on RK3399 In-Reply-To: <3f8389a6-c765-ca28-0364-94d4cb4d17ec@4ray.co> References: <20201113041511.48207-1-takahiro.akashi@linaro.org> <0a0133e6-2fc6-7f65-3a4a-4b47ea735435@gmx.de> <20201116003723.GA30346@laputa> <20201116161012.GR5340@bill-the-cat> <20201117001626.GA12604@laputa> <20201117003626.GZ5340@bill-the-cat> <20201117004436.GA14486@laputa> <20ec7dd7-6278-c2f0-ef53-29dc4a86f419@4ray.co> <2b9cc39c-64f2-4658-0323-7067679fcfcc@gmail.com> <2f02ec18-0dae-8b4b-726a-385b52f39ae7@gmail.com> <3f8389a6-c765-ca28-0364-94d4cb4d17ec@4ray.co> Message-ID: <8c03ea46-ad71-a8b2-7d99-66873ab545d4@4ray.co> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/17/20 1:28 PM, Jean Lucas wrote: > On 11/17/20 9:42 AM, Alper Nebi Yasak wrote: >> On 17/11/2020 17:11, Peter Robinson wrote: >>> On Tue, Nov 17, 2020 at 12:43 PM Alper Nebi Yasak >>> wrote: >>>> On 17/11/2020 04:49, Jean Lucas wrote: >>>>> Hello all, >>>>> >>>>> On Pine64 RockPro64 and Pinebook Pro (both RK3399), flashing U-Boot >>>>> v2021.01-rc2-47-g9324c9a823 defconfig and mainline ATF >>>>> v2.4-rc0-2-gd01f31c03 to SPI flash of both devices results in a hang >>>>> shortly after loading the appropriate FDT when booting. >>>>> >>>>> On a Pinebook Pro: >>>>> >>>>> => load mmc 0:1 ${kernel_addr_r} Image >>>>> 32418304 bytes read in 1448 ms (21.4 MiB/s) >>>>> => load mmc 0:1 ${fdt_addr_r} dtbs/rockchip/rk3399-pinebook-pro.dtb >>>>> 80831 bytes read in 27 ms (2.9 MiB/s) >>>>> => load mmc 0:1 ${ramdisk_addr_r} initramfs-linux.img >>>>> 29698825 bytes read in 1291 ms (21.9 MiB/s) >>>>> => setenv bootargs console=ttyS2,1500000 console=tty0 >>>>> root=/dev/ghost/root audit=0 >>>>> => booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} >>>>> Moving Image from 0x2080000 to 0x2200000, end=41c0000 >>>>> ## Flattened Device Tree blob at 01f00000 >>>>> ???? Booting using the >>>>> >>>>> Behavior is the same on RockPro64. >>>>> >>>>> Worth mentioning is that U-Boot from about a week ago (I think >>>>> rc2-4-gf36603c7a8) with same mainline ATF version written to eMMC >>>>> results in a working boot on Pinebook Pro, so bug seems to be when >>>>> booting from SPI. >>>>> >>>>> To further the hypothesis, on RockPro64, the latest U-Boot I can use >>>>> from SPI (defconfig) is release 2020.04, since later releases also >>>>> hang >>>>> on loading the appropriate FDT when booting as described above. >>>>> >>>>> Any ideas as to what could be causing the hangs? >>>>> >>>> My gru-kevin was hanging at that same place when I tried to boot from >>>> USB, try running "usb stop" to see if that hangs. If so, try disabling >>>> CONFIG_USB_OHCI_HCD and CONFIG_USB_OHCI_GENERIC, which fixed the >>>> hang in >>>> my case. >>> Which probably breaks USB keyboards? >> I wouldn't know, gru-kevin uses cros-ec-keyb so I never needed to try a >> USB keyboard. I meant those as steps to narrow things down. > > So, running "usb stop" resulted in a hang. > > I will test a build with the OHCI options Alper mentioned disabled, this > evening. > > As far as testing goes, disabling USB is fine since I can access the > machines over serial. > Hi, Interestingly, disabling OHCI did the trick, and the Pinebook Pro and RockPro64 both boot normally. Unfortunately, Pinebook Pro's keyboard is connected to the mainboard via USB, and RockPro64 is USB-only as well, so OHCI support will have to be reviewed for these boards at least. Interestingly, flashing the same U-Boot revision (except with OHCI enabled) to eMMC on Pinebook Pro - which results in SPL loading U-Boot from the eMMC by default, even when booted from SPI - results in working USB support. The boot hang only becomes an issue when U-Boot is loaded purely from SPI. Regards, Jean