Skip to content

Commit 3f62312

Browse files
superm1linusw
authored andcommitted
pinctrl: amd: Drop pull up select configuration
pinctrl-amd currently tries to program bit 19 of all GPIOs to select either a 4kΩ or 8hΩ pull up, but this isn't what bit 19 does. Bit 19 is marked as reserved, even in the latest platforms documentation. Drop this programming functionality. Tested-by: Jan Visser <starquake@linuxeverywhere.org> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20230705133005.577-4-mario.limonciello@amd.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 635a750 commit 3f62312

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

drivers/pinctrl/pinctrl-amd.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
210210
char *pin_sts;
211211
char *interrupt_sts;
212212
char *wake_sts;
213-
char *pull_up_sel;
214213
char *orientation;
215214
char debounce_value[40];
216215
char *debounce_enable;
@@ -318,14 +317,9 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
318317
seq_printf(s, " %s|", wake_sts);
319318

320319
if (pin_reg & BIT(PULL_UP_ENABLE_OFF)) {
321-
if (pin_reg & BIT(PULL_UP_SEL_OFF))
322-
pull_up_sel = "8k";
323-
else
324-
pull_up_sel = "4k";
325-
seq_printf(s, "%s ↑|",
326-
pull_up_sel);
320+
seq_puts(s, " ↑ |");
327321
} else if (pin_reg & BIT(PULL_DOWN_ENABLE_OFF)) {
328-
seq_puts(s, " |");
322+
seq_puts(s, " |");
329323
} else {
330324
seq_puts(s, " |");
331325
}
@@ -751,7 +745,7 @@ static int amd_pinconf_get(struct pinctrl_dev *pctldev,
751745
break;
752746

753747
case PIN_CONFIG_BIAS_PULL_UP:
754-
arg = (pin_reg >> PULL_UP_SEL_OFF) & (BIT(0) | BIT(1));
748+
arg = (pin_reg >> PULL_UP_ENABLE_OFF) & BIT(0);
755749
break;
756750

757751
case PIN_CONFIG_DRIVE_STRENGTH:
@@ -798,10 +792,8 @@ static int amd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
798792
break;
799793

800794
case PIN_CONFIG_BIAS_PULL_UP:
801-
pin_reg &= ~BIT(PULL_UP_SEL_OFF);
802-
pin_reg |= (arg & BIT(0)) << PULL_UP_SEL_OFF;
803795
pin_reg &= ~BIT(PULL_UP_ENABLE_OFF);
804-
pin_reg |= ((arg>>1) & BIT(0)) << PULL_UP_ENABLE_OFF;
796+
pin_reg |= (arg & BIT(0)) << PULL_UP_ENABLE_OFF;
805797
break;
806798

807799
case PIN_CONFIG_DRIVE_STRENGTH:

drivers/pinctrl/pinctrl-amd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#define WAKE_CNTRL_OFF_S4 15
3737
#define PIN_STS_OFF 16
3838
#define DRV_STRENGTH_SEL_OFF 17
39-
#define PULL_UP_SEL_OFF 19
4039
#define PULL_UP_ENABLE_OFF 20
4140
#define PULL_DOWN_ENABLE_OFF 21
4241
#define OUTPUT_VALUE_OFF 22

0 commit comments

Comments
 (0)