MediaTek MT6893 Pin Controller

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

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

Maintainers (maintainers): "AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>"

The MediaTek's MT6893 Pin controller is used to control SoC pins.

Properties and child nodes (properties) #

compatible — required here #

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

reg — required here #

Array item rules (items) #

Item 1

pin controller base

Item 2

rm group IO

Item 3

bm group IO

Item 4

lm group IO

Item 5

lb group IO

Item 6

rt group IO

Item 7

lt group IO

Item 8

tm group IO

Item 9

External Interrupt (EINT) controller base

reg-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "base"

Item 2

Exact value (const): "rm"

Item 3

Exact value (const): "bm"

Item 4

Exact value (const): "lm"

Item 5

Exact value (const): "lb"

Item 6

Exact value (const): "rt"

Item 7

Exact value (const): "lt"

Item 8

Exact value (const): "tm"

Item 9

Exact value (const): "eint"

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 #

true — No constraints added by this property rule.

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,mt6893-pinctrl";
    reg = <0x10005000 0x1000>,
          <0x11c20000 0x0200>,
          <0x11d10000 0x0200>,
          <0x11e20000 0x0200>,
          <0x11e70000 0x0200>,
          <0x11ea0000 0x0200>,
          <0x11f20000 0x0200>,
          <0x11f30000 0x0200>,
          <0x1100b000 0x1000>;
    reg-names = "base", "rm", "bm", "lm", "lb", "rt",
                "lt", "tm", "eint";
    gpio-controller;
    #gpio-cells = <2>;
    gpio-ranges = <&pio 0 0 220>;
    interrupt-controller;
    interrupts = <GIC_SPI 212 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 66: PIN CONFIGURATION NODES

Edit this page