summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/intel/pinctrl-elkhartlake.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-elkhartlake.c')
-rw-r--r--drivers/pinctrl/intel/pinctrl-elkhartlake.c81
1 files changed, 56 insertions, 25 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-elkhartlake.c b/drivers/pinctrl/intel/pinctrl-elkhartlake.c
index 1678634ebc06..0e8742f31cd4 100644
--- a/drivers/pinctrl/intel/pinctrl-elkhartlake.c
+++ b/drivers/pinctrl/intel/pinctrl-elkhartlake.c
@@ -21,13 +21,6 @@
#define EHL_GPI_IS 0x100
#define EHL_GPI_IE 0x120
-#define EHL_GPP(r, s, e) \
- { \
- .reg_num = (r), \
- .base = (s), \
- .size = ((e) - (s) + 1), \
- }
-
#define EHL_COMMUNITY(b, s, e, g) \
INTEL_COMMUNITY_GPPS(b, s, e, g, EHL)
@@ -106,9 +99,9 @@ static const struct pinctrl_pin_desc ehl_community0_pins[] = {
};
static const struct intel_padgroup ehl_community0_gpps[] = {
- EHL_GPP(0, 0, 25), /* GPP_B */
- EHL_GPP(1, 26, 41), /* GPP_T */
- EHL_GPP(2, 42, 66), /* GPP_G */
+ INTEL_GPP(0, 0, 25, 0), /* GPP_B */
+ INTEL_GPP(1, 26, 41, 26), /* GPP_T */
+ INTEL_GPP(2, 42, 66, 42), /* GPP_G */
};
static const struct intel_community ehl_community0[] = {
@@ -245,11 +238,11 @@ static const struct pinctrl_pin_desc ehl_community1_pins[] = {
};
static const struct intel_padgroup ehl_community1_gpps[] = {
- EHL_GPP(0, 0, 15), /* GPP_V */
- EHL_GPP(1, 16, 39), /* GPP_H */
- EHL_GPP(2, 40, 60), /* GPP_D */
- EHL_GPP(3, 61, 84), /* GPP_U */
- EHL_GPP(4, 85, 112), /* vGPIO */
+ INTEL_GPP(0, 0, 15, 0), /* GPP_V */
+ INTEL_GPP(1, 16, 39, 16), /* GPP_H */
+ INTEL_GPP(2, 40, 60, 40), /* GPP_D */
+ INTEL_GPP(3, 61, 84, 61), /* GPP_U */
+ INTEL_GPP(4, 85, 112, 85), /* vGPIO */
};
static const struct intel_community ehl_community1[] = {
@@ -264,6 +257,43 @@ static const struct intel_pinctrl_soc_data ehl_community1_soc_data = {
.ncommunities = ARRAY_SIZE(ehl_community1),
};
+static const struct pinctrl_pin_desc ehl_community2_pins[] = {
+ /* DSW */
+ PINCTRL_PIN(0, "BATLOWB"),
+ PINCTRL_PIN(1, "ACPRESENT"),
+ PINCTRL_PIN(2, "LAN_WAKEB"),
+ PINCTRL_PIN(3, "PWRBTNB"),
+ PINCTRL_PIN(4, "SLP_S3B"),
+ PINCTRL_PIN(5, "SLP_S4B"),
+ PINCTRL_PIN(6, "SLP_AB"),
+ PINCTRL_PIN(7, "GPD_7"),
+ PINCTRL_PIN(8, "SUSCLK"),
+ PINCTRL_PIN(9, "SLP_WLANB"),
+ PINCTRL_PIN(10, "SLP_S5B"),
+ PINCTRL_PIN(11, "LANPHYPC"),
+ PINCTRL_PIN(12, "INPUT3VSEL"),
+ PINCTRL_PIN(13, "SLP_LANB"),
+ PINCTRL_PIN(14, "SLP_SUSB"),
+ PINCTRL_PIN(15, "WAKEB"),
+ PINCTRL_PIN(16, "DRAM_RESETB"),
+};
+
+static const struct intel_padgroup ehl_community2_gpps[] = {
+ INTEL_GPP(0, 0, 16, 0), /* DSW */
+};
+
+static const struct intel_community ehl_community2[] = {
+ EHL_COMMUNITY(0, 0, 16, ehl_community2_gpps),
+};
+
+static const struct intel_pinctrl_soc_data ehl_community2_soc_data = {
+ .uid = "2",
+ .pins = ehl_community2_pins,
+ .npins = ARRAY_SIZE(ehl_community2_pins),
+ .communities = ehl_community2,
+ .ncommunities = ARRAY_SIZE(ehl_community2),
+};
+
static const struct pinctrl_pin_desc ehl_community3_pins[] = {
/* CPU */
PINCTRL_PIN(0, "HDACPU_SDI"),
@@ -319,10 +349,10 @@ static const struct pinctrl_pin_desc ehl_community3_pins[] = {
};
static const struct intel_padgroup ehl_community3_gpps[] = {
- EHL_GPP(0, 0, 16), /* CPU */
- EHL_GPP(1, 17, 18), /* GPP_S */
- EHL_GPP(2, 19, 42), /* GPP_A */
- EHL_GPP(3, 43, 46), /* vGPIO_3 */
+ INTEL_GPP(0, 0, 16, 0), /* CPU */
+ INTEL_GPP(1, 17, 18, 17), /* GPP_S */
+ INTEL_GPP(2, 19, 42, 19), /* GPP_A */
+ INTEL_GPP(3, 43, 46, 43), /* vGPIO_3 */
};
static const struct intel_community ehl_community3[] = {
@@ -425,10 +455,10 @@ static const struct pinctrl_pin_desc ehl_community4_pins[] = {
};
static const struct intel_padgroup ehl_community4_gpps[] = {
- EHL_GPP(0, 0, 23), /* GPP_C */
- EHL_GPP(1, 24, 48), /* GPP_F */
- EHL_GPP(2, 49, 54), /* HVCMOS */
- EHL_GPP(3, 55, 79), /* GPP_E */
+ INTEL_GPP(0, 0, 23, 0), /* GPP_C */
+ INTEL_GPP(1, 24, 48, 24), /* GPP_F */
+ INTEL_GPP(2, 49, 54, 49), /* HVCMOS */
+ INTEL_GPP(3, 55, 79, 55), /* GPP_E */
};
static const struct intel_community ehl_community4[] = {
@@ -456,7 +486,7 @@ static const struct pinctrl_pin_desc ehl_community5_pins[] = {
};
static const struct intel_padgroup ehl_community5_gpps[] = {
- EHL_GPP(0, 0, 7), /* GPP_R */
+ INTEL_GPP(0, 0, 7, 0), /* GPP_R */
};
static const struct intel_community ehl_community5[] = {
@@ -474,6 +504,7 @@ static const struct intel_pinctrl_soc_data ehl_community5_soc_data = {
static const struct intel_pinctrl_soc_data *ehl_soc_data_array[] = {
&ehl_community0_soc_data,
&ehl_community1_soc_data,
+ &ehl_community2_soc_data,
&ehl_community3_soc_data,
&ehl_community4_soc_data,
&ehl_community5_soc_data,
@@ -499,4 +530,4 @@ module_platform_driver(ehl_pinctrl_driver);
MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
MODULE_DESCRIPTION("Intel Elkhart Lake PCH pinctrl/GPIO driver");
MODULE_LICENSE("GPL v2");
-MODULE_IMPORT_NS(PINCTRL_INTEL);
+MODULE_IMPORT_NS("PINCTRL_INTEL");