Skip to content

Commit

Permalink
Platform/RPi/AcpiTables: Fix Pi 4 interrupts values
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
  • Loading branch information
pbatard authored and Ard Biesheuvel committed Mar 26, 2020
1 parent c9f3f68 commit f8b5562
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
24 changes: 14 additions & 10 deletions Platform/RaspberryPi/AcpiTables/AcpiTables.h
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion Platform/RaspberryPi/AcpiTables/Dsdt.asl
Expand Up @@ -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)
{
Expand Down

0 comments on commit f8b5562

Please sign in to comment.