Skip to contentSkip to conversation

x86: tangier: acpi: Add GPIO card detection to SDHCI #2

PATCH In review Andy Shevchenko 2 participants 2 messages Sep 11, 2021 – Sep 19, 2021 x86

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 x86: tangier: acpi: Add GPIO card detection to SDHCI #2

On Intel Tangier the SDHCI #2 provides SD card connection. Add GPIO card detection for it.

Fixes 39665beed6f7 ("x86: tangier: Enable ACPI support for Intel Tangier")

---
v3: basically returned to the content of v2 (pull bias back to none)
since there is nothing special about the signal which is supposed to be triggered by both edges

 .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/x86/include/asm/arch-tangier/acpi/southcluster.asl +32 -0
index 01077293bb91..41facdde6a3d 100644
@@ -97,6 +97,38 @@ Device (PCI0)
         }
     }
 
+    Device (SDHB)
+    {
+        Name (_ADR, 0x00010002)
+        Name (_DEP, Package ()
+        {
+            GPIO
+        })
+
+        Name (RBUF, ResourceTemplate()
+        {
+            GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
+                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 77 }
+        })
+
+        Method (_CRS, 0, Serialized)
+        {
+            Return (RBUF)
+        }
+
+        Name (_DSD, Package () {
+            ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+            Package () {
+                Package () { "cd-gpios", Package () { ^SDHB, 0, 0, 0 } },
+            }
+        })
+
+        Method (_STA)
+        {
+            Return (STA_VISIBLE)
+        }
+    }
+
     Device (SDHC)
     {
         Name (_ADR, 0x00010003)
Signature · 1 line
2.33.0
#1 lore raw
Quoted 8 lines · Andy Shevchenko

On Intel Tangier the SDHCI #2 provides SD card connection. Add GPIO card detection for it.

Fixes 39665beed6f7 ("x86: tangier: Enable ACPI support for Intel Tangier")
Quoted 8 lines

---
v3: basically returned to the content of v2 (pull bias back to none)
since there is nothing special about the signal which is supposed to be triggered by both edges

 .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)

applied to u-boot-x86, thanks!