From nobody Sun Aug 20 19:08:02 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RTQ9w3cC2z4qbJB for ; Sun, 20 Aug 2023 19:08:20 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-21.consmr.mail.gq1.yahoo.com (sonic309-21.consmr.mail.gq1.yahoo.com [98.137.65.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RTQ9v6x04z3HKP for ; Sun, 20 Aug 2023 19:08:19 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692558497; bh=5LQtDI5rDsmIbZJW5STUI+y0V800NBbyu92Tm7qSRcE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=G0pdJvce8i/MVvsd/1Mo9El346owldJQ9Ox5nwE9k0H/gvTZ1unJjrJTNlN1jIbRi18rClaxeLEhu6fpifhq7H0Dfshoup8ByWLPGBob2uscGZYKRb9z0fxkdDLNi6IrgfvNfiwik6BO9ryNd5ooyU/+lQI6E9ModQme64z7pFHKS3AwOuctbV3a/zKapqtgthwB8QaWDyFfZ0YBjBrDuXqSL7QKIOwHqzLx86SDPPmr5M3V66wjTQofANoE1Oq6aa7+Fo2J1+1fHtpvfS7T5GPKm3ZmM4SXztmiyAJkZRNDj2stpi/6PVibeC5ZszaVZZk4AzpSC2tzouVCRyhU/w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692558497; bh=gGGRzAuP4n0isaZD5OVGL1+s2fXZmd2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aRyyyp6FKclcjjJFVJocI4Vtbt98aUZhbtb9Qb5w0Af.nKNX.K1hjEzvEmeQkHu_d R0BMnaV50fCq4ioCJZVpmLjszPH2lqCPokQkmc6XZNvbynCaE.iNUWKlDJPRz7ZLaBdBB_ZXb19l zUj3_k9DJe6AYkRLdT2p.UYIzQHRJHfvHIsLKqV.gPIyiekVbZzABpBw5K8zbmMAMaCrK3bgEv7E 1Yw4MlbEH8cuPitB9UCp6fL0RtkV87fg0I16k6_4iQ7YnIEm3HmsZbBGbvcy35CjBXwhZcFgsnwW 3_iHbRhRkgc83Ex0yC.yPn9FuP97vkrcx11vuLoujnwmue9llekXFGarnkGjBkFgFUa1GjYMLI_5 NdK3SF2_q_rhiD.obqMZUgU9ZfW8aCvPU5ci9eYMUAO41SbPdKkWkWaLRCbe47dKLiVeJ_W1Dq8c YXZ2QJUNhpwGzJSai097PoBSSExwfbgE.nbZ4movPXJYzfTzKXsRoNpwyyE4BrNSsDUn1lvyiJHK Sc4l1cKqYREouyaxa.q2.74PTBJVGO_G.qpv39Mb2YYBi0ZAmGpac8KMNAs7bJ2o17u0Bhh2fbiQ p7JmEcLQzAg-- X-Sonic-MF: X-Sonic-ID: 65d9cd8e-a179-47d9-8340-677582e60b04 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Sun, 20 Aug 2023 19:08:17 +0000 Received: by hermes--production-bf1-865889d799-cgv22 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d50f24b4447e1392cdeba7effd4ba5e1; Sun, 20 Aug 2023 19:08:14 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Rock64 vs. USB3 for 14.0-ALPHA2 's Rock64 snapshot vs. device tree update(?) From: Mark Millard In-Reply-To: Date: Sun, 20 Aug 2023 12:08:02 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Guy Yur X-Mailer: Apple Mail (2.3731.700.6) X-Rspamd-Queue-Id: 4RTQ9v6x04z3HKP X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] On Aug 20, 2023, at 11:08, Guy Yur wrote: > Hi, Hello. >> On Sun, Aug 20, 2023 at 6:15=E2=80=AFPM Mark Millard = wrote: >> On Aug 20, 2023, at 06:50, Guy Yur wrote: >>=20 >>=20 >> > On Sun, Aug 20, 2023 at 9:57=E2=80=AFAM Mark Millard = wrote: >> > If I interpret my experiments correctly, 14.0-ALPHA2 no longer >> > supports the Rock64 USB3 port. This might be a side effect of >> > importing more modern device tree source files from Linux. (At >> > least one past import had such an issue for the Rock64, if I >> > remember correctly.) >> >=20 >> > Hi, >> >=20 >> > Does u-boot see the XHCI controller? >>=20 >> U-Boot has never seen the XHCI controller in all the years that >> I've used it. The FreeBSD kernel was the first stage that saw the >> XHCI controller. Relative to booting the Rock64, the stages >> that I've used are: >>=20 >> A) microsd card with U-Boot. >>=20 >> B) an e.MMC with 2 file systems: >>=20 >> B0) an msdosfs with a FreeBSD dtb/ copy and >> EFI/BOOT/bootaa64.efi . >>=20 >=20 > I boot from sdcard with msdosfs partition with EFI/BOOT/bootaa64.efi = and the dtb in rockchip/ dir in the partition. > I tested renaming the rockchip dir so the dtb won't be found and there = was still a device tree provided. > seen in devinfo and ofwdump. Back when I established my structure (long ago) this provided U-Boot's translation of its *.dtb --which did not work for FreeBSD purposes at the time. FreeBSD's Rock64 related updates have been based on tracking upstream linux at some point. Doing what I did got the FreeBSD *.dtb that FreeBSD expected (at the time. anyway). >> B1) a UFS with a (recursive) copy of /boot >> and an /etc/hostid . The /boot/loader.conf >> has: vfs.root.mountfrom=3D"ufs:/dev/gpt/Rock64root" >> (I avoid copying /boot/entropy to the e.MMC .) >>=20 >> C) /dev/gpt/Rock64root has the UFS file system for the >> world (with the kernel materials too) and is on >> the USB3 media that I use. >>=20 >> (I have the media set up to also boot aarch64 RPi* .) >>=20 >> 14.0-ALPHA2 loads and starts the kernel from the e.MMC >> just fine. But that kernel does not see what is in the >> USB3 port. It does see the same when instead in the >> other USB ports. Previously used to see the USB3 media >> in the USB3 port just fine and boot world from the USB3 >> media. >>=20 >> > I had to backport u-boot changes to sysutils/u-boot-rock64 >> > (sysutils/u-boot-master) 2023.07.02 to get it working in >> > u-boot and 14.0-ALPHA1 for Rock64 and Orange Pi R1 Plus. >>=20 >> I've never gone the route of changing U-Boot to handle >> the USB3 port. >>=20 >> > I took the following (I don't know if all are needed): >> > = https://source.denx.de/u-boot/u-boot/-/commit/caaeac88466f4152bd126e234276= 5a4b740955ae >> > = https://source.denx.de/u-boot/u-boot/-/commit/b71f74eab42782199757e1464831= 26aee5e3c271 >> > = https://source.denx.de/u-boot/u-boot/-/commit/559911ff2ed09812fc0a87513183= a44d9ee100cf >> > = https://source.denx.de/u-boot/u-boot/-/commit/185571b6ec301cd228cb059326e5= 1fb51e76e816 >> > = https://source.denx.de/u-boot/u-boot/-/commit/5d334b70cce1d8299202d247011b= 609faeb8e583 >> > = https://source.denx.de/u-boot/u-boot/-/commit/9aa93d84038bb47bcd4e9ac4287e= f63e1b022971 >> > = https://source.denx.de/u-boot/u-boot/-/commit/c0165258582078c206faca352b0f= 63ccdf535ce7 >> > = https://source.denx.de/u-boot/u-boot/-/commit/b6fd3c63f4c5ba8cad518fa34e6a= 3289a6976f2e >>=20 >> Intersting. Thanks. >=20 > I did some more testing. > It seems that rock64 u-boot 2023.07.02 uses an embedded device tree = and passes it to the kernel. > The device-tree in the EFI partition is ignored. >=20 > The device tree is a merge of rk3328-rock64.dts and = rk3328-rock64-u-boot.dtsi > and since both rk3328-u-boot.dtsi and rk3328.dtsi have usb@ff600000, > the u-boot.dtsi version with compatible of "rockchip,rk3328-xhci" is = used instead > of "rockchip,rk3328-dwc3" which the FreeBSD kernel knows. >=20 > b71f74eab42782199757e146483126aee5e3c271 may be enough for FreeBSD to = see the controller. I do not know if the Rock64 related support will continue to be updated to track the linux upstream updates or not. (If not, then likely snapshots and releases for Rock64 would stop.) As stands I do not plan on going down a path that might not be what FreeBSD ends up with for Rock64 related support if it is updated. For now, I've just put the Rock64 to the side. But I'm keeping copies of your notes. >> > For Orange Pi R1 Plus I also needed the patch adding it: >> > = https://source.denx.de/u-boot/u-boot/-/commit/69e16c7b1cdd03907b86bb31abee= 24f5d4836400 >> >=20 >> > Unfortunately, there is some issue with the XHCI controller, at = list with >> > Realtek RTL8153 USB nic (built in on R1 Plus and tested external = card >> > plugged into Rock64) so it might have issues for other USB devices = too. >> > The nic doesn't work until the USB bus is reset and can get stuck = again. >> > It didn't work on 13.x either. >>=20 >> I've not historically had Rock64 Ethernet problems. >=20 > The problem I have is when connecting a USB ethernet card to Rock64 = USB 3.0 port. > The internal ethernet works fine. As I had world on the USB3, having an EtherNet dongle there is not something that I've tried. =3D=3D=3D Mark Millard marklmi at yahoo.com