MediaTek MT6779 Pin Controller

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

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

Maintainers (maintainers): "Andy Teng <andy.teng@mediatek.com>", "Sean Wang <sean.wang@kernel.org>"

The MediaTek pin controller on MT6779 is used to control pin functions, pull up/down resistance and drive strength options.

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "mediatek,mt6779-pinctrl", "mediatek,mt6797-pinctrl"

reg — required here #

Physical addresses for GPIO base(s) and EINT registers.

reg-names — required here #

true — No constraints added by this property rule.

gpio-controller — required here #

true — No constraints added by this property rule.

#gpio-cells — required here #

Exact value (const): 2

Number of cells in GPIO specifier. Since the generic GPIO binding is used, the amount of cells must be specified as 2. See the below mentioned gpio binding representation for description of particular cells.

gpio-ranges — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 5

GPIO valid number range.

interrupt-controller — not listed as required here #

true — No constraints added by this property rule.

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

Specifies the summary IRQ.

#interrupt-cells — not listed as required here #

Exact value (const): 2

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

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)

Exact value (const): "mediatek,mt6779-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 9

Maximum number of items (maxItems): 9

reg-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "gpio"

Item 2

Exact value (const): "iocfg_rm"

Item 3

Exact value (const): "iocfg_br"

Item 4

Exact value (const): "iocfg_lm"

Item 5

Exact value (const): "iocfg_lb"

Item 6

Exact value (const): "iocfg_rt"

Item 7

Exact value (const): "iocfg_lt"

Item 8

Exact value (const): "iocfg_tl"

Item 9

Exact value (const): "eint"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "mediatek,mt6797-pinctrl"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 5

Maximum number of items (maxItems): 5

reg-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "gpio"

Item 2

Exact value (const): "iocfgl"

Item 3

Exact value (const): "iocfgb"

Item 4

Exact value (const): "iocfgr"

Item 5

Exact value (const): "iocfgt"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

reg-names — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "eint"

When the condition matches (then) #

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

Properties matching a name pattern (patternProperties) #

-[0-9]*$ — 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) #

-pins*$ — name matches this regular expression

Value type (type): "object"

A pinctrl node should contain at least one subnodes representing the pinctrl groups available on the machine. Each subnode will list the pins it needs, and how they should be configured, with regard to muxer configuration, pullups, drive strength, input enable/disable and input schmitt.

Shared schema rule ($ref): /schemas/pinctrl/pincfg-node.yaml

Properties and child nodes (properties)

pinmux — required here

Integer array, represents gpio pin number and mux setting. Supported pin number and mux varies for different SoCs, and are defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly.

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.

input-disable — 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.

input-schmitt-enable — not listed as required here

true — No constraints added by this property rule.

input-schmitt-disable — not listed as required here

true — No constraints added by this property rule.

drive-strength — not listed as required here

Allowed values (enum): 2, 4, 8, 12, 16

slew-rate — not listed as required here

Allowed values (enum): 0, 1

mediatek,pull-up-adv — not listed as required here

Pull up settings for 2 pull resistors, R0 and R1. User can configure those special pins. Valid arguments are described as below: 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.

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

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

mediatek,pull-down-adv — not listed as required here

Pull down settings for 2 pull resistors, R0 and R1. User can configure those special pins. Valid arguments are described as below: 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.

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

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

Required in this object (required): "pinmux"

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

false

Not allowed by this rule.

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

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/pinctrl/mt6779-pinfunc.h>

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

    pio: pinctrl@10005000 {
        compatible = "mediatek,mt6779-pinctrl";
        reg = <0 0x10005000 0 0x1000>,
            <0 0x11c20000 0 0x1000>,
            <0 0x11d10000 0 0x1000>,
            <0 0x11e20000 0 0x1000>,
            <0 0x11e70000 0 0x1000>,
            <0 0x11ea0000 0 0x1000>,
            <0 0x11f20000 0 0x1000>,
            <0 0x11f30000 0 0x1000>,
            <0 0x1000b000 0 0x1000>;
        reg-names = "gpio", "iocfg_rm",
          "iocfg_br", "iocfg_lm",
          "iocfg_lb", "iocfg_rt",
          "iocfg_lt", "iocfg_tl",
          "eint";
        gpio-controller;
        #gpio-cells = <2>;
        gpio-ranges = <&pio 0 0 210>;
        interrupt-controller;
        #interrupt-cells = <2>;
        interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;

        mmc0_pins_default: mmc0-0 {
            cmd-dat-pins {
                pinmux = <PINMUX_GPIO168__FUNC_MSDC0_DAT0>,
                    <PINMUX_GPIO172__FUNC_MSDC0_DAT1>,
                    <PINMUX_GPIO169__FUNC_MSDC0_DAT2>,
                    <PINMUX_GPIO177__FUNC_MSDC0_DAT3>,
                    <PINMUX_GPIO170__FUNC_MSDC0_DAT4>,
                    <PINMUX_GPIO173__FUNC_MSDC0_DAT5>,
                    <PINMUX_GPIO171__FUNC_MSDC0_DAT6>,
                    <PINMUX_GPIO174__FUNC_MSDC0_DAT7>,
                    <PINMUX_GPIO167__FUNC_MSDC0_CMD>;
                input-enable;
                mediatek,pull-up-adv = <1>;
            };
            clk-pins {
                pinmux = <PINMUX_GPIO176__FUNC_MSDC0_CLK>;
                mediatek,pull-down-adv = <2>;
            };
            rst-pins {
                pinmux = <PINMUX_GPIO178__FUNC_MSDC0_RSTB>;
                mediatek,pull-up-adv = <0>;
            };
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page