Samsung S3C/S5P/Exynos SoC pin controller

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

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

Maintainers (maintainers): "Krzysztof Kozlowski <krzk@kernel.org>", "Sylwester Nawrocki <s.nawrocki@samsung.com>", "Tomasz Figa <tomasz.figa@gmail.com>"

This is a part of device tree bindings for Samsung S3C/S5P/Exynos SoC pin controller.

All the pin controller nodes should be represented in the aliases node using the following format 'pinctrl{n}' where n is a unique number for the alias.

The controller supports three types of interrupts:: - External GPIO interrupts (see interrupts property in pin controller node);

 - External wake-up interrupts - multiplexed (capable of waking up the system
   see interrupts property in external wake-up interrupt controller node -
   samsung,pinctrl-wakeup-interrupt.yaml);
 - External wake-up interrupts - direct (capable of waking up the system, see
   interrupts property in every bank of pin controller with external wake-up
   interrupt controller - samsung,pinctrl-gpio-bank.yaml).

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^pinctrl(@.*)?"

compatible — required here #

Allowed values (enum): "axis,artpec8-pinctrl", "axis,artpec9-pinctrl", "google,gs101-pinctrl", "samsung,s3c64xx-pinctrl", "samsung,s5pv210-pinctrl", "samsung,exynos2200-pinctrl", "samsung,exynos3250-pinctrl", "samsung,exynos4210-pinctrl", "samsung,exynos4x12-pinctrl", "samsung,exynos5250-pinctrl", "samsung,exynos5260-pinctrl", "samsung,exynos5410-pinctrl", "samsung,exynos5420-pinctrl", "samsung,exynos5433-pinctrl", "samsung,exynos7-pinctrl", "samsung,exynos7870-pinctrl", "samsung,exynos7885-pinctrl", "samsung,exynos850-pinctrl", "samsung,exynos8890-pinctrl", "samsung,exynos8895-pinctrl", "samsung,exynos9610-pinctrl", "samsung,exynos9810-pinctrl", "samsung,exynos990-pinctrl", "samsung,exynosautov9-pinctrl", "samsung,exynosautov920-pinctrl", "tesla,fsd-pinctrl"

interrupts — not listed as required here #

Required for GPIO banks supporting external GPIO interrupts.

Maximum number of items (maxItems): 1

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

reg — required here #

Second base address of the pin controller if the specific registers of the pin controller are separated into the different base address. Only certain banks of certain pin controller might need it.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

clocks — not listed as required here #

Maximum number of items (maxItems): 1

clock-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "pclk"

wakeup-interrupt-controller — not listed as required here #

Shared schema rule ($ref): samsung,pinctrl-wakeup-interrupt.yaml

Properties matching a name pattern (patternProperties) #

^[a-z]+[0-9]*-gpio-bank$ — name matches this regular expression #

Pin banks of the controller are represented by child nodes of the controller node. Bank name is taken from name of the node.

Shared schema rule ($ref): samsung,pinctrl-gpio-bank.yaml

^[a-z0-9-]+-pins$ — name matches this regular expression #

Exactly one of these rules must match (oneOf) #

Rule 1

Shared schema rule ($ref): samsung,pinctrl-pins-cfg.yaml

Required in this object (required): "samsung,pins"

Rule 2

Value type (type): "object"

Properties matching a name pattern (patternProperties)

^[a-z0-9-]+-pins$ — name matches this regular expression

Shared schema rule ($ref): samsung,pinctrl-pins-cfg.yaml

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

false

Not allowed by this rule.

^(initial|sleep)-state$ — 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.

Properties matching a name pattern (patternProperties) #

^(pin-[a-z0-9-]+|[a-z0-9-]+-pin)$ — name matches this regular expression

Shared schema rule ($ref): samsung,pinctrl-pins-cfg.yaml

Properties and child nodes (properties)

samsung,pins — required here

See samsung,pinctrl-pins-cfg.yaml

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string-array

Maximum number of items (maxItems): 1

Required in this object (required): "samsung,pins"

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg"

All of these rules must match (allOf) #

Rule 1 #

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

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "google,gs101-pinctrl", "samsung,exynos8890-pinctrl"

When the condition matches (then) #

Required in this object (required): "clocks", "clock-names"

When the condition does not match (else) #

Properties and child nodes (properties)

clocks — not listed as required here

false — Not permitted by this property rule.

clock-names — not listed as required here

false — Not permitted by this property rule.

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "samsung,exynos5433-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

When the condition does not match (else) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 1

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

false

Not allowed by this rule.

Examples (examples) #

pinctrl@7f008000 {
    compatible = "samsung,s3c64xx-pinctrl";
    reg = <0x7f008000 0x1000>;
    interrupt-parent = <&vic1>;
    interrupts = <21>;

    wakeup-interrupt-controller {
        compatible = "samsung,s3c64xx-wakeup-eint";
        interrupts-extended = <&vic0 0>,
                              <&vic0 1>,
                              <&vic1 0>,
                              <&vic1 1>;
    };

    /* Pin bank with external GPIO or muxed external wake-up interrupts */
    gpa-gpio-bank {
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    // ...

    uart0-data-pins {
        samsung,pins = "gpa-0", "gpa-1";
        samsung,pin-function = <2>;
        samsung,pin-pud = <0>;
    };

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

pinctrl@11400000 {
    compatible = "samsung,exynos4210-pinctrl";
    reg = <0x11400000 0x1000>;
    interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;

    pinctrl-names = "default";
    pinctrl-0 = <&sleep0>;

    /* Pin bank with external GPIO or muxed external wake-up interrupts */
    gpa0-gpio-bank {
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    // ...

    uart0-data-pins {
        samsung,pins = "gpa0-0", "gpa0-1";
        samsung,pin-function = <2>;
        samsung,pin-pud = <0>;
        samsung,pin-drv = <0>;
    };

    // ...

    sleep0: sleep-state {
        gpa0-0-pin {
            samsung,pins = "gpa0-0";
            samsung,pin-con-pdn = <2>;
            samsung,pin-pud-pdn = <0>;
        };

        gpa0-1-pin {
            samsung,pins = "gpa0-1";
            samsung,pin-con-pdn = <0>;
            samsung,pin-pud-pdn = <0>;
        };

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

pinctrl@11000000 {
    compatible = "samsung,exynos4210-pinctrl";
    reg = <0x11000000 0x1000>;
    interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;

    wakeup-interrupt-controller {
        compatible = "samsung,exynos4210-wakeup-eint";
        interrupt-parent = <&gic>;
        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
    };

    /* Pin bank with external GPIO or muxed external wake-up interrupts */
    gpj0-gpio-bank {
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    /* Pin bank without external interrupts */
    gpy0-gpio-bank {
        gpio-controller;
        #gpio-cells = <2>;
    };

    /* Pin bank with external direct wake-up interrupts */
    gpx0-gpio-bank {
        gpio-controller;
        #gpio-cells = <2>;

        interrupt-controller;
        interrupt-parent = <&gic>;
        interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
        #interrupt-cells = <2>;
    };

    // ...

    sd0-clk-pins {
        samsung,pins = "gpk0-0";
        samsung,pin-function = <2>;
        samsung,pin-pud = <0>;
        samsung,pin-drv = <3>;
    };

    sd4-bus-width8-pins {
        part-1-pins {
            samsung,pins = "gpk0-3", "gpk0-4",
                           "gpk0-5", "gpk0-6";
            samsung,pin-function = <3>;
            samsung,pin-pud = <3>;
            samsung,pin-drv = <3>;
        };

        part-2-pins {
            samsung,pins = "gpk1-3", "gpk1-4",
                           "gpk1-5", "gpk1-6";
            samsung,pin-function = <4>;
            samsung,pin-pud = <3>;
            samsung,pin-drv = <3>;
        };
    };

    // ...

    otg-gp-pins {
        samsung,pins = "gpx3-3";
        samsung,pin-function = <1>;
        samsung,pin-pud = <0>;
        samsung,pin-drv = <0>;
        samsung,pin-val = <0>;
    };
};
#include <dt-bindings/interrupt-controller/arm-gic.h>

pinctrl@10580000 {
    compatible = "samsung,exynos5433-pinctrl";
    reg = <0x10580000 0x1a20>, <0x11090000 0x100>;

    pinctrl-names = "default";
    pinctrl-0 = <&initial_alive>;

    wakeup-interrupt-controller {
        compatible = "samsung,exynos5433-wakeup-eint",
                     "samsung,exynos7-wakeup-eint";
        interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
    };

    /* Pin bank with external direct wake-up interrupts */
    gpa0-gpio-bank {
        gpio-controller;
        #gpio-cells = <2>;

        interrupt-controller;
        interrupt-parent = <&gic>;
        interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
        #interrupt-cells = <2>;
    };

    // ...

    te-irq-pins {
        samsung,pins = "gpf1-3";
        samsung,pin-function = <0xf>;
    };

    // ..

    initial_alive: initial-state {
        gpa0-0-pin {
            samsung,pins = "gpa0-0";
            samsung,pin-function = <0>;
            samsung,pin-pud = <1>;
            samsung,pin-drv = <0>;
        };

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

pinctrl@114b0000 {
    compatible = "samsung,exynos5433-pinctrl";
    reg = <0x114b0000 0x1000>;
    interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
    power-domains = <&pd_aud>;

    /* Pin bank with external GPIO or muxed external wake-up interrupts */
    gpz0-gpio-bank {
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    // ...

    i2s0-bus-pins {
        samsung,pins = "gpz0-0", "gpz0-1", "gpz0-2", "gpz0-3",
                       "gpz0-4", "gpz0-5", "gpz0-6";
        samsung,pin-function = <2>;
        samsung,pin-pud = <0>;
        samsung,pin-drv = <0>;
    };

    // ...
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Edit this page