Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 653d96455e1e ("pinctrl: tigerlake: Add support for Tiger Lake-H")
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20200929110306.40852-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Andy Shevchenko and committed by
Linus Walleij
cb8cc185 3163508b

+25 -17
+25 -17
drivers/pinctrl/intel/pinctrl-tigerlake.c
··· 15 15 16 16 #include "pinctrl-intel.h" 17 17 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 23 25 24 26 #define TGL_GPP(r, s, e, g) \ 25 27 { \ ··· 31 29 .gpio_base = (g), \ 32 30 } 33 31 34 - #define TGL_COMMUNITY(b, s, e, g) \ 32 + #define TGL_COMMUNITY(b, s, e, pl, ho, g) \ 35 33 { \ 36 34 .barno = (b), \ 37 35 .padown_offset = TGL_PAD_OWN, \ 38 - .padcfglock_offset = TGL_PADCFGLOCK, \ 39 - .hostown_offset = TGL_HOSTSW_OWN, \ 36 + .padcfglock_offset = (pl), \ 37 + .hostown_offset = (ho), \ 40 38 .is_offset = TGL_GPI_IS, \ 41 39 .ie_offset = TGL_GPI_IE, \ 42 40 .pin_base = (s), \ ··· 44 42 .gpps = (g), \ 45 43 .ngpps = ARRAY_SIZE(g), \ 46 44 } 45 + 46 + #define TGL_LP_COMMUNITY(b, s, e, g) \ 47 + TGL_COMMUNITY(b, s, e, TGL_LP_PADCFGLOCK, TGL_LP_HOSTSW_OWN, g) 48 + 49 + #define TGL_H_COMMUNITY(b, s, e, g) \ 50 + TGL_COMMUNITY(b, s, e, TGL_H_PADCFGLOCK, TGL_H_HOSTSW_OWN, g) 47 51 48 52 /* Tiger Lake-LP */ 49 53 static const struct pinctrl_pin_desc tgllp_pins[] = { ··· 375 367 }; 376 368 377 369 static const struct intel_community tgllp_communities[] = { 378 - TGL_COMMUNITY(0, 0, 66, tgllp_community0_gpps), 379 - TGL_COMMUNITY(1, 67, 170, tgllp_community1_gpps), 380 - TGL_COMMUNITY(2, 171, 259, tgllp_community4_gpps), 381 - TGL_COMMUNITY(3, 260, 276, tgllp_community5_gpps), 370 + TGL_LP_COMMUNITY(0, 0, 66, tgllp_community0_gpps), 371 + TGL_LP_COMMUNITY(1, 67, 170, tgllp_community1_gpps), 372 + TGL_LP_COMMUNITY(2, 171, 259, tgllp_community4_gpps), 373 + TGL_LP_COMMUNITY(3, 260, 276, tgllp_community5_gpps), 382 374 }; 383 375 384 376 static const struct intel_pinctrl_soc_data tgllp_soc_data = { ··· 731 723 }; 732 724 733 725 static const struct intel_community tglh_communities[] = { 734 - TGL_COMMUNITY(0, 0, 78, tglh_community0_gpps), 735 - TGL_COMMUNITY(1, 79, 180, tglh_community1_gpps), 736 - TGL_COMMUNITY(2, 181, 217, tglh_community3_gpps), 737 - TGL_COMMUNITY(3, 218, 266, tglh_community4_gpps), 738 - TGL_COMMUNITY(4, 267, 290, tglh_community5_gpps), 726 + TGL_H_COMMUNITY(0, 0, 78, tglh_community0_gpps), 727 + TGL_H_COMMUNITY(1, 79, 180, tglh_community1_gpps), 728 + TGL_H_COMMUNITY(2, 181, 217, tglh_community3_gpps), 729 + TGL_H_COMMUNITY(3, 218, 266, tglh_community4_gpps), 730 + TGL_H_COMMUNITY(4, 267, 290, tglh_community5_gpps), 739 731 }; 740 732 741 733 static const struct intel_pinctrl_soc_data tglh_soc_data = {