Skip to content

Commit

Permalink
riscv: Add Kendryte K210 FPIOA pinctrl driver
Browse files Browse the repository at this point in the history
Add the pinctrl-k210.c pinctrl driver for the Kendryte K210 FPIOA
(fully programmable IO array) to allow configuring the SoC pin
functions. The K210 has 48 programmable pins which can take any of 256
possible functions.

This patch is inspired from the k210 pinctrl driver for the u-boot
project and contains many direct contributions from Sean Anderson.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
  • Loading branch information
damien-lemoal authored and intel-lab-lkp committed Nov 9, 2020
1 parent 9278b31 commit b53c7c4
Show file tree
Hide file tree
Showing 4 changed files with 1,017 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/riscv/Kconfig.socs
Expand Up @@ -34,6 +34,8 @@ config SOC_KENDRYTE
select ARCH_HAS_RESET_CONTROLLER
select RESET_CONTROLLER
select RESET_K210
select PINCTRL
select PINCTRL_K210
help
This enables support for Kendryte K210 SoC platform hardware.

Expand Down
15 changes: 15 additions & 0 deletions drivers/pinctrl/Kconfig
Expand Up @@ -374,6 +374,21 @@ config PINCTRL_OCELOT
select OF_GPIO
select REGMAP_MMIO

config PINCTRL_K210
bool "Pinctrl driver for the Kendryte K210 SoC"
depends on RISCV && SOC_KENDRYTE
depends on OF && HAS_IOMEM
select PINMUX
select GENERIC_PINCONF
select GPIOLIB
select OF_GPIO
select REGMAP_MMIO
help
Add support for the Kendryte K210 RISC-V SOC Field Programmable
IO Array (FPIOA) controller. Support for this controller is
automatically selected when the SOC_KENDRYTE option is selected
in the "SOC selection" menu.

source "drivers/pinctrl/actions/Kconfig"
source "drivers/pinctrl/aspeed/Kconfig"
source "drivers/pinctrl/bcm/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/pinctrl/Makefile
Expand Up @@ -47,6 +47,7 @@ obj-$(CONFIG_PINCTRL_INGENIC) += pinctrl-ingenic.o
obj-$(CONFIG_PINCTRL_RK805) += pinctrl-rk805.o
obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl-ocelot.o
obj-$(CONFIG_PINCTRL_EQUILIBRIUM) += pinctrl-equilibrium.o
obj-$(CONFIG_PINCTRL_K210) += pinctrl-k210.o

obj-y += actions/
obj-$(CONFIG_ARCH_ASPEED) += aspeed/
Expand Down

0 comments on commit b53c7c4

Please sign in to comment.