Skip to contentSkip to conversation

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

PATCH Superseded Andy Shevchenko 3 participants 5 messages Sep 10, 2021 x86

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 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")
---
 .../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
Acked-by on v1 1/1
#1 lore raw
Quoted 11 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")
---
 .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
#2 lore raw
Quoted 15 lines · Bin Meng
Quoted 11 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")
---
 .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
Quoted 1 line

Thanks!

I think I need to adjust the IRQ flags, i.e. to put it as Exclusive and Wake. So I'll send a v2, but I'll keep your tag, I hope that's fine.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 17 lines · Andy Shevchenko
Quoted 15 lines · Bin Meng
Quoted 11 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")
---
 .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
Quoted 7 lines
Quoted 1 line

Thanks!

I think I need to adjust the IRQ flags, i.e. to put it as Exclusive and Wake. So I'll send a v2, but I'll keep your tag, I hope that's fine.

Sure!

#4 lore raw
Quoted 15 lines · Bin Meng
Quoted 13 lines · Andy Shevchenko
Quoted 12 lines · Bin Meng
Quoted 9 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")
---
 .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Thanks!

I think I need to adjust the IRQ flags, i.e. to put it as Exclusive and Wake. So I'll send a v2, but I'll keep your tag, I hope that's fine.

Sure!

Thinkg more about it. Intel Edison is a DIY-ish module and perhaps not everybody want to use SD card or (since there are not so many GPIOs are made out for use) take SD CD exclusively for it. So, I think the initial intention is better, But what I would change is a bias to be PullUp dues to some PCB misconfigurations (no external PU resistor). v2 soon on its way.

Signature · 2 lines
With Best Regards,
Andy Shevchenko