pinctrl: npcm: add NPCM7xx pinctrl driver
Subsystems (3)
Tomer Maimon
maintainercover pinctrl: npcm: add NPCM7xx pinctrl driver
This patch set adds pin controller support for the Nuvoton NPCM7xx Baseboard Management Controller (BMC).
The NPCM7XX Pin Controller multi-function routed through the multiplexing block, Each pin supports GPIO functionality (GPIOx) and multiple functions that directly connect the pin to different hardware blocks.
Tomer Maimon (2):
dt-binding: pinctrl: document NPCM7xx pin control DT bindings
pinctrl: npcm: add NPCM7xx pin control driver
.../bindings/pinctrl/nuvoton,npcm7xx-pinctrl.txt | 70 + drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 2 + drivers/pinctrl/nuvoton/Kconfig | 8 + drivers/pinctrl/nuvoton/Makefile | 1 + drivers/pinctrl/nuvoton/npcmreg.h | 249 +++ drivers/pinctrl/nuvoton/pinctrl-npcmx50.c | 2157 ++++++++++++++++++++ 7 files changed, 2488 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/nuvoton,npcm7xx-pinctrl.txt create mode 100644 drivers/pinctrl/nuvoton/Kconfig create mode 100644 drivers/pinctrl/nuvoton/Makefile create mode 100644 drivers/pinctrl/nuvoton/npcmreg.h create mode 100644 drivers/pinctrl/nuvoton/pinctrl-npcmx50.c
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 1/2 dt-binding: pinctrl: document NPCM7xx pin control DT bindings
Added device tree binding documentation for
Nuvoton NPCM7xx pin controllers
--- .../bindings/pinctrl/nuvoton,npcm7xx-pinctrl.txt | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/nuvoton,npcm7xx-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/nuvoton,npcm7xx-pinctrl.txt new file +70 -0
@@ -0,0 +1,70 @@ +Nuvoton NPCM7XX Pin Controllers + +The NPCM7XX Pin Controller multi-function routed through +the multiplexing block, Each pin supports GPIO functionality (GPIOx) +and multiple functions that directly connect the pin to different +hardware blocks. + +Required properties: +- compatible : "nuvoton,npcm750-pinctrl" for Poleg NPCM750. + +Contents of function subnode node +--------------------------------- +Required subnode-properties: +- groups : An array of strings. Each string contains the name of a group. +- function: A string containing the name of the function to mux to the + group. + + Valid values for group and function names can be found from looking at the + group and function arrays in driver files: + drivers/pinctrl/nuvoton/pinctrl-npcmx50.c + +For example, pinctrl might have subnodes like the following: + r1err_pins: r1err_pins { + groups = "r1err"; + function = "r1err"; + }; + r1md_pins: r1md_pins { + groups = "r1md"; + function = "r1md"; + }; + r1_pins: r1_pins { + groups = "r1"; + function = "r1"; + }; + +For a specific board, if it wants to use EMC (10/100 network), +it can add the following to its board-specific .dts file. +emc0: eth@f0825000 { + pinctrl-names = "default"; + pinctrl-0 = <&r1_pins + &r1err_pins + &r1md_pins>; + phy-mode = "rmii"; + +if EMC hardware is not used the EMC pin can used for GPIO56 + pinctrl-names = "default"; + pinctrl-0 = <&gpio56_pins> + +Examples +======== + +pinctrl: pinctrl@0 { + compatible = "nuvoton,npcm7xx-pinctrl"; + status = "okay"; + iox1_pins: iox1_pins { + groups = "iox1"; + function = "iox1"; + }; + iox2_pins: iox2_pins { + groups = "iox2"; + function = "iox2"; + }; + + .... + + clkreq_pins: clkreq_pins { + groups = "clkreq"; + function = "clkreq"; + }; +};
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 2/2 pinctrl: npcm: add NPCM7xx pin control driver
In reply to Tomer MaimonAdd Nuvoton BMC NPCM7xx pin controller driver.
The NPCM7XX Pin Controller multi-function routed through the multiplexing block, Each pin supports GPIO functionality (GPIOx) and multiple functions that directly connect the pin to different hardware blocks.
--- drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 2 + drivers/pinctrl/nuvoton/Kconfig | 8 + drivers/pinctrl/nuvoton/Makefile | 1 + drivers/pinctrl/nuvoton/npcmreg.h | 249 ++++ drivers/pinctrl/nuvoton/pinctrl-npcmx50.c | 2157 +++++++++++++++++++++++++++++ 6 files changed, 2418 insertions(+) create mode 100644 drivers/pinctrl/nuvoton/Kconfig create mode 100644 drivers/pinctrl/nuvoton/Makefile create mode 100644 drivers/pinctrl/nuvoton/npcmreg.h create mode 100644 drivers/pinctrl/nuvoton/pinctrl-npcmx50.c
drivers/pinctrl/Kconfig +1 -0
@@ -351,6 +351,7 @@ source "drivers/pinctrl/uniphier/Kconfig" source "drivers/pinctrl/vt8500/Kconfig" source "drivers/pinctrl/mediatek/Kconfig" source "drivers/pinctrl/zte/Kconfig" +source "drivers/pinctrl/nuvoton/Kconfig" config PINCTRL_XWAY bool
drivers/pinctrl/Makefile +2 -0
@@ -62,3 +62,5 @@ obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/ obj-$(CONFIG_ARCH_VT8500) += vt8500/ obj-$(CONFIG_PINCTRL_MTK) += mediatek/ obj-$(CONFIG_PINCTRL_ZX) += zte/ +obj-$(CONFIG_ARCH_NPCM7XX) += nuvoton/ +
drivers/pinctrl/nuvoton/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config PINCTRL_NPCMX50 + bool "Pinctrl driver for Nuvoton NPCMX50" + select GPIOLIB + select GPIOLIB_IRQCHIP + select PINMUX + select PINCONF + select GENERIC_PINCONF + default ARCH_NPCM7XX
drivers/pinctrl/nuvoton/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_PINCTRL_NPCMX50) += pinctrl-npcmx50.o
drivers/pinctrl/nuvoton/npcmreg.h new file +249 -0
249 lines not on this page · raw message
drivers/pinctrl/nuvoton/pinctrl-npcmx50.c new file +2157 -0
2,157 lines not on this page · raw message
Signature · 1 line
2.14.1