Freescale MXS GPIO controller

Schema identifier ($id): "http://devicetree.org/schemas/gpio/gpio-mxs.yaml#"

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

Maintainers (maintainers): "Shawn Guo <shawnguo@kernel.org>"

The Freescale MXS GPIO controller is part of MXS PIN controller. The GPIOs are organized in port/bank, each port consists of 32 GPIOs. As the GPIO controller is embedded in the PIN controller and all the GPIO ports share the same IO space with PIN controller, the GPIO node will be represented as sub-nodes of MXS pinctrl node.

Properties and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "fsl,imx23-pinctrl", "fsl,imx28-pinctrl"

Item 2

Exact value (const): "simple-bus"

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 0

reg — required here #

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

^(?!gpio@)[^@]+@[0-9]+$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

fsl,pinmux-ids — required here

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

An integer array. Each integer in the array specify a pin with given mux function, with bank, pin and mux packed as below.

[15..12] : bank number [11..4] : pin number [3..0] : mux selection

This integer with mux selection packed is used as an entity by both group and config nodes to identify a pin. The mux selection in the integer takes effects only on group node, and will get ignored by driver with config node, since config node is only meant to set up pin configurations.

Valid values for these integers are listed below.

reg — not listed as required here

Array item rules (items)

Item 1

pin group index. NOTE: it is supposed wrong use reg property here. But it is over 10 years devices. Just keep it as it.

fsl,drive-strength — not listed as required here

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

Allowed values (enum): 0, 1, 2, 3

0: MXS_DRIVE_4mA 1: MXS_DRIVE_8mA 2: MXS_DRIVE_12mA 3: MXS_DRIVE_16mA

fsl,voltage — not listed as required here

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

Allowed values (enum): 0, 1

0: MXS_VOLTAGE_LOW - 1.8 V 1: MXS_VOLTAGE_HIGH - 3.3 V

fsl,pull-up — not listed as required here

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

Allowed values (enum): 0, 1

0: MXS_PULL_DISABLE - Disable the internal pull-up 1: MXS_PULL_ENABLE - Enable the internal pull-up

Note that when enabling the pull-up, the internal pad keeper gets disabled. Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up will only disable the internal pad keeper.

Required in this object (required): "fsl,pinmux-ids"

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

false

Not allowed by this rule.

^gpio@[0-9]+$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

compatible — required here

Allowed values (enum): "fsl,imx23-gpio", "fsl,imx28-gpio"

reg — required here

Maximum number of items (maxItems): 1

interrupts — required here

Should be the port interrupt shared by all 32 pins.

Maximum number of items (maxItems): 1

interrupt-controller — required here

true — No constraints added by this property rule.

#interrupt-cells — required here

Exact value (const): 2

#gpio-cells — required here

Exact value (const): 2

gpio-controller — required here

true — No constraints added by this property rule.

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

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

false

Not allowed by this rule.

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

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

false

Not allowed by this rule.

Examples (examples) #

pinctrl@80018000 {
    #address-cells = <1>;
    #size-cells = <0>;
    compatible = "fsl,imx28-pinctrl", "simple-bus";
    reg = <0x80018000 0x2000>;

    gpio@0 {
        compatible = "fsl,imx28-gpio";
        reg = <0>;
        interrupts = <127>;
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio@1 {
        compatible = "fsl,imx28-gpio";
        reg = <1>;
        interrupts = <126>;
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio@2 {
        compatible = "fsl,imx28-gpio";
        reg = <2>;
        interrupts = <125>;
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio@3 {
        compatible = "fsl,imx28-gpio";
        reg = <3>;
        interrupts = <124>;
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    gpio@4 {
        compatible = "fsl,imx28-gpio";
        reg = <4>;
        interrupts = <123>;
        gpio-controller;
        #gpio-cells = <2>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };

    lcdif-apx4@5 {
        reg = <5>;
        fsl,pinmux-ids = <0x1181 0x1191>;
        fsl,drive-strength = <0>;
        fsl,voltage = <0>;
        fsl,pull-up = <0>;
    };
};

Source notes #

Annotations retained from the schema source

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

Line 25: Over 10 years old devices, driver use simple-bus to probe child gpio

Line 26: Devices. Keep it as it to be compatible existed dts files.

Edit this page