From nobody Mon Jun 8 04:15:29 2026 Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 826BE17D6 for ; Sun, 7 Jun 2026 15:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=34.202.193.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780847047; cv=none; b=JObDA6CVPLT3JFz2Yaofynhbj6MNktvJiGykxKrk4cOQW+7Elb+ugGA8YGqK+hFpOqi4UKbn9YgddXtv+bLkcn84BX2P8iC+vSS2JWxlvu8BUsQFUvA3ByVJzujSazg1WVNL4AMjjVez0SU3eD8n4Asp5Eii5WaCxvcy3hIoBZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780847047; c=relaxed/simple; bh=zrAJjVuVOpwkp0E3QaqJyJWIrOj4ATGmSLb+c4q06rg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=dscKD6vgAM3wiJPNi33mGnywgt/2wVPoDsNMX+A/iMM3lyIn6LjHUOIAszs+SVX2iYA5FrkRo+JSbuNhcQsTBB0t7hgV4rj4iw9VBMRdOBaApMejd85g2Z9g2OGain2zmyS7diKQmKapnCimJIHf80ttNPAeZQ968yPwmPnSa3Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=crawford.dev; spf=pass smtp.mailfrom=crawford.dev; dkim=pass (2048-bit key) header.d=crawford.dev header.i=@crawford.dev header.b=oN1rmGGF; dkim=pass (2048-bit key) header.d=purelymail.com header.i=@purelymail.com header.b=aRafYyaq; arc=none smtp.client-ip=34.202.193.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=crawford.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crawford.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=crawford.dev header.i=@crawford.dev header.b="oN1rmGGF"; dkim=pass (2048-bit key) header.d=purelymail.com header.i=@purelymail.com header.b="aRafYyaq" Authentication-Results: purelymail.com; auth=pass DKIM-Signature: a=rsa-sha256; b=oN1rmGGFON05zRH67x+hh9wsLWzawMjcMP92az7A75oOp1CJ7RjwoZ1yKdiUi0axXDsgFVN6qZeytTfdPdSr6tmmnsMP7mw3Nu95if9HFwgaMWG1fzBhYBHgAzlvDsug7+ojXPJzf2KNc6KcBh6Aype7/Ksc7MdvRD3CM57S6af/NYcwxuF+OS0fYEOST2kKfePXg9FuYEnlr1fg3Tle++GpviyBOOA0PkM8NyJiBS/tPcvyREwwqNHTh6Xz+vHA9vMF2bkqPYiGe+OqrrqW6qyb5tg9OWIMMdwLGKobozw9wUN9uFP5UNXIpKX7KOGsSbE1kwXYV5nr3EU2RE9VsQ==; s=purelymail2; d=crawford.dev; v=1; bh=zrAJjVuVOpwkp0E3QaqJyJWIrOj4ATGmSLb+c4q06rg=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=aRafYyaqVIbsDkoajoxwglY4OZCSeX84SP0Hd0FmucpLePvHlvXcVodlOISPzDDKuZ6a932FOdLQXC5jdPndPiE3Pi1MPRr8ZBKCXrp8I9MohEElyEc+HmNRN/5O3U2dADuf4Ih0/DOJtmkRADnOXCYdNgwgxdruDOrEtbTQ9naNi6IWrBZ6GuJDlVX7u+SBL8pGFenEeqVH17ni4F6xVh2ixcgBJ8w62dZ+qrXjRIh6bSr+AOb5NQ3lLgjKCKjUEFxZs3MXgiChOx1E9/QpHuo9uYVkLsuIZn/Z4woenkuD3K0VxSquAGfP8TNKO3YZGnmLOMmAxT4j4ONBQPANBw==; s=purelymail2; d=purelymail.com; v=1; bh=zrAJjVuVOpwkp0E3QaqJyJWIrOj4ATGmSLb+c4q06rg=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 152360:15601:null:purelymail X-Pm-Original-To: linux-kernel@vger.kernel.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 458897218; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 07 Jun 2026 15:43:56 +0000 (UTC) From: Steve Crawford To: jassisinghbrar@gmail.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-list@raspberrypi.com, Steve Crawford Subject: [PATCH] mailbox: bcm2835: Add ACPI support for UEFI-booted Raspberry Pi 4 Date: Sun, 7 Jun 2026 17:43:50 +0200 Message-ID: <20260607154350.204064-1-steve@crawford.dev> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset="utf-8" On Raspberry Pi 4 booted via UEFI (e.g. using the pftf/RPi4 firmware), the kernel enumerates devices via ACPI rather than the device tree. The RPIQ mailbox device is already correctly described in the edk2-platforms GpuDevs.asl with HID BCM2849, complete with MMIO and interrupt resources, but the driver has no ACPI match table and therefore never binds. Add an ACPI device ID table matching BCM2849, and replace the DT-only irq_of_parse_and_map() call with platform_get_irq(), which handles both DT and ACPI resource lookup transparently. The existing DT path (brcm,bcm2835-mbox) is unchanged; this is a purely additive change that has no effect on any boot path other than UEFI+ACPI on RPi4. Testing ------- On Fedora CoreOS 44 (kernel 7.0.8-200.fc44.aarch64) booted via pftf/RPi4 UEFI v1.42, BCM2849:00 (the RPIQ mailbox device) is visible in ACPI but unbound. Using driver_override to force-bind the unpatched driver reproduces the exact failure this patch fixes: # echo bcm2835-mbox > /sys/bus/platform/devices/BCM2849:00/driver_override # echo BCM2849:00 > /sys/bus/platform/drivers/bcm2835-mbox/bind bcm2835-mbox BCM2849:00: error -EINVAL: request_irq(0) bcm2835_mbox_irq 0= x0 BCM2849:00 bcm2835-mbox BCM2849:00: Failed to register a mailbox IRQ handler: -22 irq_of_parse_and_map() returns 0 when dev->of_node is NULL (ACPI case). platform_get_irq() correctly reads the interrupt from the ACPI _CRS resources instead. Signed-off-by: Steve Crawford --- bcm2835-mailbox.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bcm2835-mailbox.c b/bcm2835-mailbox.c index ea12fb8..d450f3b 100644 --- a/bcm2835-mailbox.c +++ b/bcm2835-mailbox.c @@ -15,6 +15,7 @@ * https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interf= ace */ =20 +#include #include #include #include @@ -24,7 +25,6 @@ #include #include #include -#include #include #include =20 @@ -144,7 +144,7 @@ static int bcm2835_mbox_probe(struct platform_device *p= dev) return -ENOMEM; spin_lock_init(&mbox->lock); =20 - ret =3D devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0), + ret =3D devm_request_irq(dev, platform_get_irq(pdev, 0), bcm2835_mbox_irq, IRQF_NO_SUSPEND, dev_name(dev), mbox); if (ret) { @@ -186,10 +186,24 @@ static const struct of_device_id bcm2835_mbox_of_matc= h[] =3D { }; MODULE_DEVICE_TABLE(of, bcm2835_mbox_of_match); =20 +static const struct acpi_device_id bcm2835_mbox_acpi_match[] =3D { + /* + * BCM2849 is the ACPI HID for the RPi4 UEFI firmware's RPIQ mailbox + * device (defined in GpuDevs.asl of the tianocore/edk2-platforms RPi4 + * platform). On UEFI-booted systems this device carries the correct + * MMIO and interrupt resources, allowing the driver to bind via ACPI + * rather than the device tree. + */ + { "BCM2849", 0 }, + { } +}; +MODULE_DEVICE_TABLE(acpi, bcm2835_mbox_acpi_match); + static struct platform_driver bcm2835_mbox_driver =3D { .driver =3D { .name =3D "bcm2835-mbox", .of_match_table =3D bcm2835_mbox_of_match, + .acpi_match_table =3D bcm2835_mbox_acpi_match, }, .probe =3D bcm2835_mbox_probe, }; --=20 2.54.0