Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2270953imm; Thu, 20 Sep 2018 10:20:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZRLDPbNXOiu2Xxydfb8IJuu1cBISD1NcPr259M9uzi5GHXiVnwtlmI3DeMSzlhLTK/1/c/ X-Received: by 2002:a63:6343:: with SMTP id x64-v6mr38326906pgb.173.1537464039901; Thu, 20 Sep 2018 10:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537464039; cv=none; d=google.com; s=arc-20160816; b=yq19CSrM5WobEgmU38mcsAW5e9OgKh2UF3SGOvhVi6qbn77RXtZ1ZtZIyN3W/bAHmG GtCou8zuGPRCKfUyC5EawhHNFJTTG5eUVicSdn7mXCYrBriEd03TkVRGcKt1I+jZPAK5 dFABnKMNo2FYlxCbpfXrA9qNZroL06Ir6wX7uQ3MPsMAF+SfLhU25izAlf9quXHCWhrY k5tvPgv07yfwiiKT1ZqDQ1RM8DIFVnPV/8UEOIhoaKr/oM/VRjT4CW4Xz/Vc5gDsQyEU V0N2ZzqJx53Qcl6k045LF7FGZgJKFUedKnQuHFFjtfdsI5mZ48EuaXIj8Ma1fqp1qLsO O0og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fnflkOMX+ZxVkuUgkIRwASacO60hazLaT1r5Mr2xfmY=; b=nA67DHICRV8yq8S9uZAI8WzmtP8gJSyUvPBmQSTl06QC1GhmwREF3jFmietLhMGkzO 1OlwydHJYV7hd2zTtmJOwe2ZM4lKzLWsC3i5O7MY8eBP1NL8WRLfJWJZERLrb/CTXq18 5UwMYcRJBqSOVIlKy2LKIDors0Hm7XRlwGvTpMfMHd0Uori2ijDX0kQKQLDkkxZq4kr4 HF2dUHPRaLmSwpULIHhRXNclqovZmPX5zSMs7L+QbnsmBc9g3pGCc4ENXU6UnLnVVXGA t+b9QJqk++bcSVyPe9MZAX5kPEbV0YRmtgbsqI5gtjUCCIiTxCKcy9YqOPRRSzkNP3Ss +nkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="vJHBgY/F"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f90-v6si25790639plb.504.2018.09.20.10.20.23; Thu, 20 Sep 2018 10:20:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="vJHBgY/F"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729895AbeITXEl (ORCPT + 99 others); Thu, 20 Sep 2018 19:04:41 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:42134 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbeITXEl (ORCPT ); Thu, 20 Sep 2018 19:04:41 -0400 Received: by mail-yw1-f65.google.com with SMTP id h134-v6so902200ywc.9 for ; Thu, 20 Sep 2018 10:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fnflkOMX+ZxVkuUgkIRwASacO60hazLaT1r5Mr2xfmY=; b=vJHBgY/Fx+QRHHg6PIgA2xj0ocuGXvYD4smK3iwjIjIenLi7WoI9GHfIDQcTe71IW1 06Sd/F8CqNVmPaoe/r9Hfe8eV4ic9n4Fhod9bKn48Y3ifiKQqbIqyHVL6iNNzIVgnNKj JncZnGo/ntCv/frUkiWoLynMKmmV8PA7zplykBJTfbRzvMKB9Dsjp8nc0Cdui0pbqljO APmRTpJxlMd0bMX6x96K4Xnca1cp3VYpTRB9nGsZ5vuVAlxC9o7naA+YHcru7gqb+ATa bEeG4X99k2+RBES0u9WPikuxF9uujb7OORLwazCI1wWQzM4Xm21NW5nrxmzswYcxQZBR zDsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fnflkOMX+ZxVkuUgkIRwASacO60hazLaT1r5Mr2xfmY=; b=cpcycRT0HHcTwAqxqHHv9TmWB42oUSA4/H5SyNFdyzpcVxfeg0fqnQ5gKu2Dq3vt8d svM3g7PNj+YO5QHndh443kejgukqmUw+oqk/FoaMhHVEzUhJ3Me/AaQSYoXiHmynpQBM Niqk3BeJHWHfQq9IT5YNiUbvFFY6IME/e7fqTa7hbmrvV62LMoskjGdp2OdGDyVVlDqn 87LDyArI4apTQ+IR/AG7q9hd30HkYpepdM99R87KHt49yOnGE602ZtlHfH9sAcEQ5l0m kDIn0AoeN0nCnfEKfY/audkpzeYuGp7umIVjwFIijVmUa46eqYjS+4iYyP9wqcHq6UyI T4Og== X-Gm-Message-State: APzg51Dgbfw0hjxBehAvO1i64XSTmAQ/L0YXUgDb9RuWQ/vbtgdJFgoy M2OBSHbm5Axdbg1ghkIGg55nUyNBdkvlw52PUIYSGg== X-Received: by 2002:a0d:df93:: with SMTP id i141-v6mr17783996ywe.349.1537464010760; Thu, 20 Sep 2018 10:20:10 -0700 (PDT) MIME-Version: 1.0 References: <20180913223143.12664-1-rajatja@google.com> In-Reply-To: From: Rajat Jain Date: Thu, 20 Sep 2018 10:19:34 -0700 Message-ID: Subject: Re: [PATCH] pinctrl: icelake: Fix the resource number for community-4/5 To: Andy Shevchenko Cc: Mika Westerberg , Andy Shevchenko , Linus Walleij , linux-gpio@vger.kernel.org, Linux Kernel Mailing List , Rajat Jain , "Banik, Subrata" , "Bohra, Aamir" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 14, 2018 at 2:38 PM Rajat Jain wrote: > > On Fri, Sep 14, 2018 at 2:06 PM Rajat Jain wrote: > > > > On Fri, Sep 14, 2018 at 12:41 AM Andy Shevchenko > > wrote: > > > > > > On Fri, Sep 14, 2018 at 1:54 AM Rajat Jain wrote: > > > > > > > > The Icelake does not have a community-3, and the memory resources are > > > > laid out in the following order in the ACPI: > > > > > > > > resource-0: community-0 registers > > > > resource-1: community-1 registers > > > > resource-2: community-2 registers > > > > resource-3: community-4 registers > > > > resource-4: community-5 registers > > > > > > > > (EDS also describes the communities in the above order). > > > > > > > > Since the pinctrl driver exposes communities 0, 1, 4, 5, it needs to get > > > > the corresponding community registers by getting the resourse number right. > > > > Currently the resourse number is not correct for community 4 and 5, thus > > > > fix that. > > > > > > > > > > Can you share link to the ACPI dump of the tables? (you may get one by > > > running `acpidump -o tables.dat`) Hello Andy, Any feedback on this patch? I provided a dump of the ACPI below, please let me know if you need more info. Thanks, Rajat > > > > I don't have that command on my system, but I took > > /sys/firmware/acpi/tables/DSDT from the system and disassembled it > > using Intel disassembler (iasl -d) and here is the relevant portion > > that describes the GPIO controller. The port IDs for communities can > > be seen in the below output (i.e. the PCRB()): > > I realized PCRB() is an ACPI method defined in the same disasembly: > > Method (PCRB, 1, NotSerialized) > { > Return ((0xFD000000 + (Arg0 << 0x10))) > } > > > > > Device (GPIO) > > { > > Name (_HID, "INT3455") // _HID: Hardware ID > > Name (_UID, Zero) // _UID: Unique ID > > Name (_DDN, "GPIO Controller") // _DDN: DOS Device Name > > Name (RBUF, ResourceTemplate () > > { > > Memory32Fixed (ReadWrite, > > 0x00000000, // Address Base > > 0x00000000, // Address Length > > _Y06) > > Memory32Fixed (ReadWrite, > > 0x00000000, // Address Base > > 0x00000000, // Address Length > > _Y07) > > Memory32Fixed (ReadWrite, > > 0x00000000, // Address Base > > 0x00000000, // Address Length > > _Y08) > > Memory32Fixed (ReadWrite, > > 0x00000000, // Address Base > > 0x00000000, // Address Length > > _Y09) > > Memory32Fixed (ReadWrite, > > 0x00000000, // Address Base > > 0x00000000, // Address Length > > _Y0A) > > Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, ) > > { > > 0x0000000E, > > } > > }) > > Method (_CRS, 0, NotSerialized) // _CRS: Current > > Resource Settings > > { > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y06._BAS, > > BAS0) // _BAS: Base Address > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y06._LEN, > > LEN0) // _LEN: Length > > BAS0 = PCRB (0x6E) > > LEN0 = 0x00010000 > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y07._BAS, > > BAS1) // _BAS: Base Address > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y07._LEN, > > LEN1) // _LEN: Length > > BAS1 = PCRB (0x6D) > > LEN1 = 0x00010000 > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y08._BAS, > > BAS2) // _BAS: Base Address > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y08._LEN, > > LEN2) // _LEN: Length > > BAS2 = PCRB (0x6C) > > LEN2 = 0x00010000 > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y09._BAS, > > BAS4) // _BAS: Base Address > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y09._LEN, > > LEN4) // _LEN: Length > > BAS4 = PCRB (0x6A) > > LEN4 = 0x00010000 > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y0A._BAS, > > BAS5) // _BAS: Base Address > > CreateDWordField (RBUF, \_SB.PCI0.GPIO._Y0A._LEN, > > LEN5) // _LEN: Length > > BAS5 = PCRB (0x69) > > LEN5 = 0x00010000 > > Return (RBUF) /* \_SB_.PCI0.GPIO.RBUF */ > > } > > > > Method (_STA, 0, NotSerialized) // _STA: Status > > { > > Return (0x0F) > > } > > } > > > > Please let me know if this helps, or if you need more info. > > > > Thanks & Best Regards, > > > > Rajat > > > > > > > > > Signed-off-by: Rajat Jain > > > > --- > > > > drivers/pinctrl/intel/pinctrl-icelake.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/pinctrl/intel/pinctrl-icelake.c b/drivers/pinctrl/intel/pinctrl-icelake.c > > > > index 630b966ce081..5b4eaf7c90df 100644 > > > > --- a/drivers/pinctrl/intel/pinctrl-icelake.c > > > > +++ b/drivers/pinctrl/intel/pinctrl-icelake.c > > > > @@ -331,8 +331,8 @@ static const struct intel_padgroup icllp_community5_gpps[] = { > > > > static const struct intel_community icllp_communities[] = { > > > > ICL_COMMUNITY(0, 0, 58, icllp_community0_gpps), > > > > ICL_COMMUNITY(1, 59, 152, icllp_community1_gpps), > > > > - ICL_COMMUNITY(2, 153, 215, icllp_community4_gpps), > > > > - ICL_COMMUNITY(3, 216, 240, icllp_community5_gpps), > > > > + ICL_COMMUNITY(3, 153, 215, icllp_community4_gpps), > > > > + ICL_COMMUNITY(4, 216, 240, icllp_community5_gpps), > > > > }; > > > > > > > > static const unsigned int icllp_spi0_pins[] = { 22, 23, 24, 25, 26 }; > > > > -- > > > > 2.19.0.397.gdd90340f6a-goog > > > > > > > > > > > > > -- > > > With Best Regards, > > > Andy Shevchenko