From nobody Tue Jan 16 16:32:05 2024 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 4TDvg54BvXz57Z02 for ; Tue, 16 Jan 2024 16:32:17 +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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TDvg45gs2z4YfC for ; Tue, 16 Jan 2024 16:32:16 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1705422729; 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=2Aydkf1U3blwpnkrWYNU9rs2s8fBJvVM8z22o01HIlU=; b=GwvLURCF9jMC6+JRQyOx6M5SJdnz72LUtNiSjlW2PuvohVa7/d7qkjO0xQEcVc2pi9BOAe KaPDd3Pbw1VNizh7kw635uup9bYNDqueab5vMEEUqJPG9PUh32AZRwu7e0lpPRLXf5KBGI evLuaEAzri4RZ1vm5pQ/M6mncnwGIhU= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 0b8c796c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 16 Jan 2024 16:32:09 +0000 (UTC) Date: Tue, 16 Jan 2024 17:32:05 +0100 From: Emmanuel Vadot To: Doug Rabson Cc: Mike Karels , Mark Millard , FreeBSD ARM List Subject: Re: When will FreeBSD support RPI5? Message-Id: <20240116173205.41b4e0ebaacc42581a0d408d@bidouilliste.com> In-Reply-To: References: <5a39810c-5fd8-4969-a222-2561b050b035@FreeBSD.org> <347FE009-A470-4765-A9B9-7C9AB5E954DA@yahoo.com> <76FA010A-338F-4E32-B381-37C7BA63CAFC@yahoo.com> <1C02D1FA-5BF0-4C82-AD0E-6F9E5EB8A0B9@karels.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.0) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4TDvg45gs2z4YfC 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:12876, ipnet:212.83.128.0/19, country:FR] On Tue, 16 Jan 2024 14:57:40 +0000 Doug Rabson wrote: > On Sat, 13 Jan 2024 at 19:05, Mike Karels wrote: > > > On 13 Jan 2024, at 12:32, Mark Millard wrote: > > > > > On Jan 13, 2024, at 07:38, Doug Rabson wrote: > > > > > >> Getting back to the RPI 5, with a tweak to > > arm/broadcom/bcm2835bcm2835_vcbus.c to treat the memory config the same as > > RPI 4 and to dev/sdhci/sdhci_fdt.c to treat the RPI 5 sdhci controllers as > > generic, I can boot to multiuser mode using the EDK2 firmware from > > https://github.com/worproject/rpi5-uefi with ACPI/Device Tree mode set to > > Both. > > > > > > What does FreeBSD do with "Both"? Does it actually use some ACPI > > > and some Device Tree? Or does it just use ACPI? Does your > > > combination do anything different than just using ACPI? > > > > > >> This does not have working PCIe or ethernet yet - I think ethernet > > ought to work since we seem to have a matching driver in the tree in > > dev/cadence. > > > > > > Sounds like the same status as booting just ACPI with no such > > > adjustments too bcm2835bcm2835_vcbus.c or sdhci_fdt.c ? > > > > > > I think Mike Karels plans on investigating getting Ethernet > > > going based on cgem . I've no clue if this is ACPI, DeviceTree, > > > or both. > > > > The cadence/cgem driver uses FDT. I haven't looked at details yet. The > > addition > > might be as simple as adding a compat string. Hopefully it doesn't > > require major > > surgery. I just ordered an RPi 5 (8 GB); it will take a while to be > > delivered. > > > > The existing driver has the correct compat string but we don't get that far > since the rp1 node doesn't get probed and attached. This node is nested > under pcie@120000 and the whole subtree never gets explored. Interestingly, > if I hack the 2711 driver a little (based on reading Linux sources), I can > get that to attach and the rp1 southbridge is visible on the PCI bus with > vendor id 0x1de4, device id 0x0001. I made a stub driver for it but that > isn't particularly helpful since we need an FDT device to get simplebus to > attach and discover all the rp1 sub-devices. Why is there FDT children under a pci device ??? > I could try to add any ofw children to the pcie device, I guess. By the > looks of things, that just needs me to implement ofw_bus_get_devinfo and > maybe bus_get_resource_list in the pcie driver. Reading the DTB sources, > the 2711 pcie separates out the MSI part as a separate node in the DTB > which will need a driver before we can get much further. -- Emmanuel Vadot