[PATCH v2 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") BugLink: https://github.com/edison-fw/meta-intel-edison/issues/135 Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com Acked-by: Bin Meng bmeng.cn@gmail.com --- v2: switched to pull up bias (WA against some PCBs), added tag (Bin) .../asm/arch-tangier/acpi/southcluster.asl | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+)
diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl index 01077293bb91..e6bbef108a7b 100644 --- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl +++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl @@ -97,6 +97,38 @@ Device (PCI0) } }
+ Device (SDHB) + { + Name (_ADR, 0x00010002) + Name (_DEP, Package () + { + GPIO + }) + + Name (RBUF, ResourceTemplate() + { + GpioInt(Edge, ActiveBoth, SharedAndWake, PullUp, 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)

On Fri, Sep 10, 2021 at 09:04:53PM +0300, Andy Shevchenko wrote:
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") BugLink: https://github.com/edison-fw/meta-intel-edison/issues/135 Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com Acked-by: Bin Meng bmeng.cn@gmail.com
v2: switched to pull up bias (WA against some PCBs), added tag (Bin)
It seems I need more testing into all this.
So, please defer for a while (*), I would like to be 100% all these parameters will work for most of the users.
*) couple of days, perhaps?

On Sat, Sep 11, 2021 at 3:44 AM Andy Shevchenko andriy.shevchenko@linux.intel.com wrote:
On Fri, Sep 10, 2021 at 09:04:53PM +0300, Andy Shevchenko wrote:
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") BugLink: https://github.com/edison-fw/meta-intel-edison/issues/135 Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com Acked-by: Bin Meng bmeng.cn@gmail.com
v2: switched to pull up bias (WA against some PCBs), added tag (Bin)
It seems I need more testing into all this.
So, please defer for a while (*), I would like to be 100% all these parameters will work for most of the users.
*) couple of days, perhaps?
Sure, no problem for me.
participants (2)
-
Andy Shevchenko
-
Bin Meng