Skip to content

Commit 4edcebb

Browse files
tmaimonlinusw
authored andcommitted
pinctrl: nuvoton: npcm8xx: add gpi35 and gpi36
This patch adds support for GPIO pins GPI35 and GPI36 on the Nuvoton NPCM8xx BMC SoC. The pins are configured for only for input. Signed-off-by: Tomer Maimon <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 92f5f86 commit 4edcebb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ static struct irq_chip npcmgpio_irqchip = {
316316
GPIOCHIP_IRQ_RESOURCE_HELPERS,
317317
};
318318

319-
static const int gpi36_pins[] = { 58 };
320-
static const int gpi35_pins[] = { 58 };
319+
static const int gpi36_pins[] = { 36 };
320+
static const int gpi35_pins[] = { 35 };
321321

322322
static const int tp_jtag3_pins[] = { 44, 62, 45, 46 };
323323
static const int tp_uart_pins[] = { 50, 51 };
@@ -1358,6 +1358,8 @@ static const struct npcm8xx_pincfg pincfg[] = {
13581358
NPCM8XX_PINCFG(32, spi0cs1, MFSEL1, 3, smb14b, MFSEL7, 26, none, NONE, 0, none, NONE, 0, none, NONE, 0, SLEW),
13591359
NPCM8XX_PINCFG(33, i3c4, MFSEL6, 10, none, NONE, 0, none, NONE, 0, none, NONE, 0, none, NONE, 0, SLEW),
13601360
NPCM8XX_PINCFG(34, i3c4, MFSEL6, 10, none, NONE, 0, none, NONE, 0, none, NONE, 0, none, NONE, 0, SLEW),
1361+
NPCM8XX_PINCFG(35, gpi35, MFSEL5, 16, none, NONE, 0, none, NONE, 0, none, NONE, 0, none, NONE, 0, 0),
1362+
NPCM8XX_PINCFG(36, gpi36, MFSEL5, 18, none, NONE, 0, none, NONE, 0, none, NONE, 0, none, NONE, 0, 0),
13611363
NPCM8XX_PINCFG(37, smb3c, I2CSEGSEL, 12, smb23, MFSEL5, 31, none, NONE, 0, none, NONE, 0, none, NONE, 0, SLEW),
13621364
NPCM8XX_PINCFG(38, smb3c, I2CSEGSEL, 12, smb23, MFSEL5, 31, none, NONE, 0, none, NONE, 0, none, NONE, 0, SLEW),
13631365
NPCM8XX_PINCFG(39, smb3b, I2CSEGSEL, 11, smb22, MFSEL5, 30, none, NONE, 0, none, NONE, 0, none, NONE, 0, SLEW),
@@ -1603,6 +1605,8 @@ static const struct pinctrl_pin_desc npcm8xx_pins[] = {
16031605
PINCTRL_PIN(32, "GPIO32/SMB14B_SCL/SPI0_nCS1"),
16041606
PINCTRL_PIN(33, "GPIO33/I3C4_SCL"),
16051607
PINCTRL_PIN(34, "GPIO34/I3C4_SDA"),
1608+
PINCTRL_PIN(35, "MCBPCK/GPI35_AHB2PCI_DIS"),
1609+
PINCTRL_PIN(36, "SYSBPCK/GPI36"),
16061610
PINCTRL_PIN(37, "GPIO37/SMB3C_SDA/SMB23_SDA"),
16071611
PINCTRL_PIN(38, "GPIO38/SMB3C_SCL/SMB23_SCL"),
16081612
PINCTRL_PIN(39, "GPIO39/SMB3B_SDA/SMB22_SDA"),
@@ -2037,7 +2041,7 @@ static int npcm8xx_gpio_request_enable(struct pinctrl_dev *pctldev,
20372041
const unsigned int *pin = &offset;
20382042
int mode = fn_gpio;
20392043

2040-
if (pin[0] >= 183 && pin[0] <= 189)
2044+
if ((pin[0] >= 183 && pin[0] <= 189) || pin[0] == 35 || pin[0] == 36)
20412045
mode = pincfg[pin[0]].fn0;
20422046

20432047
npcm8xx_setfunc(npcm->gcr_regmap, &offset, 1, mode);

0 commit comments

Comments
 (0)