public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers
@ 2018-01-04 16:40 Andy Shevchenko
  2018-01-04 16:40 ` [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andy Shevchenko @ 2018-01-04 16:40 UTC (permalink / raw)
  To: u-boot

The recent commit 03c4749dd6c7
  ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation")
in the Linux kernel reveals the issue we have in ACPI tables here,
i.e. we must use hardware numbers for GPIO resources and,
taking into consideration that GPIO and pin control are *different* IPs
on Intel Tangier, we need to supply numbers properly.

Besides that, it improves user experience since the official documentation
for Intel Edison board is referring to GPIO hardware numbering scheme.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---

Bin, this is kinda urgent fix. I wouldn't like to have a release with
wrong numbering scheme, although there is none users yet, only couple
amateurs that are experimenting with the code.

 arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
index 288b57cb80..8162df59b5 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
@@ -173,13 +173,13 @@ Device (PCI0)
         Name (RBUF, ResourceTemplate()
         {
             GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
-                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 91 }
+                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 110 }
             GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
-                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 92 }
+                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 111 }
             GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
-                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 93 }
+                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 112 }
             GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
-                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 94 }
+                "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 113 }
         })
 
         Method (_CRS, 0, NotSerialized)
@@ -245,7 +245,7 @@ Device (PCI0)
         {
             Connection (
                 GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
-                    "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 56 }
+                    "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 96 }
             ),
             WFD3, 1,
         }
-- 
2.15.1

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

* [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table
  2018-01-04 16:40 [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers Andy Shevchenko
@ 2018-01-04 16:40 ` Andy Shevchenko
  2018-01-08  3:20   ` Bin Meng
  2018-01-08  4:51   ` Simon Glass
  2018-01-08  3:20 ` [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers Bin Meng
  2018-01-08  4:51 ` Simon Glass
  2 siblings, 2 replies; 8+ messages in thread
From: Andy Shevchenko @ 2018-01-04 16:40 UTC (permalink / raw)
  To: u-boot

As defined on reference board followed by Intel Edison a Bluetooth
device is attached to HSU0, i.e. PCI 0000:04.1.

Describe it in ACPI accordingly.

Note, we use BCM2E95 ID here as one most suitable for such device based
on the description in commit message of commit 89ab37b489d1
	("Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96")
in the Linux kernel source tree.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 .../include/asm/arch-tangier/acpi/southcluster.asl | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
index 8162df59b5..2b3b897c5b 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
@@ -260,6 +260,57 @@ Device (PCI0)
             Return (STA_VISIBLE)
         }
     }
+
+    Device (HSU0)
+    {
+        Name (_ADR, 0x00040001)
+
+        Method (_STA, 0, NotSerialized)
+        {
+            Return (STA_VISIBLE)
+        }
+
+        Device (BTH0)
+        {
+            Name (_HID, "BCM2E95")
+            Name (_DEP, Package ()
+            {
+                GPIO,
+                HSU0
+            })
+
+            Method (_STA, 0, NotSerialized)
+            {
+                Return (STA_VISIBLE)
+            }
+
+            Method (_CRS, 0, NotSerialized)
+            {
+                Name (RBUF, ResourceTemplate ()
+                {
+                    UartSerialBus (0x0001C200, DataBitsEight, StopBitsOne,
+                        0xFC, LittleEndian, ParityTypeNone, FlowControlHardware,
+                        0x20, 0x20, "\\_SB.PCI0.HSU0", 0, ResourceConsumer, , )
+                    GpioInt (Level, ActiveHigh, Exclusive, PullNone, 0,
+                        "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 185 }
+                    GpioIo (Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
+                        "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 184 }
+                    GpioIo (Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
+                        "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 71 }
+                })
+                Return (RBUF)
+            }
+
+            Name (_DSD, Package () {
+                ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+                Package () {
+                    Package () { "host-wakeup-gpios", Package () { ^BTH0, 0, 0, 0 } },
+                    Package () { "device-wakeup-gpios", Package () { ^BTH0, 1, 0, 0 } },
+                    Package () { "shutdown-gpios", Package () { ^BTH0, 2, 0, 0 } },
+                }
+            })
+        }
+    }
 }
 
 Device (FLIS)
-- 
2.15.1

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

* [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers
  2018-01-04 16:40 [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers Andy Shevchenko
  2018-01-04 16:40 ` [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table Andy Shevchenko
@ 2018-01-08  3:20 ` Bin Meng
  2018-01-08  4:51 ` Simon Glass
  2 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2018-01-08  3:20 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 5, 2018 at 12:40 AM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The recent commit 03c4749dd6c7
>   ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation")
> in the Linux kernel reveals the issue we have in ACPI tables here,
> i.e. we must use hardware numbers for GPIO resources and,
> taking into consideration that GPIO and pin control are *different* IPs
> on Intel Tangier, we need to supply numbers properly.
>
> Besides that, it improves user experience since the official documentation
> for Intel Edison board is referring to GPIO hardware numbering scheme.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> Bin, this is kinda urgent fix. I wouldn't like to have a release with
> wrong numbering scheme, although there is none users yet, only couple
> amateurs that are experimenting with the code.
>
>  arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>

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

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

* [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table
  2018-01-04 16:40 ` [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table Andy Shevchenko
@ 2018-01-08  3:20   ` Bin Meng
  2018-01-08  4:51   ` Simon Glass
  1 sibling, 0 replies; 8+ messages in thread
From: Bin Meng @ 2018-01-08  3:20 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 5, 2018 at 12:40 AM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> As defined on reference board followed by Intel Edison a Bluetooth
> device is attached to HSU0, i.e. PCI 0000:04.1.
>
> Describe it in ACPI accordingly.
>
> Note, we use BCM2E95 ID here as one most suitable for such device based
> on the description in commit message of commit 89ab37b489d1
>         ("Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96")
> in the Linux kernel source tree.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  .../include/asm/arch-tangier/acpi/southcluster.asl | 51 ++++++++++++++++++++++
>  1 file changed, 51 insertions(+)
>

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

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

* [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers
  2018-01-04 16:40 [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers Andy Shevchenko
  2018-01-04 16:40 ` [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table Andy Shevchenko
  2018-01-08  3:20 ` [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers Bin Meng
@ 2018-01-08  4:51 ` Simon Glass
  2018-01-09  1:51   ` Bin Meng
  2 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2018-01-08  4:51 UTC (permalink / raw)
  To: u-boot

On 4 January 2018 at 09:40, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The recent commit 03c4749dd6c7
>   ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation")
> in the Linux kernel reveals the issue we have in ACPI tables here,
> i.e. we must use hardware numbers for GPIO resources and,
> taking into consideration that GPIO and pin control are *different* IPs
> on Intel Tangier, we need to supply numbers properly.
>
> Besides that, it improves user experience since the official documentation
> for Intel Edison board is referring to GPIO hardware numbering scheme.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> Bin, this is kinda urgent fix. I wouldn't like to have a release with
> wrong numbering scheme, although there is none users yet, only couple
> amateurs that are experimenting with the code.

Reviewed-by: Simon Glass <sjg@chromium.org>

>
>  arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

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

* [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table
  2018-01-04 16:40 ` [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table Andy Shevchenko
  2018-01-08  3:20   ` Bin Meng
@ 2018-01-08  4:51   ` Simon Glass
  2018-01-09  1:51     ` Bin Meng
  1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2018-01-08  4:51 UTC (permalink / raw)
  To: u-boot

On 4 January 2018 at 09:40, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> As defined on reference board followed by Intel Edison a Bluetooth
> device is attached to HSU0, i.e. PCI 0000:04.1.
>
> Describe it in ACPI accordingly.
>
> Note, we use BCM2E95 ID here as one most suitable for such device based
> on the description in commit message of commit 89ab37b489d1
>         ("Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96")
> in the Linux kernel source tree.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  .../include/asm/arch-tangier/acpi/southcluster.asl | 51 ++++++++++++++++++++++
>  1 file changed, 51 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers
  2018-01-08  4:51 ` Simon Glass
@ 2018-01-09  1:51   ` Bin Meng
  0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2018-01-09  1:51 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 8, 2018 at 12:51 PM, Simon Glass <sjg@chromium.org> wrote:
> On 4 January 2018 at 09:40, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> The recent commit 03c4749dd6c7
>>   ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation")
>> in the Linux kernel reveals the issue we have in ACPI tables here,
>> i.e. we must use hardware numbers for GPIO resources and,
>> taking into consideration that GPIO and pin control are *different* IPs
>> on Intel Tangier, we need to supply numbers properly.
>>
>> Besides that, it improves user experience since the official documentation
>> for Intel Edison board is referring to GPIO hardware numbering scheme.
>>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> ---
>>
>> Bin, this is kinda urgent fix. I wouldn't like to have a release with
>> wrong numbering scheme, although there is none users yet, only couple
>> amateurs that are experimenting with the code.
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!

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

* [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table
  2018-01-08  4:51   ` Simon Glass
@ 2018-01-09  1:51     ` Bin Meng
  0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2018-01-09  1:51 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 8, 2018 at 12:51 PM, Simon Glass <sjg@chromium.org> wrote:
> On 4 January 2018 at 09:40, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> As defined on reference board followed by Intel Edison a Bluetooth
>> device is attached to HSU0, i.e. PCI 0000:04.1.
>>
>> Describe it in ACPI accordingly.
>>
>> Note, we use BCM2E95 ID here as one most suitable for such device based
>> on the description in commit message of commit 89ab37b489d1
>>         ("Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96")
>> in the Linux kernel source tree.
>>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> ---
>>  .../include/asm/arch-tangier/acpi/southcluster.asl | 51 ++++++++++++++++++++++
>>  1 file changed, 51 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!

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

end of thread, other threads:[~2018-01-09  1:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 16:40 [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers Andy Shevchenko
2018-01-04 16:40 ` [U-Boot] [PATCH v1 2/2] x86: tangier: Add Bluetooth to ACPI table Andy Shevchenko
2018-01-08  3:20   ` Bin Meng
2018-01-08  4:51   ` Simon Glass
2018-01-09  1:51     ` Bin Meng
2018-01-08  3:20 ` [U-Boot] [PATCH v1 1/2] x86: tangier: Use actual GPIO hardware numbers Bin Meng
2018-01-08  4:51 ` Simon Glass
2018-01-09  1:51   ` Bin Meng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox