[edk2-platform][PATCH v1 1/1] Platform/RaspberryPi/RPi4: Fix non-standard ACPI HIDs


Samer El-Haj-Mahmoud
 

Remove non-standard RPI ACPI _CIDs that are not needed.
This also fixes the FWTS failure reported in
https://github.com/pftf/RPi4/issues/67

The windows drivers at https://github.com/raspberrypi/windows-drivers
are still able to match the ACPI objects using the HIDs which
are supported in the drivers, with these two recent changes needed:
469702898789e555c6947e50216a3f79e0ddeb9
and
5c5e2742b4c983b3001c473b168b0dae2fcba0c2

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Pete Batard <pete@akeo.ie>
Cc: Andrei Warkentin <awarkentin@vmware.com>
Cc: Mario Bălănică <mariobalanica02@gmail.com>
Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Tested-by: Mario Bălănică <mariobalanica02@gmail.com>
---
Platform/RaspberryPi/AcpiTables/GpuDevs.asl | 26 +++++++++++---------
Platform/RaspberryPi/AcpiTables/Sdhc.asl | 4 +--
Platform/RaspberryPi/AcpiTables/Uart.asl | 2 +-
3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
index 966a94cdb5b5..9750dc25c07c 100644
--- a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
+++ b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
@@ -13,7 +13,11 @@
Device (USB0)
{
Name (_HID, "BCM2848")
- Name (_CID, Package() { "DWC_OTG", "DWC2_OTG" })
+#if (RPI_MODEL == 3)
+ Name (_CID, "DWC_OTG")
+#elif (RPI_MODEL == 4)
+ Name (_CID, "BCM2848")
+#endif
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -36,7 +40,7 @@ Device (USB0)
Device (GPU0)
{
Name (_HID, "BCM2850")
- Name (_CID, "VC4")
+ Name (_CID, "BCM2850")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -140,7 +144,7 @@ Device (GPU0)
Device (RPIQ)
{
Name (_HID, "BCM2849")
- Name (_CID, "RPIQ")
+ Name (_CID, "BCM2849")
Name (_UID, 0)
Name (_CCA, 0x0)
Method (_STA)
@@ -164,7 +168,7 @@ Device (RPIQ)
Device (VCIQ)
{
Name (_HID, "BCM2835")
- Name (_CID, "VCIQ")
+ Name (_CID, "BCM2835")
Name (_UID, 0)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.RPIQ })
@@ -189,7 +193,7 @@ Device (VCIQ)
Device (VCSM)
{
Name (_HID, "BCM2856")
- Name (_CID, "VCSM")
+ Name (_CID, "BCM2856")
Name (_UID, 0)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.VCIQ })
@@ -203,7 +207,7 @@ Device (VCSM)
Device (GPI0)
{
Name (_HID, "BCM2845")
- Name (_CID, "BCMGPIO")
+ Name (_CID, "BCM2845")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -230,7 +234,7 @@ Device (GPI0)
Device (I2C1)
{
Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
+ Name (_CID, "BCM2841")
Name (_UID, 0x1)
Name (_CCA, 0x0)
Method (_STA)
@@ -254,7 +258,7 @@ Device (I2C1)
Device (I2C2)
{
Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
+ Name (_CID, "BCM2841")
Name (_UID, 0x2)
Name (_CCA, 0x0)
Method (_STA)
@@ -278,7 +282,7 @@ Device (I2C2)
Device (SPI0)
{
Name (_HID, "BCM2838")
- Name (_CID, "BCMSPI0")
+ Name (_CID, "BCM2838")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -304,7 +308,7 @@ Device (SPI0)
Device (SPI1)
{
Name (_HID, "BCM2839")
- Name (_CID, "BCMAUXSPI")
+ Name (_CID, "BCM2839")
Name (_UID, 0x1)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.RPIQ })
@@ -331,7 +335,7 @@ Device (SPI1)
// Device (SPI2)
// {
// Name (_HID, "BCM2839")
-// Name (_CID, "BCMAUXSPI")
+// Name (_CID, "BCM2839")
// Name (_UID, 0x2)
// Name (_CCA, 0x0)
// Name (_DEP, Package() { \_SB.GDV0.RPIQ })
diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
index 42776e33bbc6..85d5053a338c 100644
--- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
+++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
@@ -23,7 +23,7 @@
Device (SDC1)
{
Name (_HID, "BCM2847")
- Name (_CID, "ARASAN")
+ Name (_CID, "BCM2847")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Name (_S1D, 0x1)
@@ -78,7 +78,7 @@ Device (SDC1)
Device (SDC2)
{
Name (_HID, "BCM2855")
- Name (_CID, "SDHST")
+ Name (_CID, "BCM2855")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Name (_S1D, 0x1)
diff --git a/Platform/RaspberryPi/AcpiTables/Uart.asl b/Platform/RaspberryPi/AcpiTables/Uart.asl
index 167f94e8892b..974f06d3bc3f 100644
--- a/Platform/RaspberryPi/AcpiTables/Uart.asl
+++ b/Platform/RaspberryPi/AcpiTables/Uart.asl
@@ -59,7 +59,7 @@ Device (URT0)
Device (URTM)
{
Name (_HID, "BCM2836")
- Name (_CID, "MINIUART")
+ Name (_CID, "BCM2836")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
--
2.25.1


Ard Biesheuvel
 

On Mon, 19 Jul 2021 at 22:45, Samer El-Haj-Mahmoud
<Samer.El-Haj-Mahmoud@arm.com> wrote:

Remove non-standard RPI ACPI _CIDs that are not needed.
This also fixes the FWTS failure reported in
https://github.com/pftf/RPi4/issues/67

The windows drivers at https://github.com/raspberrypi/windows-drivers
are still able to match the ACPI objects using the HIDs which
are supported in the drivers, with these two recent changes needed:
469702898789e555c6947e50216a3f79e0ddeb9
and
5c5e2742b4c983b3001c473b168b0dae2fcba0c2

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Pete Batard <pete@akeo.ie>
Cc: Andrei Warkentin <awarkentin@vmware.com>
Cc: Mario Bălănică <mariobalanica02@gmail.com>
Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Tested-by: Mario Bălănică <mariobalanica02@gmail.com>
Glad to see this getting cleaned up.

Anyone care to ack?


---
Platform/RaspberryPi/AcpiTables/GpuDevs.asl | 26 +++++++++++---------
Platform/RaspberryPi/AcpiTables/Sdhc.asl | 4 +--
Platform/RaspberryPi/AcpiTables/Uart.asl | 2 +-
3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
index 966a94cdb5b5..9750dc25c07c 100644
--- a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
+++ b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
@@ -13,7 +13,11 @@
Device (USB0)
{
Name (_HID, "BCM2848")
- Name (_CID, Package() { "DWC_OTG", "DWC2_OTG" })
+#if (RPI_MODEL == 3)
+ Name (_CID, "DWC_OTG")
+#elif (RPI_MODEL == 4)
+ Name (_CID, "BCM2848")
+#endif
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -36,7 +40,7 @@ Device (USB0)
Device (GPU0)
{
Name (_HID, "BCM2850")
- Name (_CID, "VC4")
+ Name (_CID, "BCM2850")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -140,7 +144,7 @@ Device (GPU0)
Device (RPIQ)
{
Name (_HID, "BCM2849")
- Name (_CID, "RPIQ")
+ Name (_CID, "BCM2849")
Name (_UID, 0)
Name (_CCA, 0x0)
Method (_STA)
@@ -164,7 +168,7 @@ Device (RPIQ)
Device (VCIQ)
{
Name (_HID, "BCM2835")
- Name (_CID, "VCIQ")
+ Name (_CID, "BCM2835")
Name (_UID, 0)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.RPIQ })
@@ -189,7 +193,7 @@ Device (VCIQ)
Device (VCSM)
{
Name (_HID, "BCM2856")
- Name (_CID, "VCSM")
+ Name (_CID, "BCM2856")
Name (_UID, 0)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.VCIQ })
@@ -203,7 +207,7 @@ Device (VCSM)
Device (GPI0)
{
Name (_HID, "BCM2845")
- Name (_CID, "BCMGPIO")
+ Name (_CID, "BCM2845")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -230,7 +234,7 @@ Device (GPI0)
Device (I2C1)
{
Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
+ Name (_CID, "BCM2841")
Name (_UID, 0x1)
Name (_CCA, 0x0)
Method (_STA)
@@ -254,7 +258,7 @@ Device (I2C1)
Device (I2C2)
{
Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
+ Name (_CID, "BCM2841")
Name (_UID, 0x2)
Name (_CCA, 0x0)
Method (_STA)
@@ -278,7 +282,7 @@ Device (I2C2)
Device (SPI0)
{
Name (_HID, "BCM2838")
- Name (_CID, "BCMSPI0")
+ Name (_CID, "BCM2838")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -304,7 +308,7 @@ Device (SPI0)
Device (SPI1)
{
Name (_HID, "BCM2839")
- Name (_CID, "BCMAUXSPI")
+ Name (_CID, "BCM2839")
Name (_UID, 0x1)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.RPIQ })
@@ -331,7 +335,7 @@ Device (SPI1)
// Device (SPI2)
// {
// Name (_HID, "BCM2839")
-// Name (_CID, "BCMAUXSPI")
+// Name (_CID, "BCM2839")
// Name (_UID, 0x2)
// Name (_CCA, 0x0)
// Name (_DEP, Package() { \_SB.GDV0.RPIQ })
diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
index 42776e33bbc6..85d5053a338c 100644
--- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
+++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
@@ -23,7 +23,7 @@
Device (SDC1)
{
Name (_HID, "BCM2847")
- Name (_CID, "ARASAN")
+ Name (_CID, "BCM2847")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Name (_S1D, 0x1)
@@ -78,7 +78,7 @@ Device (SDC1)
Device (SDC2)
{
Name (_HID, "BCM2855")
- Name (_CID, "SDHST")
+ Name (_CID, "BCM2855")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Name (_S1D, 0x1)
diff --git a/Platform/RaspberryPi/AcpiTables/Uart.asl b/Platform/RaspberryPi/AcpiTables/Uart.asl
index 167f94e8892b..974f06d3bc3f 100644
--- a/Platform/RaspberryPi/AcpiTables/Uart.asl
+++ b/Platform/RaspberryPi/AcpiTables/Uart.asl
@@ -59,7 +59,7 @@ Device (URT0)
Device (URTM)
{
Name (_HID, "BCM2836")
- Name (_CID, "MINIUART")
+ Name (_CID, "BCM2836")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
--
2.25.1


Andrei Warkentin
 

Reviewed-by: Andrei Warkentin <awarkentin@...>


From: Ard Biesheuvel <ardb@...>
Sent: Tuesday, July 20, 2021 10:37 AM
To: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Leif Lindholm <leif@...>; Ard Biesheuvel <ardb+tianocore@...>; Pete Batard <pete@...>; Andrei Warkentin <awarkentin@...>; Mario Bălănică <mariobalanica02@...>
Subject: Re: [edk2-platform][PATCH v1 1/1] Platform/RaspberryPi/RPi4: Fix non-standard ACPI HIDs
 
On Mon, 19 Jul 2021 at 22:45, Samer El-Haj-Mahmoud
<Samer.El-Haj-Mahmoud@...> wrote:
>
> Remove non-standard RPI ACPI _CIDs that are not needed.
> This also fixes the FWTS failure reported in
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpftf%2FRPi4%2Fissues%2F67&amp;data=04%7C01%7Cawarkentin%40vmware.com%7Cbfd9e47da54c40ef9c5408d94b51486a%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637623634750321947%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=YO4V6pksRlNqfPlMwO0VPKNVcp4npeP%2BN%2BpigTFfZnM%3D&amp;reserved=0
>
> The windows drivers at https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fraspberrypi%2Fwindows-drivers&amp;data=04%7C01%7Cawarkentin%40vmware.com%7Cbfd9e47da54c40ef9c5408d94b51486a%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637623634750321947%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=PMkBX%2F6vHaAoUC5tkCA7aAldaYEKFgh9w3yFYsgNrPQ%3D&amp;reserved=0
> are still able to match the ACPI objects using the HIDs which
> are supported in the drivers, with these two recent changes needed:
> 469702898789e555c6947e50216a3f79e0ddeb9
> and
> 5c5e2742b4c983b3001c473b168b0dae2fcba0c2
>
> Cc: Leif Lindholm <leif@...>
> Cc: Ard Biesheuvel <ardb+tianocore@...>
> Cc: Pete Batard <pete@...>
> Cc: Andrei Warkentin <awarkentin@...>
> Cc: Mario Bălănică <mariobalanica02@...>
> Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
> Tested-by: Mario Bălănică <mariobalanica02@...>

Glad to see this getting cleaned up.

Anyone care to ack?


> ---
>  Platform/RaspberryPi/AcpiTables/GpuDevs.asl | 26 +++++++++++---------
>  Platform/RaspberryPi/AcpiTables/Sdhc.asl    |  4 +--
>  Platform/RaspberryPi/AcpiTables/Uart.asl    |  2 +-
>  3 files changed, 18 insertions(+), 14 deletions(-)
>
> diff --git a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
> index 966a94cdb5b5..9750dc25c07c 100644
> --- a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
> +++ b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
> @@ -13,7 +13,11 @@
>  Device (USB0)
>  {
>    Name (_HID, "BCM2848")
> -  Name (_CID, Package() { "DWC_OTG", "DWC2_OTG" })
> +#if (RPI_MODEL == 3)
> +  Name (_CID, "DWC_OTG")
> +#elif (RPI_MODEL == 4)
> +  Name (_CID, "BCM2848")
> +#endif
>    Name (_UID, 0x0)
>    Name (_CCA, 0x0)
>    Method (_STA)
> @@ -36,7 +40,7 @@ Device (USB0)
>  Device (GPU0)
>  {
>    Name (_HID, "BCM2850")
> -  Name (_CID, "VC4")
> +  Name (_CID, "BCM2850")
>    Name (_UID, 0x0)
>    Name (_CCA, 0x0)
>    Method (_STA)
> @@ -140,7 +144,7 @@ Device (GPU0)
>  Device (RPIQ)
>  {
>    Name (_HID, "BCM2849")
> -  Name (_CID, "RPIQ")
> +  Name (_CID, "BCM2849")
>    Name (_UID, 0)
>    Name (_CCA, 0x0)
>    Method (_STA)
> @@ -164,7 +168,7 @@ Device (RPIQ)
>  Device (VCIQ)
>  {
>    Name (_HID, "BCM2835")
> -  Name (_CID, "VCIQ")
> +  Name (_CID, "BCM2835")
>    Name (_UID, 0)
>    Name (_CCA, 0x0)
>    Name (_DEP, Package() { \_SB.GDV0.RPIQ })
> @@ -189,7 +193,7 @@ Device (VCIQ)
>  Device (VCSM)
>  {
>    Name (_HID, "BCM2856")
> -  Name (_CID, "VCSM")
> +  Name (_CID, "BCM2856")
>    Name (_UID, 0)
>    Name (_CCA, 0x0)
>    Name (_DEP, Package() { \_SB.GDV0.VCIQ })
> @@ -203,7 +207,7 @@ Device (VCSM)
>  Device (GPI0)
>  {
>    Name (_HID, "BCM2845")
> -  Name (_CID, "BCMGPIO")
> +  Name (_CID, "BCM2845")
>    Name (_UID, 0x0)
>    Name (_CCA, 0x0)
>    Method (_STA)
> @@ -230,7 +234,7 @@ Device (GPI0)
>  Device (I2C1)
>  {
>    Name (_HID, "BCM2841")
> -  Name (_CID, "BCMI2C")
> +  Name (_CID, "BCM2841")
>    Name (_UID, 0x1)
>    Name (_CCA, 0x0)
>    Method (_STA)
> @@ -254,7 +258,7 @@ Device (I2C1)
>  Device (I2C2)
>  {
>    Name (_HID, "BCM2841")
> -  Name (_CID, "BCMI2C")
> +  Name (_CID, "BCM2841")
>    Name (_UID, 0x2)
>    Name (_CCA, 0x0)
>    Method (_STA)
> @@ -278,7 +282,7 @@ Device (I2C2)
>  Device (SPI0)
>  {
>    Name (_HID, "BCM2838")
> -  Name (_CID, "BCMSPI0")
> +  Name (_CID, "BCM2838")
>    Name (_UID, 0x0)
>    Name (_CCA, 0x0)
>    Method (_STA)
> @@ -304,7 +308,7 @@ Device (SPI0)
>  Device (SPI1)
>  {
>    Name (_HID, "BCM2839")
> -  Name (_CID, "BCMAUXSPI")
> +  Name (_CID, "BCM2839")
>    Name (_UID, 0x1)
>    Name (_CCA, 0x0)
>    Name (_DEP, Package() { \_SB.GDV0.RPIQ })
> @@ -331,7 +335,7 @@ Device (SPI1)
>  // Device (SPI2)
>  // {
>  //   Name (_HID, "BCM2839")
> -//   Name (_CID, "BCMAUXSPI")
> +//   Name (_CID, "BCM2839")
>  //   Name (_UID, 0x2)
>  //   Name (_CCA, 0x0)
>  //   Name (_DEP, Package() { \_SB.GDV0.RPIQ })
> diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> index 42776e33bbc6..85d5053a338c 100644
> --- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
> @@ -23,7 +23,7 @@
>  Device (SDC1)
>  {
>    Name (_HID, "BCM2847")
> -  Name (_CID, "ARASAN")
> +  Name (_CID, "BCM2847")
>    Name (_UID, 0x0)
>    Name (_CCA, 0x0)
>    Name (_S1D, 0x1)
> @@ -78,7 +78,7 @@ Device (SDC1)
>  Device (SDC2)
>  {
>    Name (_HID, "BCM2855")
> -  Name (_CID, "SDHST")
> +  Name (_CID, "BCM2855")
>    Name (_UID, 0x0)
>    Name (_CCA, 0x0)
>    Name (_S1D, 0x1)
> diff --git a/Platform/RaspberryPi/AcpiTables/Uart.asl b/Platform/RaspberryPi/AcpiTables/Uart.asl
> index 167f94e8892b..974f06d3bc3f 100644
> --- a/Platform/RaspberryPi/AcpiTables/Uart.asl
> +++ b/Platform/RaspberryPi/AcpiTables/Uart.asl
> @@ -59,7 +59,7 @@ Device (URT0)
>  Device (URTM)
>  {
>    Name (_HID, "BCM2836")
> -  Name (_CID, "MINIUART")
> +  Name (_CID, "BCM2836")
>    Name (_UID, 0x0)
>    Name (_CCA, 0x0)
>    Method (_STA)
> --
> 2.25.1
>


Ard Biesheuvel
 

On Wed, 21 Jul 2021 at 22:39, Andrei Warkentin <awarkentin@vmware.com> wrote:

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
Pushed as d549e39ca1a9..194269223294

Thanks all,

________________________________
From: Ard Biesheuvel <ardb@kernel.org>
Sent: Tuesday, July 20, 2021 10:37 AM
To: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Leif Lindholm <leif@nuviainc.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Pete Batard <pete@akeo.ie>; Andrei Warkentin <awarkentin@vmware.com>; Mario Bălănică <mariobalanica02@gmail.com>
Subject: Re: [edk2-platform][PATCH v1 1/1] Platform/RaspberryPi/RPi4: Fix non-standard ACPI HIDs

On Mon, 19 Jul 2021 at 22:45, Samer El-Haj-Mahmoud
<Samer.El-Haj-Mahmoud@arm.com> wrote:

Remove non-standard RPI ACPI _CIDs that are not needed.
This also fixes the FWTS failure reported in
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpftf%2FRPi4%2Fissues%2F67&;data=04%7C01%7Cawarkentin%40vmware.com%7Cbfd9e47da54c40ef9c5408d94b51486a%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637623634750321947%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=YO4V6pksRlNqfPlMwO0VPKNVcp4npeP%2BN%2BpigTFfZnM%3D&amp;reserved=0

The windows drivers at https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fraspberrypi%2Fwindows-drivers&;data=04%7C01%7Cawarkentin%40vmware.com%7Cbfd9e47da54c40ef9c5408d94b51486a%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637623634750321947%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=PMkBX%2F6vHaAoUC5tkCA7aAldaYEKFgh9w3yFYsgNrPQ%3D&amp;reserved=0
are still able to match the ACPI objects using the HIDs which
are supported in the drivers, with these two recent changes needed:
469702898789e555c6947e50216a3f79e0ddeb9
and
5c5e2742b4c983b3001c473b168b0dae2fcba0c2

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Pete Batard <pete@akeo.ie>
Cc: Andrei Warkentin <awarkentin@vmware.com>
Cc: Mario Bălănică <mariobalanica02@gmail.com>
Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Tested-by: Mario Bălănică <mariobalanica02@gmail.com>
Glad to see this getting cleaned up.

Anyone care to ack?


---
Platform/RaspberryPi/AcpiTables/GpuDevs.asl | 26 +++++++++++---------
Platform/RaspberryPi/AcpiTables/Sdhc.asl | 4 +--
Platform/RaspberryPi/AcpiTables/Uart.asl | 2 +-
3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
index 966a94cdb5b5..9750dc25c07c 100644
--- a/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
+++ b/Platform/RaspberryPi/AcpiTables/GpuDevs.asl
@@ -13,7 +13,11 @@
Device (USB0)
{
Name (_HID, "BCM2848")
- Name (_CID, Package() { "DWC_OTG", "DWC2_OTG" })
+#if (RPI_MODEL == 3)
+ Name (_CID, "DWC_OTG")
+#elif (RPI_MODEL == 4)
+ Name (_CID, "BCM2848")
+#endif
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -36,7 +40,7 @@ Device (USB0)
Device (GPU0)
{
Name (_HID, "BCM2850")
- Name (_CID, "VC4")
+ Name (_CID, "BCM2850")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -140,7 +144,7 @@ Device (GPU0)
Device (RPIQ)
{
Name (_HID, "BCM2849")
- Name (_CID, "RPIQ")
+ Name (_CID, "BCM2849")
Name (_UID, 0)
Name (_CCA, 0x0)
Method (_STA)
@@ -164,7 +168,7 @@ Device (RPIQ)
Device (VCIQ)
{
Name (_HID, "BCM2835")
- Name (_CID, "VCIQ")
+ Name (_CID, "BCM2835")
Name (_UID, 0)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.RPIQ })
@@ -189,7 +193,7 @@ Device (VCIQ)
Device (VCSM)
{
Name (_HID, "BCM2856")
- Name (_CID, "VCSM")
+ Name (_CID, "BCM2856")
Name (_UID, 0)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.VCIQ })
@@ -203,7 +207,7 @@ Device (VCSM)
Device (GPI0)
{
Name (_HID, "BCM2845")
- Name (_CID, "BCMGPIO")
+ Name (_CID, "BCM2845")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -230,7 +234,7 @@ Device (GPI0)
Device (I2C1)
{
Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
+ Name (_CID, "BCM2841")
Name (_UID, 0x1)
Name (_CCA, 0x0)
Method (_STA)
@@ -254,7 +258,7 @@ Device (I2C1)
Device (I2C2)
{
Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
+ Name (_CID, "BCM2841")
Name (_UID, 0x2)
Name (_CCA, 0x0)
Method (_STA)
@@ -278,7 +282,7 @@ Device (I2C2)
Device (SPI0)
{
Name (_HID, "BCM2838")
- Name (_CID, "BCMSPI0")
+ Name (_CID, "BCM2838")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
@@ -304,7 +308,7 @@ Device (SPI0)
Device (SPI1)
{
Name (_HID, "BCM2839")
- Name (_CID, "BCMAUXSPI")
+ Name (_CID, "BCM2839")
Name (_UID, 0x1)
Name (_CCA, 0x0)
Name (_DEP, Package() { \_SB.GDV0.RPIQ })
@@ -331,7 +335,7 @@ Device (SPI1)
// Device (SPI2)
// {
// Name (_HID, "BCM2839")
-// Name (_CID, "BCMAUXSPI")
+// Name (_CID, "BCM2839")
// Name (_UID, 0x2)
// Name (_CCA, 0x0)
// Name (_DEP, Package() { \_SB.GDV0.RPIQ })
diff --git a/Platform/RaspberryPi/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
index 42776e33bbc6..85d5053a338c 100644
--- a/Platform/RaspberryPi/AcpiTables/Sdhc.asl
+++ b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
@@ -23,7 +23,7 @@
Device (SDC1)
{
Name (_HID, "BCM2847")
- Name (_CID, "ARASAN")
+ Name (_CID, "BCM2847")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Name (_S1D, 0x1)
@@ -78,7 +78,7 @@ Device (SDC1)
Device (SDC2)
{
Name (_HID, "BCM2855")
- Name (_CID, "SDHST")
+ Name (_CID, "BCM2855")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Name (_S1D, 0x1)
diff --git a/Platform/RaspberryPi/AcpiTables/Uart.asl b/Platform/RaspberryPi/AcpiTables/Uart.asl
index 167f94e8892b..974f06d3bc3f 100644
--- a/Platform/RaspberryPi/AcpiTables/Uart.asl
+++ b/Platform/RaspberryPi/AcpiTables/Uart.asl
@@ -59,7 +59,7 @@ Device (URT0)
Device (URTM)
{
Name (_HID, "BCM2836")
- Name (_CID, "MINIUART")
+ Name (_CID, "BCM2836")
Name (_UID, 0x0)
Name (_CCA, 0x0)
Method (_STA)
--
2.25.1