2021-08-04 14:04:32

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1 1/1] pinctrl: tigerlake: Fix GPIO mapping for newer version of software

The software mapping for GPIO, which initially comes from Microsoft,
is subject to change by respective Windows and firmware developers.
Due to above the driver had been written and published way ahead of
the schedule, and thus the numbering schema used in it is outdated.

Fix the numbering schema in accordance with the real products on market.

Fixes: 653d96455e1e ("pinctrl: tigerlake: Add support for Tiger Lake-H")
Reported-and-tested-by: Kai-Heng Feng <[email protected]>
Reported-by: Riccardo Mori <[email protected]>
Reported-and-tested-by: Lovesh <[email protected]>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213463
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213579
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213857
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/intel/pinctrl-tigerlake.c | 26 +++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-tigerlake.c b/drivers/pinctrl/intel/pinctrl-tigerlake.c
index 3e4ef2b87526..0bcd19597e4a 100644
--- a/drivers/pinctrl/intel/pinctrl-tigerlake.c
+++ b/drivers/pinctrl/intel/pinctrl-tigerlake.c
@@ -701,32 +701,32 @@ static const struct pinctrl_pin_desc tglh_pins[] = {

static const struct intel_padgroup tglh_community0_gpps[] = {
TGL_GPP(0, 0, 24, 0), /* GPP_A */
- TGL_GPP(1, 25, 44, 128), /* GPP_R */
- TGL_GPP(2, 45, 70, 32), /* GPP_B */
- TGL_GPP(3, 71, 78, INTEL_GPIO_BASE_NOMAP), /* vGPIO_0 */
+ TGL_GPP(1, 25, 44, 32), /* GPP_R */
+ TGL_GPP(2, 45, 70, 64), /* GPP_B */
+ TGL_GPP(3, 71, 78, 96), /* vGPIO_0 */
};

static const struct intel_padgroup tglh_community1_gpps[] = {
- TGL_GPP(0, 79, 104, 96), /* GPP_D */
- TGL_GPP(1, 105, 128, 64), /* GPP_C */
- TGL_GPP(2, 129, 136, 160), /* GPP_S */
- TGL_GPP(3, 137, 153, 192), /* GPP_G */
- TGL_GPP(4, 154, 180, 224), /* vGPIO */
+ TGL_GPP(0, 79, 104, 128), /* GPP_D */
+ TGL_GPP(1, 105, 128, 160), /* GPP_C */
+ TGL_GPP(2, 129, 136, 192), /* GPP_S */
+ TGL_GPP(3, 137, 153, 224), /* GPP_G */
+ TGL_GPP(4, 154, 180, 256), /* vGPIO */
};

static const struct intel_padgroup tglh_community3_gpps[] = {
- TGL_GPP(0, 181, 193, 256), /* GPP_E */
- TGL_GPP(1, 194, 217, 288), /* GPP_F */
+ TGL_GPP(0, 181, 193, 288), /* GPP_E */
+ TGL_GPP(1, 194, 217, 320), /* GPP_F */
};

static const struct intel_padgroup tglh_community4_gpps[] = {
- TGL_GPP(0, 218, 241, 320), /* GPP_H */
+ TGL_GPP(0, 218, 241, 352), /* GPP_H */
TGL_GPP(1, 242, 251, 384), /* GPP_J */
- TGL_GPP(2, 252, 266, 352), /* GPP_K */
+ TGL_GPP(2, 252, 266, 416), /* GPP_K */
};

static const struct intel_padgroup tglh_community5_gpps[] = {
- TGL_GPP(0, 267, 281, 416), /* GPP_I */
+ TGL_GPP(0, 267, 281, 448), /* GPP_I */
TGL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP), /* JTAG */
};

--
2.30.2


2021-08-04 15:47:59

by Mika Westerberg

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] pinctrl: tigerlake: Fix GPIO mapping for newer version of software

On Wed, Aug 04, 2021 at 05:02:46PM +0300, Andy Shevchenko wrote:
> The software mapping for GPIO, which initially comes from Microsoft,
> is subject to change by respective Windows and firmware developers.
> Due to above the driver had been written and published way ahead of
> the schedule, and thus the numbering schema used in it is outdated.
>
> Fix the numbering schema in accordance with the real products on market.
>
> Fixes: 653d96455e1e ("pinctrl: tigerlake: Add support for Tiger Lake-H")
> Reported-and-tested-by: Kai-Heng Feng <[email protected]>
> Reported-by: Riccardo Mori <[email protected]>
> Reported-and-tested-by: Lovesh <[email protected]>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213463
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213579
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213857
> Signed-off-by: Andy Shevchenko <[email protected]>

Thanks Andy for taking care of this!

Acked-by: Mika Westerberg <[email protected]>

2021-08-04 15:52:27

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] pinctrl: tigerlake: Fix GPIO mapping for newer version of software

On Wed, Aug 04, 2021 at 06:43:43PM +0300, Mika Westerberg wrote:
> On Wed, Aug 04, 2021 at 05:02:46PM +0300, Andy Shevchenko wrote:
> > The software mapping for GPIO, which initially comes from Microsoft,
> > is subject to change by respective Windows and firmware developers.
> > Due to above the driver had been written and published way ahead of
> > the schedule, and thus the numbering schema used in it is outdated.
> >
> > Fix the numbering schema in accordance with the real products on market.
> >
> > Fixes: 653d96455e1e ("pinctrl: tigerlake: Add support for Tiger Lake-H")
> > Reported-and-tested-by: Kai-Heng Feng <[email protected]>
> > Reported-by: Riccardo Mori <[email protected]>
> > Reported-and-tested-by: Lovesh <[email protected]>
> > BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213463
> > BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213579
> > BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213857
> > Signed-off-by: Andy Shevchenko <[email protected]>
>
> Thanks Andy for taking care of this!
>
> Acked-by: Mika Westerberg <[email protected]>

Pushed to my review and testing queue, thanks!

--
With Best Regards,
Andy Shevchenko