Re: When will FreeBSD support RPI5?

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On Jan 13, 2024, at 11:22, Jesper Schmitz Mouridsen <[email protected]> wrote:
> 
> On 13.01.2024 19.32, Mark Millard wrote:
>> On Jan 13, 2024, at 07:38, Doug Rabson <[email protected]> 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?
> 
> How does the sd card show up?

Context below is via use of a aarch64 snapshot image
dd'd to USB3 media and use of a microsd card to hold
the EDK2:

# uname -apKU
FreeBSD generic 15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n267507-a61d2c7fbd3c: Thu Jan 11 06:26:30 UTC 2024     [email protected]:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 aarch64 1500008 1500008

# gpart show
=>       40  249737136  mmcsd0  GPT  (119G)
         40       2008          - free -  (1.0M)
       2048  249733120       1  efi  (119G)
  249735168       2008          - free -  (1.0M)

# mount -onoatime -tmsdosfs /dev/mmcsd0p1 /mnt

# ls -Tlod /mnt/*
-rwxr-xr-x  1 root wheel uarch 2031616 Jan  5 18:20:18 2024 /mnt/RPI_EFI.fd
-rwxr-xr-x  1 root wheel uarch   76038 Jan  5 18:21:50 2024 /mnt/bcm2712-rpi-5-b.dtb
-rwxr-xr-x  1 root wheel uarch     388 Jan  5 18:18:24 2024 /mnt/config.txt

# dmesg -a | grep -E "(sdhci|mmc)"
sdhci_acpi0: <Intel Bay Trail/Braswell SDXC Controller> iomem 0x1000fff000-0x1000fff25f irq 3 on acpi0
mmc0: <MMC/SD bus> on sdhci_acpi0
sdhci_acpi1: <Intel Bay Trail/Braswell SDXC Controller> iomem 0x1001100000-0x100110025f irq 4 on acpi0
mmc1: <MMC/SD bus> on sdhci_acpi1
mmcsd0: 128GB <SDHC SC128 8.0 SN REDACTED MFG 04/2018 by 3 SD> at mmc0 50.0MHz/4bit/65535-block
mmc1: No compatible cards found on bus

# more /mnt/config.txt 
armstub=RPI_EFI.fd
device_tree_address=0x1f0000
device_tree_end=0x210000

# Leave RP1 PCIe configured on hand-off.
pciex4_reset=0

# Force 32 bpp framebuffer allocation.
framebuffer_depth=32

# Disable compensation for displays with overscan.
disable_overscan=1

# Force maximum USB power regardless of the power supply.
usb_max_current_enable=1

# Force maximum CPU speed.
force_turbo=1

>  BTW i did put some stuff here [1]

> I could not get bcm_dma to work anyone planning on getting that to work? it should be similar to 2711 documented in [2]
> 
>>> 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.
>> 
>> My usage has been pure ACPI, no software adjustments specific
>> to getting the RPi5 operational. Use of a USB3 Ethernet dongle.
>> 
>> ===
>> Mark Millard
>> marklmi at yahoo.com
>> 
>> 
> [1] https://github.com/jsm222/rpi5-stuff
> 
> [2] https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf

===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.