From nobody Tue Jan 16 16:48:37 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 4TDw27692vz57bRN for ; Tue, 16 Jan 2024 16:48:47 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (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 "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TDw274Pk7z4bpj for ; Tue, 16 Jan 2024 16:48:47 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 40GGmc5r096177; Tue, 16 Jan 2024 10:48:38 -0600 (CST) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1705423718; bh=mGBTPC88JdXLokEFFHL0izH4zSsbXmg+PzsW5M1u460=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rdYUSMgp1C++0lghJVnVL3MX9/kJ1tAitPJm1RAvaQma1Q2oWXotPPscfd6nnHBOZ a9pl9z4h3XVqobynXEukmjJ2wFaC/i+59cqoz3Nml0eZQ6xuON/Szm5evEnMZRtR1V xEa+tfkk12RTwIxpYHy9v4S8VgIIhrSDSv3VI6+AIJdl/LtWfnaDzyvNxndp45PHhI t2uAUxMBTwhBrPSisQ+CoyOMsV664NCO1A7IFdg5isl/mboj8c7cezlIDpbglkyFis ZR+Ifvh/J2uOOUEXJ0zU1we4+OSYas7KWMbpxOAEpDGaa/34qOrh/VB5xR5RCtTuai gvymaTzxCLG9A== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id NHY6BWazpmWvdwEAs/W3XQ (envelope-from ); Tue, 16 Jan 2024 10:48:38 -0600 From: Mike Karels To: Doug Rabson Cc: Emmanuel Vadot , FreeBSD ARM List Subject: Re: When will FreeBSD support RPI5? Date: Tue, 16 Jan 2024 10:48:37 -0600 X-Mailer: MailMate (1.14r6015) Message-ID: <6226511F-3B6C-4ECE-A530-2C2F1ADD9FCD@karels.net> 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> <20240116173205.41b4e0ebaacc42581a0d408d@bidouilliste.com> 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 X-Rspamd-Queue-Id: 4TDw274Pk7z4bpj 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:16509, ipnet:3.16.0.0/14, country:US] On 16 Jan 2024, at 10:36, Doug Rabson wrote: > On Tue, 16 Jan 2024 at 16:32, Emmanuel Vadot wrote: > >> 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 ??? >> > > That's a very good question and I don't have an answer. This is just how > the DTB is structured: > > pcie@120000 { > > compatible = "brcm,bcm2712-pcie"; > ... > rp1 { > > compatible = "simple-bus"; The Mac mini also has pci devices with FDT entries. For example, the Broadcom PCI chip has its mac address in the DTB under what we call pci3, which is under pcib0 (the PCIe controller, which is located using FDT). Normal PCI mechanisms are used to find the secondary buses and Ethernet. Mike