From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com,
awarkentin@vmware.com
Subject: [edk2-platforms][PATCH 1/6] Platform/RPi/AcpiTables: Fix Pi 4 interrupts values
Date: Thu, 26 Mar 2020 11:53:17 +0000 [thread overview]
Message-ID: <20200326115322.2880-2-pete@akeo.ie> (raw)
In-Reply-To: <20200326115322.2880-1-pete@akeo.ie>
Some of the Pi 4 interrupts were copied from Pi 3 and are incorrect.
We fix the ones that can be found by decompiling the official .dtbs.
We also add a couple more GPIO interrupts, that are used for both
the Pi 3 and the Pi 4, as per the dtbs.
Signed-off-by: Pete Batard <pete@akeo.ie>
---
Platform/RaspberryPi/AcpiTables/AcpiTables.h | 24 ++++++++++++--------
Platform/RaspberryPi/AcpiTables/Dsdt.asl | 6 ++++-
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/Platform/RaspberryPi/AcpiTables/AcpiTables.h b/Platform/RaspberryPi/AcpiTables/AcpiTables.h
index 0b8a8494450c..712a4a5806ae 100644
--- a/Platform/RaspberryPi/AcpiTables/AcpiTables.h
+++ b/Platform/RaspberryPi/AcpiTables/AcpiTables.h
@@ -125,7 +125,9 @@ typedef struct
#define BCM2836_MBOX_INTERRUPT 0x61
#define BCM2836_VCHIQ_INTERRUPT 0x62
#define BCM2386_GPIO_INTERRUPT0 0x51
-#define BCM2386_GPIO_INTERRUPT1 0x53
+#define BCM2386_GPIO_INTERRUPT1 0x52
+#define BCM2386_GPIO_INTERRUPT2 0x53
+#define BCM2386_GPIO_INTERRUPT3 0x54
#define BCM2836_I2C1_INTERRUPT 0x55
#define BCM2836_I2C2_INTERRUPT 0x55
#define BCM2836_SPI0_INTERRUPT 0x56
@@ -137,21 +139,23 @@ typedef struct
#elif (RPI_MODEL == 4)
#define BCM2836_V3D_BUS_INTERRUPT 0x2A
#define BCM2836_DMA_INTERRUPT 0x3B
-#define BCM2836_SPI1_INTERRUPT 0x3D
-#define BCM2836_SPI2_INTERRUPT 0x3D
+#define BCM2836_SPI1_INTERRUPT 0x7D
+#define BCM2836_SPI2_INTERRUPT 0x7D
#define BCM2836_HVS_INTERRUPT 0x41
#define BCM2836_HDMI0_INTERRUPT 0x48
#define BCM2836_HDMI1_INTERRUPT 0x49
#define BCM2836_PV2_INTERRUPT 0x4A
#define BCM2836_PV0_INTERRUPT 0x4D
#define BCM2836_PV1_INTERRUPT 0x4E
-#define BCM2836_MBOX_INTERRUPT 0x61
-#define BCM2836_VCHIQ_INTERRUPT 0x62
-#define BCM2386_GPIO_INTERRUPT0 0x51
-#define BCM2386_GPIO_INTERRUPT1 0x53
-#define BCM2836_I2C1_INTERRUPT 0x55
-#define BCM2836_I2C2_INTERRUPT 0x55
-#define BCM2836_SPI0_INTERRUPT 0x56
+#define BCM2836_MBOX_INTERRUPT 0x41
+#define BCM2836_VCHIQ_INTERRUPT 0x42
+#define BCM2386_GPIO_INTERRUPT0 0x91
+#define BCM2386_GPIO_INTERRUPT1 0x92
+#define BCM2386_GPIO_INTERRUPT2 0x93
+#define BCM2386_GPIO_INTERRUPT3 0x94
+#define BCM2836_I2C1_INTERRUPT 0x95
+#define BCM2836_I2C2_INTERRUPT 0x95
+#define BCM2836_SPI0_INTERRUPT 0x96
#define BCM2836_USB_INTERRUPT 0x69
#define BCM2836_SDHOST_INTERRUPT 0x98
#define BCM2836_MMCHS1_INTERRUPT 0x9E
diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/AcpiTables/Dsdt.asl
index 4a6fa6377d1b..2aa7d10bd40c 100644
--- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl
+++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl
@@ -279,7 +279,11 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2)
Name (RBUF, ResourceTemplate ()
{
MEMORY32FIXED (ReadWrite, 0, GPIO_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2386_GPIO_INTERRUPT0, BCM2386_GPIO_INTERRUPT1 }
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Shared)
+ {
+ BCM2386_GPIO_INTERRUPT0, BCM2386_GPIO_INTERRUPT1,
+ BCM2386_GPIO_INTERRUPT2, BCM2386_GPIO_INTERRUPT3
+ }
})
Method (_CRS, 0x0, Serialized)
{
--
2.21.0.windows.1
next prev parent reply other threads:[~2020-03-26 11:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 11:53 [edk2-platforms][PATCH 0/6] Platforms/RPi/AcpiTables: ACPI platform improvements Pete Batard
2020-03-26 11:53 ` Pete Batard [this message]
2020-03-26 11:53 ` [edk2-platforms][PATCH 2/6] Platform/RPi/AcpiTables: Replace VendorLong () blobs with PinFunction () Pete Batard
2020-03-26 11:53 ` [edk2-platforms][PATCH 3/6] Platform/RPi/AcpiTables: Use PCDs in MADT Pete Batard
2020-03-26 11:53 ` [edk2-platforms][PATCH 4/6] Platform/RPi/AcpiTables: Clean up ACPI IDs Pete Batard
2020-03-26 11:53 ` [edk2-platforms][PATCH 5/6] Platform/RPi/AcpiTables: Move GPU devices into a separate ASL file Pete Batard
2020-03-26 11:53 ` [edk2-platforms][PATCH 6/6] Platform/RPi/AcpiTables: Describe DMA constraints for devices behind GPU Pete Batard
2020-03-26 14:06 ` [edk2-platforms][PATCH 0/6] Platforms/RPi/AcpiTables: ACPI platform improvements Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200326115322.2880-2-pete@akeo.ie \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox