Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2026 21:49:00 +0000
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Vince <git@darkain.com>
Subject:   git: 861deac98c4c - stable/15 - Fix xhci detection on Raspberry Pi 400
Message-ID:  <69ebe54c.3eddd.75e247c6@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=861deac98c4cd403b39c0d978bf2d39115c9caee

commit 861deac98c4cd403b39c0d978bf2d39115c9caee
Author:     Vince <git@darkain.com>
AuthorDate: 2026-04-02 01:28:50 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-04-24 21:44:33 +0000

    Fix xhci detection on Raspberry Pi 400
    
    If you use the FreeBSD pre-build Raspberry Pi image, it does not include
    the specific .dtb file for the Raspberry Pi 400. On this hardware, it
    will fall back to attempting to load the Raspberry Pi 4 .dtb file
    instead.
    
    The Pi 4 .dtb file reports the board compatible name as
    "raspberrypi,4-model-b" The Pi 400 .dtb file reports the board
    compatible name as "raspberrypi,400" However, it's even better to
    use the generic name.
    
    When using the official Pi 400 .dtb file from the Raspberry Pi Firmware
    collection, the FreeBSD xhci driver currently fails to recognize this,
    and thus fails to initialize the xhci device. This means no external
    USB, or internal USB (which feeds the build-in keyboard)
    
    The official Raspberry Pi FreeBSD image has been working on the Pi 400
    "on accident" simply because it didn't include the Pi 400 .dtb file
    prior to this. But the Stratipi Builder uses the full Raspberry Pi
    firmware suite and hit this bug.
    
    As a note: this is probably also a bug on the Compute Module 4 (CM4),
    but I don't own one of these devices in order to test/validate it.
    
    MFC After: 5 days
    Reviewed by: imp, Ali Mashtizadeh
    Pull Request: https://github.com/freebsd/freebsd-src/pull/2115
    
    (cherry picked from commit 7634043970078f63eea03bb8975bd3fe1e883130)
---
 sys/arm/broadcom/bcm2835/bcm2838_xhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/arm/broadcom/bcm2835/bcm2838_xhci.c b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c
index 25579d7227a5..b1461d17d391 100644
--- a/sys/arm/broadcom/bcm2835/bcm2838_xhci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c
@@ -89,7 +89,7 @@ bcm_xhci_probe(device_t dev)
 	root = OF_finddevice("/");
 	if (root == -1)
 		return (ENXIO);
-	if (!ofw_bus_node_is_compatible(root, "raspberrypi,4-model-b"))
+	if (!ofw_bus_node_is_compatible(root, "brcm,bcm2711"))
 		return (ENXIO);
 
 	/*
@@ -105,7 +105,7 @@ bcm_xhci_probe(device_t dev)
 		return (ENXIO);
 
 	device_set_desc(dev,
-	    "VL805 USB 3.0 controller (on the Raspberry Pi 4b)");
+	    "VL805 USB 3.0 controller (on the Raspberry Pi 4 series)");
 
 	return (BUS_PROBE_SPECIFIC);
 }


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ebe54c.3eddd.75e247c6>