From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B30ABC31E4B for ; Fri, 14 Jun 2019 20:25:18 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62976217F9 for ; Fri, 14 Jun 2019 20:25:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b="LKzYXFxv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cn8+dck+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62976217F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=fastmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92) (envelope-from ) id 1hbsks-0003Hj-JV; Fri, 14 Jun 2019 16:24:58 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hbskq-0003Hd-BQ for kernelnewbies@kernelnewbies.org; Fri, 14 Jun 2019 16:24:56 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 654FD220CF; Fri, 14 Jun 2019 16:24:55 -0400 (EDT) Received: from imap4 ([10.202.2.54]) by compute3.internal (MEProxy); Fri, 14 Jun 2019 16:24:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm3; bh=4qKi/z5n2SCYRqgpqQQNtw/gwJy0gJn lDsBX5JTpyxY=; b=LKzYXFxvaHDymtGbe0MvfWkZ6xmgYHadM/3jJj+VDTKQQ3y ljiG/KvUULO1IiMYqFcvA9VW6Ast/Ia2hLqZk9xGVourg43q/IXO3osH5j3u1RhD zvTEppKbL9VyBuy4VXumIUzMtWRSKSXUUEuOEkSeLNh6btVpMk+E7Vg6jgdu6uqe VQMnWXsHZO9vDA2O9fgv6xH6EYWq0QvtZGN771E3F38n0+zHKEI4aVOdfRo+ehsz wq8vAnaexDUqkF3R6hSAfzCgUz+3M/x45OdYp3+CcvjwjAhQE3RzitOUgflU7XWN Axx63EmCTw1JXHJypk/sj7HoUTRVIfL7CvRTUMg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=4qKi/z 5n2SCYRqgpqQQNtw/gwJy0gJnlDsBX5JTpyxY=; b=cn8+dck+diy9zYAm/g3fQ9 PGXFMYLztzmz2wxouXRuqEbSsqTeLIM0GdLMaEH33XpYiOkg/Gvd8qZaQnruIQKO T2U6mgfatKN0i1P74mbP7JAskTj6w70Th22hQNoJWBZQpk84xkMf4j8LRj45IO8k ujWxzdF7rfcPXA8DDbc9PjN7k/LG3UKavHQxMYsIfCB3BhaP3hetIi17EXIWRj9j P67AcAHwtfDV57XhvQMhEiO8bMF8EzQwgW/BKy6lIwkBb7JA+rr7Vjjx9/7jF8+S dngSIvpaorpuHiNu1W2I/SxYX02ThBBynGXZ3f2ZRP6N/WqbazuMWPk5EP3JWJuQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudeiuddgudehvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedftehl vgigrghnuggvrhcukfhvrghnohhvfdcuoegrmhhivhgrnhhovhesfhgrshhtmhgrihhlrd gtohhmqeenucfrrghrrghmpehmrghilhhfrhhomheprghmihhvrghnohhvsehfrghsthhm rghilhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6CE3B3C00A0; Fri, 14 Jun 2019 16:24:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.6-663-gf46ad30-fmstable-20190607v1 Mime-Version: 1.0 Message-Id: In-Reply-To: <25501.1560539366@turing-police> References: <23630.1560537979@turing-police> <59c1b6d6-0545-4249-90cb-d1152b6ea728@www.fastmail.com> <25501.1560539366@turing-police> Date: Fri, 14 Jun 2019 13:25:32 -0700 From: "Alexander Ivanov" To: =?UTF-8?Q?Valdis_Kl=C4=93tnieks?= , =?UTF-8?Q?Bj=C3=B8rn_Mork?= Subject: Re: GPIO Driver for Skylake-Y PCH Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1295119863331611409==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============1295119863331611409== Content-Type: multipart/alternative; boundary=202e3bce18a84acfb0396e18c47a4362 --202e3bce18a84acfb0396e18c47a4362 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, 14 Jun 2019 12:09 -07:00, Valdis Kl=C4=93tnieks wrote: > On Fri, 14 Jun 2019 12:01:28 -0700, you said: >=20 > > > static const struct pci_device_id pch_gpio_pcidev_id[] =3D { > > > { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) }, > > > { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) }, > > > { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043) }, > > > { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803) }, > > > { 0, } > > > }; > > > MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id); >=20 > > It is a PCI device with 8086/9d20 IDs. >=20 > Give this patch a try, if it works I'll push it upstream for you... >=20 > diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c > index 1d99293096f2..19884b5b2a74 100644 > --- a/drivers/gpio/gpio-pch.c > +++ b/drivers/gpio/gpio-pch.c > @@ -439,6 +439,7 @@ static SIMPLE_DEV_PM_OPS(pch_gpio_pm_ops, pch_gpio= _suspend, pch_gpio_resume); >=20 > static const struct pci_device_id pch_gpio_pcidev_id[] =3D { > { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) }, > + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9d20) }, > { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) }, > { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043) }, > { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803) }, >=20 I did try this. It did not enumerate. There is one little detail. This device is hidden by default in motherbo= ard FW. However, I manually un-hide it before trying to enumerate the de= vice. gpio-pch driver's patched as you described, built out-of-tree and loaded= . Then, I un-hide the device and rescan the bus: # echo 1 > /sys/bus/pcie/rescan On Fri, 14 Jun 2019 12:13 -07:00, Bj=C3=B8rn Mork wrote:= > "Valdis Kl=C4=93tnieks" writes: > > > Though I'm having a hard time aligning that with "D31:F2". Are you c= onfusing > > a PCI address with a PCI ID, or is this on a non-PCI bus? > > "D31:F2" is device 31, function 2. We're used to see this as "1f.2". > > The question is really: Is there such a device in the system? And if s= o: > What's the ID? That's easy to find out: > > lspci -vvvnns 0:1f.2 > Device is indeed there: lspci -vvvnns 1f.1 00:1f.1 Memory controller [0580]: Intel Corporation Device [8086:9d20] (= rev 21) Subsystem: Gigabyte Technology Co., Ltd Device [1458:1000] Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Ste= pping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=3Dfast >TAbort- SERR-

=
On Fri, 14 Jun 2019 12:09 -07:00, Valdis Kl=C4=93tnieks &= lt;valdis.kletnieks@vt.edu> wrote:
On Fri, 14 Jun 2019 12:01:28 -0700, you said:
<= div>
> > static const struct pci_device_id pch_gpio_= pcidev_id[] =3D {
> >  { PCI_DEVICE(PCI_VENDOR_= ID_INTEL, 0x8803) },
> >  { PCI_DEVICE(PCI_VEND= OR_ID_ROHM, 0x8014) },
> >  { PCI_DEVICE(PCI_VE= NDOR_ID_ROHM, 0x8043) },
> >  { PCI_DEVICE(PCI_= VENDOR_ID_ROHM, 0x8803) },
> >  { 0, }
> > };
> > MODULE_DEVICE_TABLE(pci, pch_= gpio_pcidev_id);

> It is a PCI device wi= th 8086/9d20 IDs.

Give this patch a try, if= it works I'll push it upstream for you...

= diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
=
index 1d99293096f2..19884b5b2a74 100644
--- a/drivers= /gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -439,6 +439,7 @@ static SIMPLE_DEV_PM_OPS(pch_gpio_pm_ops, pch_gpi= o_suspend, pch_gpio_resume);

static const s= truct pci_device_id pch_gpio_pcidev_id[] =3D {
{ PCI_DEVIC= E(PCI_VENDOR_ID_INTEL, 0x8803) },
+ { PCI_DEVICE(PCI_VENDO= R_ID_INTEL, 0x9d20) },
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x= 8014) },
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043) },
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803) },

<= /div>


I did try this. It = did not enumerate.
There is one little detail. This device= is hidden by default in motherboard FW. However, I manually un-hide it = before trying to enumerate the device.

gpio= -pch driver's patched as you described, built out-of-tree and loaded. Th= en, I un-hide the device and rescan the bus:

# echo 1 > /sys/bus/pcie/rescan




On Fri, 14 Jun 2019 12:13 -07:00,= Bj=C3=B8rn Mork <bjorn@mork.no&= gt; wrote:
> "Valdis Kl=C4=93tnieks" <valdis.kletnieks@vt.edu> writes:
=
>
> > Though I'm having a hard time al= igning that with "D31:F2". Are you confusing
> > a P= CI address with a PCI ID, or is this on a non-PCI bus?
>= ;
> "D31:F2" is device 31, function 2. We're used to se= e this as "1f.2".
>
> The question is = really: Is there such a device in the system? And if so:
&= gt; What's the ID? That's easy to find out:
>
=
>   lspci -vvvnns 0:1f.2
>
<= div>
Device is indeed there:
lspci -vvvnns 1= f.1
00:1f.1 Memory controller [0580]: Intel Corporation De= vice [8086:9d20] (rev 21)
     &n= bsp;  Subsystem: Gigabyte Technology Co., Ltd Device [1458:1000]
        Control: I/O- Mem= + BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB= 2B- DisINTx-
        St= atus: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=3Dfast >TAbort- <TA= bort- <MAbort- >SERR- <PERR- INTx-
  &n= bsp;     Latency: 0
   =      Region 0: Memory at 7d000000 (64-bit, non-prefe= tchable) [size=3D16M]


ps. I = misstyped device address in my original post, it is supposed to be funct= ion 1 not 2: d31:f1.
--202e3bce18a84acfb0396e18c47a4362-- --===============1295119863331611409== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============1295119863331611409==--