All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2
@ 2021-09-10  7:59 Andy Shevchenko
  2021-09-10 11:37 ` Bin Meng
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2021-09-10  7:59 UTC (permalink / raw)
  To: Andy Shevchenko, u-boot; +Cc: Simon Glass, Bin Meng

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>
---
 .../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..41facdde6a3d 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, 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)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2
  2021-09-10  7:59 [PATCH v1 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2 Andy Shevchenko
@ 2021-09-10 11:37 ` Bin Meng
  2021-09-10 16:06   ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Bin Meng @ 2021-09-10 11:37 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: U-Boot Mailing List, Simon Glass

On Fri, Sep 10, 2021 at 3:59 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> 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>
> ---
>  .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
>  1 file changed, 32 insertions(+)
>

Acked-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2
  2021-09-10 11:37 ` Bin Meng
@ 2021-09-10 16:06   ` Andy Shevchenko
  2021-09-10 16:16     ` Bin Meng
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2021-09-10 16:06 UTC (permalink / raw)
  To: Bin Meng; +Cc: Andy Shevchenko, U-Boot Mailing List, Simon Glass

On Fri, Sep 10, 2021 at 2:38 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Fri, Sep 10, 2021 at 3:59 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> 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>
> > ---
> >  .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >
>
> Acked-by: Bin Meng <bmeng.cn@gmail.com>

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.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2
  2021-09-10 16:06   ` Andy Shevchenko
@ 2021-09-10 16:16     ` Bin Meng
  2021-09-10 17:59       ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Bin Meng @ 2021-09-10 16:16 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Andy Shevchenko, U-Boot Mailing List, Simon Glass

On Sat, Sep 11, 2021 at 12:07 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Fri, Sep 10, 2021 at 2:38 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > On Fri, Sep 10, 2021 at 3:59 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> 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>
> > > ---
> > >  .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
> > >  1 file changed, 32 insertions(+)
> > >
> >
> > Acked-by: Bin Meng <bmeng.cn@gmail.com>
>
> 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!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2
  2021-09-10 16:16     ` Bin Meng
@ 2021-09-10 17:59       ` Andy Shevchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2021-09-10 17:59 UTC (permalink / raw)
  To: Bin Meng; +Cc: Andy Shevchenko, U-Boot Mailing List, Simon Glass

On Fri, Sep 10, 2021 at 7:16 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> On Sat, Sep 11, 2021 at 12:07 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Fri, Sep 10, 2021 at 2:38 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > > On Fri, Sep 10, 2021 at 3:59 PM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> 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>
> > > > ---
> > > >  .../asm/arch-tangier/acpi/southcluster.asl    | 32 +++++++++++++++++++
> > > >  1 file changed, 32 insertions(+)
> > >
> > > Acked-by: Bin Meng <bmeng.cn@gmail.com>
> >
> > 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.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-10 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10  7:59 [PATCH v1 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2 Andy Shevchenko
2021-09-10 11:37 ` Bin Meng
2021-09-10 16:06   ` Andy Shevchenko
2021-09-10 16:16     ` Bin Meng
2021-09-10 17:59       ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.