From owner-freebsd-arm@freebsd.org Tue Jan 5 20:16:14 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46B0F4C9104 for ; Tue, 5 Jan 2021 20:16:14 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9Nzw6cMgz3GSX for ; Tue, 5 Jan 2021 20:16:12 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1609877770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IxZbtTKGiB9hZL+Lh7RTeC4dxR7ioKk8OI9PlCwlrDM=; b=UMNftZhvYKqrnP77eo8Y4VT6MD4gJWKKgp6AJjI36B8gN+gpUs2uZp2DGyB/cgZZRBmB55 UFp/2B6ANGJb2KGSBSbHWZvmJ9xaZI4ytvZIExtIK4m7mXgZ8qzUSbvqqxX996BY3Gg5HD F8ZcF7NNe9TLiS8F9hwwYgdOjWC1joc= Received: from skull.home.blih.net (lfbn-idf2-1-745-114.w86-247.abo.wanadoo.fr [86.247.192.114]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 6bdde756 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 5 Jan 2021 20:16:10 +0000 (UTC) Date: Tue, 5 Jan 2021 21:16:10 +0100 From: Emmanuel Vadot To: Andy McClements Cc: freebsd-arm@freebsd.org Subject: Re: RPi4b 8GB 13.0-Current, XHCI broken, wrong U-Boot ? Message-Id: <20210105211610.66a4e784b73382a74863ec09@bidouilliste.com> In-Reply-To: <44de05f0-0c41-b6c8-b3f6-a4374f20eca1@ip-ether.net> References: <007c8658-b7b6-6852-536c-9c36af64506b@ip-ether.net> <5B626DCC-6F7C-4554-803C-F488A1ED9BEB@googlemail.com> <56d10ea4-3284-3e4c-9521-8bf1008caa2b@ip-ether.net> <26D146B8-0362-4008-9A1F-A6CD6B1479BB@googlemail.com> <6610c9a3-1e61-b7e5-c537-3080dd7ee8ae@ip-ether.net> <44de05f0-0c41-b6c8-b3f6-a4374f20eca1@ip-ether.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4D9Nzw6cMgz3GSX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=UMNftZhv; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-2.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.83.155.74:from]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[212.83.155.74:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2021 20:16:14 -0000 On Sun, 3 Jan 2021 19:33:31 +0000 Andy McClements wrote: > On 03/01/2021 18:29, Andy McClements wrote: > > > Further on this, I have just done another test by replacing only: > > > > bcm2711-rpi-4-b.dtb > > > > on the FreeBSD 13.0-CURRENT 20201224 img, with the one from the RPI > > firmware 20201227 release. > > > > This **allows booting from USB**, which fails on the stock 20201224 img. > > > > So it seems to me that patch D26853 **is not required**, if the upstream > > file is now working OK. > > ************************* > * A P O L O G I E S ! * > ************************* > > I have just noticed that with the 20201227 firmware version of > 'bcm2711-rpi-4-b.dtb', 'genet0' is missing. USB disk boot is fine, but > the onboard GE is not recognised. > > The only way I can get everything working on my RPi4b 8G with FreeBSD > 20201224, is to use the D26853 patched version of 'bcm2711-rpi-4-b.dtb'. > > The firmware version I've been referring to as 20201227, has files in it > with that datestamp, and was obtained from: > > https://github.com/raspberrypi/firmware/archive/master.zip So I did my tests today. Indeed we cannot boot from USB with the current re@ generated image. As said before in this thread u-boot needs the raspberrypi,firmware-reset node to be present to reset the usb controller. This also means that we cannot boot from sd and use USB drives from u-boot currently. If, like Andy did, we use only the dtb from rpi-firmware git master everything works. One issue was genet related but was fixed by cb00fc7c4d. The problem is that if we use start* or fixup* (not sure since those files have to be synced) from rpi-firmware git master (tested with commit d06d94e) there is no dtb available for u-boot : U-Boot> fdt addr fdt_addr libfdt fdt_check_header(): FDT_ERR_BADMAGIC U-Boot> fdt addr fdt_addr_r libfdt fdt_check_header(): FDT_ERR_BADMAGIC I really don't want to dig into this rabbit hole now so I'll test again when rpi-firmware have another release. In the mean time if you want to usb-boot your rpi4 just download the dtb from the d06d94e commit and that will work now. -- Emmanuel Vadot