MediaTek MT6878 Pin Controller

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

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

Maintainers (maintainers): "AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>", "Igor Belwon <igor.belwon@mentallysanemainliners.org>"

The MediaTek MT6878 Pin controller is used to control SoC pins.

Properties and child nodes (properties) #

compatible — required here #

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

reg — required here #

Array item rules (items) #

Item 1

pin controller base

Item 2

bl group IO

Item 3

bm group IO

Item 4

br group IO

Item 5

bl1 group IO

Item 6

br1 group IO

Item 7

lm group IO

Item 8

lt group IO

Item 9

rm group IO

Item 10

rt group IO

Item 11

EINT controller E block

Item 12

EINT controller S block

Item 13

EINT controller W block

Item 14

EINT controller C block

reg-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "base"

Item 2

Exact value (const): "bl"

Item 3

Exact value (const): "bm"

Item 4

Exact value (const): "br"

Item 5

Exact value (const): "bl1"

Item 6

Exact value (const): "br1"

Item 7

Exact value (const): "lm"

Item 8

Exact value (const): "lt"

Item 9

Exact value (const): "rm"

Item 10

Exact value (const): "rt"

Item 11

Exact value (const): "eint-e"

Item 12

Exact value (const): "eint-s"

Item 13

Exact value (const): "eint-w"

Item 14

Exact value (const): "eint-c"

gpio-controller — required here #

true — No constraints added by this property rule.

#gpio-cells — required here #

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.

Exact value (const): 2

gpio-ranges — required here #

Maximum number of items (maxItems): 1

gpio-line-names — not listed as required here #

Maximum number of items (maxItems): 216

interrupts — required here #

The interrupt outputs to sysirq

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

Properties matching a name pattern (patternProperties) #

-pins$ — 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"

All of these rules must match (allOf)

Rule 1

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

Rule 2

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

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.

Properties and child nodes (properties)

pinmux — required here

Integer array, represents gpio pin number and mux setting. Supported pin number and mux are defined as macros in arch/arm64/boot/dts/mediatek/mt8196-pinfunc.h for this SoC.

drive-strength — not listed as required here

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

drive-strength-microamp — not listed as required here

Allowed values (enum): 125, 250, 500, 1000

bias-pull-down — not listed as required here

Exactly one of these rules must match (oneOf)

Rule 1

Value type (type): "boolean"

Rule 2

Allowed values (enum): 75000, 5000

Pull down RSEL type resistance values (in ohms)

For normal pull down type there is no need to specify a resistance value, hence this can be specified as a boolean property. For RSEL pull down type a resistance value (in ohms) can be added.

bias-pull-up — not listed as required here

Exactly one of these rules must match (oneOf)

Rule 1

Value type (type): "boolean"

Rule 2

Allowed values (enum): 10000, 5000, 4000, 3000

Pull up RSEL type resistance values (in ohms)

For normal pull up type there is no need to specify a resistance value, hence this can be specified as a boolean property. For RSEL pull up type a resistance value (in ohms) can be added.

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

output-low — 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.

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.

Required in this object (required): "pinmux"

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

false

Not allowed by this rule.

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

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/pinctrl/mt65xx.h>
#define PINMUX_GPIO0__FUNC_GPIO0 (MTK_PIN_NO(0) | 0)
#define PINMUX_GPIO99__FUNC_SCL0 (MTK_PIN_NO(99) | 1)
#define PINMUX_GPIO100__FUNC_SDA0 (MTK_PIN_NO(100) | 1)

pio: pinctrl@10005000 {
    compatible = "mediatek,mt6878-pinctrl";
    reg = <0x10005000 0x1000>,
          <0x11d10000 0x1000>,
          <0x11d30000 0x1000>,
          <0x11d40000 0x1000>,
          <0x11d50000 0x1000>,
          <0x11d60000 0x1000>,
          <0x11e20000 0x1000>,
          <0x11e30000 0x1000>,
          <0x11eb0000 0x1000>,
          <0x11ec0000 0x1000>,
          <0x11ce0000 0x1000>,
          <0x11de0000 0x1000>,
          <0x11e60000 0x1000>,
          <0x1c01e000 0x1000>;
    reg-names = "base", "bl", "bm", "br", "bl1", "br1",
                "lm", "lt", "rm", "rt", "eint-e", "eint-s",
                "eint-w", "eint-c";
    gpio-controller;
    #gpio-cells = <2>;
    gpio-ranges = <&pio 0 0 220>;
    interrupt-controller;
    interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH 0>;
    #interrupt-cells = <2>;

    gpio-pins {
        pins {
            pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
            bias-pull-up = <4000>;
            drive-strength = <6>;
        };
    };

    i2c0-pins {
        pins-bus {
            pinmux = <PINMUX_GPIO99__FUNC_SCL0>,
                     <PINMUX_GPIO100__FUNC_SDA0>;
            bias-pull-down = <75000>;
            drive-strength-microamp = <1000>;
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Line 78: PIN CONFIGURATION NODES

Edit this page