Nuvoton NPCM845 Pin Controller and GPIO

Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/nuvoton,npcm845-pinctrl.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Tomer Maimon <tmaimon77@gmail.com>"

The Nuvoton BMC NPCM8XX 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.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "nuvoton,npcm845-pinctrl"

ranges — required here #

Maximum number of items (maxItems): 1

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 1

nuvoton,sysgcr — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

a phandle to access GCR registers.

Properties matching a name pattern (patternProperties) #

^gpio@ — name matches this regular expression #

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Eight GPIO banks that each contain 32 GPIOs.

Properties and child nodes (properties) #

gpio-controller — required here

true — No constraints added by this property rule.

#gpio-cells — required here

Exact value (const): 2

reg — required here

Maximum number of items (maxItems): 1

interrupts — required here

Maximum number of items (maxItems): 1

gpio-ranges — required here

Maximum number of items (maxItems): 1

Required in this object (required): "gpio-controller", "#gpio-cells", "reg", "interrupts", "gpio-ranges"

-mux$ — name matches this regular expression #

Shared schema rule ($ref): pinmux-node.yaml#

Properties and child nodes (properties) #

groups — not listed as required here

One or more groups of pins to mux to a certain function

Array item rules (items)

Allowed values (enum): "iox1", "iox2", "smb1d", "smb2d", "lkgpo1", "lkgpo2", "ioxh", "gspi", "smb5b", "smb5c", "lkgpo0", "pspi", "jm1", "jm2", "smb4b", "smb4c", "smb15", "smb16", "smb17", "smb18", "smb19", "smb20", "smb21", "smb22", "smb23", "smb23b", "smb4d", "smb14", "smb5", "smb4", "smb3", "spi0cs1", "spi0cs2", "spi0cs3", "spi1cs0", "spi1cs1", "spi1cs2", "spi1cs3", "spi1cs23", "smb3c", "smb3b", "bmcuart0a", "uart1", "jtag2", "bmcuart1", "uart2", "sg1mdio", "bmcuart0b", "r1err", "r1md", "r1oen", "r2oen", "rmii3", "r3oen", "smb3d", "fanin0", "fanin1", "fanin2", "fanin3", "fanin4", "fanin5", "fanin6", "fanin7", "fanin8", "fanin9", "fanin10", "fanin11", "fanin12", "fanin13", "fanin14", "fanin15", "pwm0", "pwm1", "pwm2", "pwm3", "r2", "r2err", "r2md", "r3rxer", "ga20kbc", "smb5d", "lpc", "espi", "rg2", "ddr", "i3c0", "i3c1", "i3c2", "i3c3", "i3c4", "i3c5", "smb0", "smb1", "smb2", "smb2c", "smb2b", "smb1c", "smb1b", "smb8", "smb9", "smb10", "smb11", "sd1", "sd1pwr", "pwm4", "pwm5", "pwm6", "pwm7", "pwm8", "pwm9", "pwm10", "pwm11", "mmc8", "mmc", "mmcwp", "mmccd", "mmcrst", "clkout", "serirq", "scipme", "smi", "smb6", "smb6b", "smb6c", "smb6d", "smb7", "smb7b", "smb7c", "smb7d", "spi1", "faninx", "r1", "spi3", "spi3cs1", "spi3quad", "spi3cs2", "spi3cs3", "nprd_smi", "smb0b", "smb0c", "smb0den", "smb0d", "ddc", "rg2mdio", "wdog1", "wdog2", "smb12", "smb13", "spix", "spixcs1", "clkreq", "hgpio0", "hgpio1", "hgpio2", "hgpio3", "hgpio4", "hgpio5", "hgpio6", "hgpio7", "bu4", "bu4b", "bu5", "bu5b", "bu6", "gpo187"

function — not listed as required here

The function that a group of pins is muxed to

Allowed values (enum): "iox1", "iox2", "smb1d", "smb2d", "lkgpo1", "lkgpo2", "ioxh", "gspi", "smb5b", "smb5c", "lkgpo0", "pspi", "jm1", "jm2", "smb4b", "smb4c", "smb15", "smb16", "smb17", "smb18", "smb19", "smb20", "smb21", "smb22", "smb23", "smb23b", "smb4d", "smb14", "smb5", "smb4", "smb3", "spi0cs1", "spi0cs2", "spi0cs3", "spi1cs0", "spi1cs1", "spi1cs2", "spi1cs3", "spi1cs23", "smb3c", "smb3b", "bmcuart0a", "uart1", "jtag2", "bmcuart1", "uart2", "sg1mdio", "bmcuart0b", "r1err", "r1md", "r1oen", "r2oen", "rmii3", "r3oen", "smb3d", "fanin0", "fanin1", "fanin2", "fanin3", "fanin4", "fanin5", "fanin6", "fanin7", "fanin8", "fanin9", "fanin10", "fanin11", "fanin12", "fanin13", "fanin14", "fanin15", "pwm0", "pwm1", "pwm2", "pwm3", "r2", "r2err", "r2md", "r3rxer", "ga20kbc", "smb5d", "lpc", "espi", "rg2", "ddr", "i3c0", "i3c1", "i3c2", "i3c3", "i3c4", "i3c5", "smb0", "smb1", "smb2", "smb2c", "smb2b", "smb1c", "smb1b", "smb8", "smb9", "smb10", "smb11", "sd1", "sd1pwr", "pwm4", "pwm5", "pwm6", "pwm7", "pwm8", "pwm9", "pwm10", "pwm11", "mmc8", "mmc", "mmcwp", "mmccd", "mmcrst", "clkout", "serirq", "scipme", "smi", "smb6", "smb6b", "smb6c", "smb6d", "smb7", "smb7b", "smb7c", "smb7d", "spi1", "faninx", "r1", "spi3", "spi3cs1", "spi3quad", "spi3cs2", "spi3cs3", "nprd_smi", "smb0b", "smb0c", "smb0den", "smb0d", "ddc", "rg2mdio", "wdog1", "wdog2", "smb12", "smb13", "spix", "spixcs1", "clkreq", "hgpio0", "hgpio1", "hgpio2", "hgpio3", "hgpio4", "hgpio5", "hgpio6", "hgpio7", "bu4", "bu4b", "bu5", "bu5b", "bu6", "gpo187"

Property dependencies (dependencies) #

groups — applies when this property is present

Also requires: "function"

function — applies when this property is present

Also requires: "groups"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

^pin — name matches this regular expression #

Shared schema rule ($ref): pincfg-node.yaml#

Properties and child nodes (properties) #

pins — not listed as required here

A list of pins to configure in certain ways, such as enabling debouncing

Array item rules (items)

String pattern (pattern): "^GPIO([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-6])"

bias-disable — not listed as required here

true — No constraints added by this property rule.

bias-pull-up — not listed as required here

true — No constraints added by this property rule.

bias-pull-down — not listed as required here

true — No constraints added by this property rule.

input-enable — not listed as required here

true — No constraints added by this property rule.

output-low — not listed as required here

true — No constraints added by this property rule.

output-high — not listed as required here

true — No constraints added by this property rule.

drive-push-pull — not listed as required here

true — No constraints added by this property rule.

drive-open-drain — not listed as required here

true — No constraints added by this property rule.

input-debounce — not listed as required here

Debouncing periods in microseconds, one period per interrupt bank found in the controller

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 4

slew-rate — not listed as required here

0: Low rate 1: High rate

Allowed values (enum): 0, 1

drive-strength — not listed as required here

Allowed values (enum): 0, 1, 2, 4, 8, 12

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): pinctrl.yaml#

Required in this object (required): "compatible", "ranges", "#address-cells", "#size-cells", "nuvoton,sysgcr"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/gpio/gpio.h>

soc {
  #address-cells = <2>;
  #size-cells = <2>;

  pinctrl: pinctrl@f0010000 {
    compatible = "nuvoton,npcm845-pinctrl";
    ranges = <0x0 0x0 0xf0010000 0x8000>;
    #address-cells = <1>;
    #size-cells = <1>;
    nuvoton,sysgcr = <&gcr>;

    gpio0: gpio@0 {
      gpio-controller;
      #gpio-cells = <2>;
      reg = <0x0 0xb0>;
      interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
      gpio-ranges = <&pinctrl 0 0 32>;
    };

    fanin0_pin: fanin0-mux {
      groups = "fanin0";
      function = "fanin0";
    };

    pin34_slew: pin34-slew {
      pins = "GPIO34/I3C4_SDA";
      bias-disable;
    };
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Edit this page