From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Flavio Suligoi <f.suligoi@asem.it>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: How to add the "gpio-line-names" property in a PCI gpio expander
Date: Thu, 5 Nov 2020 18:19:19 +0200 [thread overview]
Message-ID: <20201105161919.GX4077@smile.fi.intel.com> (raw)
In-Reply-To: <20201105160925.GW4077@smile.fi.intel.com>
On Thu, Nov 05, 2020 at 06:09:25PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 05, 2020 at 03:54:32PM +0000, Flavio Suligoi wrote:
> > > > > > > In one of our boards we have an add-on PCI board, with a PCI
> > > serial
> > > > > device
> > > > > > > Exar XR17V352. This device also contains 16 gpios.
> > > > > > > The exar device drivers work good, both the "8250_exar" and the
> > > > > "gpio_exar", and
> > > > > > > I can manage the exar's gpios correctly.
> > > > > > > The problem is how to assign the gpio-line-names property to a PCI
> > > > > gpio
> > > > > > > expanders like this.
> > > > > > >
> > > > > > > I tried adding a new device in my ACPI configuration, as:
> > > > > > >
> > > > > > > Device (EXAR)
> > > > > > > {
> > > > > > > Name (_HID, "13A80352")
> > > > >
> > > > > If this is PCI device then you need to have _ADR here instead of _HID.
> > > >
> > > > the problem is that the parent bus of this device is not declared in any
> > > ACPI table.
> > > > The exar chip is on the bus 7 :
> > > >
> > > > 07:00.0 Serial controller: Exar Corp. XR17V3521 Dual PCIe UART (rev 03)
> > > >
> > > > and in the _ADR object you can specify device and function only.
> > > > How can I specify the parent bus? It is not simple …
> > > > The lspci output is the following:
> > >
> > > The parent is the root port the device is connected to and I'm pretty
> > > sure it exists in the namespace as this seems to be Intel hardware. If
> > > you run 'lspci -t' it shows you the root port.
> > >
> > > The _ADR should be 0 for this one.
> >
> > Unfortunately there is bridge in the middle:
> >
> > root@debian:~# lspci -t
> > -[0000:00]-+-00.0
> > +-02.0
> > +-0e.0
> > +-0f.0
> > +-12.0
> > +-13.0-[01]----00.0
> > +-13.1-[02]----00.0
> > +-13.2-[03]--
> > +-14.0-[04]----00.0
> > +-14.1-[05-09]----00.0-[06-09]--+-01.0-[07]----00.0 <-- Exar (bus 7, dev 0, funct 0)
> > | +-02.0-[08]----00.0
> > | \-03.0-[09]--
> > +-15.0
> > +-16.0
> > +-16.1
> > +-19.0
> > +-19.1
> > +-19.2
> > +-1f.0
> > \-1f.1
> > root@debian:~#
> >
> > My changes in the ACPI:
> >
> > Scope (_SB.PCI0) {
> > Device (EXAR)
> > {
> > Name (_ADR, 0x0000)
>
> _ADR should represent BDF (Bus:Device.Function)
>
> Something like 0x07000000
Per documentation:
"High word–Device #, Low word–Function #. (for example, device 3, function 2 is
0x00030002). To refer to all the functions on a device #, use a function number of FFFF)."
It seems it doesn't describe where bus is going.
Maybe Mika can help here.
> > ....
> >
> > but it doesn't work, because of the bridge.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2020-11-05 16:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 9:46 How to add the "gpio-line-names" property in a PCI gpio expander Flavio Suligoi
2020-11-05 11:51 ` Rafael J. Wysocki
2020-11-05 11:59 ` Mika Westerberg
2020-11-05 14:01 ` Flavio Suligoi
2020-11-05 15:20 ` Mika Westerberg
2020-11-05 15:54 ` Flavio Suligoi
2020-11-05 16:09 ` Andy Shevchenko
2020-11-05 16:19 ` Andy Shevchenko [this message]
2020-11-05 16:24 ` Flavio Suligoi
2020-11-06 7:04 ` Mika Westerberg
2020-11-06 16:47 ` Flavio Suligoi
2020-11-06 17:17 ` Andy Shevchenko
2020-11-09 9:05 ` Flavio Suligoi
2020-11-09 10:34 ` Andy Shevchenko
2020-11-09 10:35 ` Flavio Suligoi
2020-11-09 10:37 ` Andy Shevchenko
2020-11-05 15:56 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201105161919.GX4077@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=f.suligoi@asem.it \
--cc=linux-acpi@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox