From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by mx.groups.io with SMTP id smtpd.web10.35026.1585223616916999313 for ; Thu, 26 Mar 2020 04:53:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=WrDwEZY4; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.208.67, mailfrom: pete@akeo.ie) Received: by mail-ed1-f67.google.com with SMTP id u59so6413298edc.12 for ; Thu, 26 Mar 2020 04:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VdtXhfKtuQQimpJPZICYBRwAm4C4mUTsxEZyNmoqLcc=; b=WrDwEZY40mr9F07taBEaas4j9fMzp8JO8TcBl+QjluMZIYnq3Yj+GNNOwju2PEiBIH VUCK1PDmb+8FCESpfs/gdMTnY0N53XtGIyx4TixoeAQeTXP8j8y2VIiQmmxdcKeRTUhk mL73t8RQPFD1RzJ4MFSposaqPHCwb77Qol+ELKPd8wCndCVXW26jPC99CbrnmQfzLY45 6vQ3zaOuR4+XZRnwsq1HTuG060n3aNyEkg2G2Q4GL51qMjV34vbH0K4dmhWckLB/WiZE 6bPRtTf4tk1eerkLu1y6HjGs0tQiUm/7Iw8J4I+5zUgVJ88vuDsZhXQDWQsRmSP7TXSZ WTrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VdtXhfKtuQQimpJPZICYBRwAm4C4mUTsxEZyNmoqLcc=; b=UUi1TQVJyI0nP1WhBHtA8Hpbt9JkCM1gDPlm3vjARHvC5akpvceMWVgcfLyIHKM4LN GsNaxwzF2A+EKVe7iEJnCZ15x8R6QoK5eFzn9RzU7yQaZqiZnzdl0sJSCayUuKWOAZ2B DzDVNZ4g0GJmNQKw+EJwhKqPJ+dNIzDyB4bewngmAQdhSZbg5Y0+cxdDEwYNetoU39ul ZzefGdxXfH9gV+9zag6ubDWSJyokLxZrGC3GkQFkgtkTjzJDApShcvABprVK7W1F1onp 3Bcc0OND5vDMGEft4+mska8aLQ3WV1cFcT7Tq4SvAQvKbVqNgvOug87p8uthU9xP+AXu 98Iw== X-Gm-Message-State: ANhLgQ2gYd8NbZ9uDgcMgm9rCuUVwXrgYedN2StZnRe9qA54SXVThSTg V+9mInI59VcFn8NNnL+SPt/dgDpOhuTr9w== X-Google-Smtp-Source: ADFU+vvHEQBC4XA3SMLY6zHJ4AU2kqNmJzX+tUHaXcAYsPeCI/1/uxUeU1LM1RITaOSQSfKLpkhzIg== X-Received: by 2002:a17:906:3e0c:: with SMTP id k12mr6924999eji.309.1585223615015; Thu, 26 Mar 2020 04:53:35 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.78.33]) by smtp.gmail.com with ESMTPSA id bs8sm240534ejb.92.2020.03.26.04.53.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 04:53:34 -0700 (PDT) From: "Pete Batard" 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 Message-Id: <20200326115322.2880-2-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200326115322.2880-1-pete@akeo.ie> References: <20200326115322.2880-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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