Skip to content

Commit cb8cc18

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: tigerlake: Fix register offsets for TGL-H variant
It appears that almost traditionally the H variants have some deviations in the register offsets in comparison to LP ones. This is the case for Intel Tiger Lake as well. Fix register offsets for TGL-H variant. Fixes: 653d964 ("pinctrl: tigerlake: Add support for Tiger Lake-H") Reported-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Mika Westerberg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 3163508 commit cb8cc18

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

drivers/pinctrl/intel/pinctrl-tigerlake.c

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515

1616
#include "pinctrl-intel.h"
1717

18-
#define TGL_PAD_OWN 0x020
19-
#define TGL_PADCFGLOCK 0x080
20-
#define TGL_HOSTSW_OWN 0x0b0
21-
#define TGL_GPI_IS 0x100
22-
#define TGL_GPI_IE 0x120
18+
#define TGL_PAD_OWN 0x020
19+
#define TGL_LP_PADCFGLOCK 0x080
20+
#define TGL_H_PADCFGLOCK 0x090
21+
#define TGL_LP_HOSTSW_OWN 0x0b0
22+
#define TGL_H_HOSTSW_OWN 0x0c0
23+
#define TGL_GPI_IS 0x100
24+
#define TGL_GPI_IE 0x120
2325

2426
#define TGL_GPP(r, s, e, g) \
2527
{ \
@@ -29,12 +31,12 @@
2931
.gpio_base = (g), \
3032
}
3133

32-
#define TGL_COMMUNITY(b, s, e, g) \
34+
#define TGL_COMMUNITY(b, s, e, pl, ho, g) \
3335
{ \
3436
.barno = (b), \
3537
.padown_offset = TGL_PAD_OWN, \
36-
.padcfglock_offset = TGL_PADCFGLOCK, \
37-
.hostown_offset = TGL_HOSTSW_OWN, \
38+
.padcfglock_offset = (pl), \
39+
.hostown_offset = (ho), \
3840
.is_offset = TGL_GPI_IS, \
3941
.ie_offset = TGL_GPI_IE, \
4042
.pin_base = (s), \
@@ -43,6 +45,12 @@
4345
.ngpps = ARRAY_SIZE(g), \
4446
}
4547

48+
#define TGL_LP_COMMUNITY(b, s, e, g) \
49+
TGL_COMMUNITY(b, s, e, TGL_LP_PADCFGLOCK, TGL_LP_HOSTSW_OWN, g)
50+
51+
#define TGL_H_COMMUNITY(b, s, e, g) \
52+
TGL_COMMUNITY(b, s, e, TGL_H_PADCFGLOCK, TGL_H_HOSTSW_OWN, g)
53+
4654
/* Tiger Lake-LP */
4755
static const struct pinctrl_pin_desc tgllp_pins[] = {
4856
/* GPP_B */
@@ -367,10 +375,10 @@ static const struct intel_padgroup tgllp_community5_gpps[] = {
367375
};
368376

369377
static const struct intel_community tgllp_communities[] = {
370-
TGL_COMMUNITY(0, 0, 66, tgllp_community0_gpps),
371-
TGL_COMMUNITY(1, 67, 170, tgllp_community1_gpps),
372-
TGL_COMMUNITY(2, 171, 259, tgllp_community4_gpps),
373-
TGL_COMMUNITY(3, 260, 276, tgllp_community5_gpps),
378+
TGL_LP_COMMUNITY(0, 0, 66, tgllp_community0_gpps),
379+
TGL_LP_COMMUNITY(1, 67, 170, tgllp_community1_gpps),
380+
TGL_LP_COMMUNITY(2, 171, 259, tgllp_community4_gpps),
381+
TGL_LP_COMMUNITY(3, 260, 276, tgllp_community5_gpps),
374382
};
375383

376384
static const struct intel_pinctrl_soc_data tgllp_soc_data = {
@@ -723,11 +731,11 @@ static const struct intel_padgroup tglh_community5_gpps[] = {
723731
};
724732

725733
static const struct intel_community tglh_communities[] = {
726-
TGL_COMMUNITY(0, 0, 78, tglh_community0_gpps),
727-
TGL_COMMUNITY(1, 79, 180, tglh_community1_gpps),
728-
TGL_COMMUNITY(2, 181, 217, tglh_community3_gpps),
729-
TGL_COMMUNITY(3, 218, 266, tglh_community4_gpps),
730-
TGL_COMMUNITY(4, 267, 290, tglh_community5_gpps),
734+
TGL_H_COMMUNITY(0, 0, 78, tglh_community0_gpps),
735+
TGL_H_COMMUNITY(1, 79, 180, tglh_community1_gpps),
736+
TGL_H_COMMUNITY(2, 181, 217, tglh_community3_gpps),
737+
TGL_H_COMMUNITY(3, 218, 266, tglh_community4_gpps),
738+
TGL_H_COMMUNITY(4, 267, 290, tglh_community5_gpps),
731739
};
732740

733741
static const struct intel_pinctrl_soc_data tglh_soc_data = {

0 commit comments

Comments
 (0)