Skip to content

Commit

Permalink
pinctrl: nuvoton: Add driver for WPCM450
Browse files Browse the repository at this point in the history
This driver is based on the one for NPCM7xx, because the WPCM450 is a
predecessor of those SoCs. Notable differences:

- WPCM450, the GPIO registers are not organized in multiple banks, but
  rather placed continually into the same register block. This affects
  how register offsets are computed.
- Pinmux nodes can explicitly select GPIO mode, whereas, in the npcm7xx
  driver, this happens automatically when a GPIO is requested.

Some functionality implemented in the hardware was (for now) left unused
in the driver, specifically blinking and pull-up/down.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
  • Loading branch information
neuschaefer authored and intel-lab-lkp committed Jan 9, 2022
1 parent 7095977 commit e62ece1
Show file tree
Hide file tree
Showing 5 changed files with 1,151 additions and 1 deletion.
1 change: 1 addition & 0 deletions MAINTAINERS
Expand Up @@ -2343,6 +2343,7 @@ S: Maintained
F: Documentation/devicetree/bindings/*/*wpcm*
F: arch/arm/boot/dts/nuvoton-wpcm450*
F: arch/arm/mach-npcm/wpcm450.c
F: drivers/*/*/*wpcm*
F: drivers/*/*wpcm*

ARM/NXP S32G ARCHITECTURE
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/Makefile
Expand Up @@ -58,7 +58,7 @@ obj-y += freescale/
obj-$(CONFIG_X86) += intel/
obj-y += mvebu/
obj-y += nomadik/
obj-$(CONFIG_ARCH_NPCM7XX) += nuvoton/
obj-y += nuvoton/
obj-$(CONFIG_PINCTRL_PXA) += pxa/
obj-$(CONFIG_ARCH_QCOM) += qcom/
obj-$(CONFIG_PINCTRL_RALINK) += ralink/
Expand Down
18 changes: 18 additions & 0 deletions drivers/pinctrl/nuvoton/Kconfig
@@ -1,4 +1,22 @@
# SPDX-License-Identifier: GPL-2.0-only

config PINCTRL_WPCM450
tristate "Pinctrl and GPIO driver for Nuvoton WPCM450"
depends on ARCH_WPCM450 || COMPILE_TEST
select PINMUX
select PINCONF
select GENERIC_PINCONF
select GPIOLIB
select GPIO_GENERIC
select GPIOLIB_IRQCHIP
help
Say Y or M here to enable pin controller and GPIO support for
the Nuvoton WPCM450 SoC. This is strongly recommended when
building a kernel that will run on this chip.

If this driver is compiled as a module, it will be named
pinctrl-wpcm450.

config PINCTRL_NPCM7XX
bool "Pinctrl and GPIO driver for Nuvoton NPCM7XX"
depends on (ARCH_NPCM7XX || COMPILE_TEST) && OF
Expand Down
1 change: 1 addition & 0 deletions drivers/pinctrl/nuvoton/Makefile
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
# Nuvoton pinctrl support

obj-$(CONFIG_PINCTRL_WPCM450) += pinctrl-wpcm450.o
obj-$(CONFIG_PINCTRL_NPCM7XX) += pinctrl-npcm7xx.o

0 comments on commit e62ece1

Please sign in to comment.