MediaTek MT8189 Pin Controller

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

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

Maintainers (maintainers): "Lei Xue <lei.xue@mediatek.com>", "Cathy Xu <ot_cathy.xu@mediatek.com>"

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

Properties and child nodes (properties) #

compatible — required here #

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

reg — required here #

Array item rules (items) #

Item 1

gpio base

Item 2

lm group IO

Item 3

rb0 group IO

Item 4

rb1 group IO

Item 5

bm0 group IO

Item 6

bm1 group IO

Item 7

bm2 group IO

Item 8

lt0 group IO

Item 9

lt1 group IO

Item 10

rt group IO

Item 11

eint0 group IO

Item 12

eint1 group IO

Item 13

eint2 group IO

Item 14

eint3 group IO

Item 15

eint4 group IO

reg-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "base"

Item 2

Exact value (const): "lm"

Item 3

Exact value (const): "rb0"

Item 4

Exact value (const): "rb1"

Item 5

Exact value (const): "bm0"

Item 6

Exact value (const): "bm1"

Item 7

Exact value (const): "bm2"

Item 8

Exact value (const): "lt0"

Item 9

Exact value (const): "lt1"

Item 10

Exact value (const): "rt"

Item 11

Exact value (const): "eint0"

Item 12

Exact value (const): "eint1"

Item 13

Exact value (const): "eint2"

Item 14

Exact value (const): "eint3"

Item 15

Exact value (const): "eint4"

interrupts — required here #

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-controller — required here #

true — No constraints added by this property rule.

#gpio-cells — required here #

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.

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"

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

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

false

Not allowed by this rule.

A pinctrl node should contain at least one subnode 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 varies for different SoCs, and are defined as macros in arch/arm64/boot/dts/mediatek/mt8189-pinfunc.h directly, for this SoC.

drive-strength — not listed as required here

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

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): 100, 101, 102, 103

mt8189 pull down PUPD/R0/R1 type define value.

Rule 3

Allowed values (enum): 75000, 5000

mt8189 pull down RSEL type si unit value(ohm).

For pull down type is normal, it doesn't need add R1R0 define and resistance value.

For pull down type is PUPD/R0/R1 type, it can add R1R0 define to set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11" define in mt8189.

For pull down type is PD/RSEL, it can add resistance value(ohm) to set different resistance by identifying property "mediatek,rsel-resistance-in-si-unit".

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): 100, 101, 102, 103

mt8189 pull up PUPD/R0/R1 type define value.

Rule 3

Allowed values (enum): 1000, 1500, 2000, 3000, 4000, 5000, 75000

mt8189 pull up RSEL type si unit value(ohm).

For pull up type is normal, it don't need add R1R0 define and resistance value.

For pull up type is PUPD/R0/R1 type, it can add R1R0 define to set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11" define in mt8189.

For pull up type is PU/RSEL, it can add resistance value(ohm) to set different resistance by identifying property "mediatek,rsel-resistance-in-si-unit".

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"

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/pinctrl/mt65xx.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#define PINMUX_GPIO51__FUNC_SCL0 (MTK_PIN_NO(51) | 2)
#define PINMUX_GPIO52__FUNC_SDA0 (MTK_PIN_NO(52) | 2)

pio: pinctrl@10005000 {
    compatible = "mediatek,mt8189-pinctrl";
    reg = <0x10005000 0x1000>,
          <0x11b50000 0x1000>,
          <0x11c50000 0x1000>,
          <0x11c60000 0x1000>,
          <0x11d20000 0x1000>,
          <0x11d30000 0x1000>,
          <0x11d40000 0x1000>,
          <0x11e20000 0x1000>,
          <0x11e30000 0x1000>,
          <0x11f20000 0x1000>,
          <0x11ce0000 0x1000>,
          <0x11de0000 0x1000>,
          <0x11e60000 0x1000>,
          <0x1c01e000 0x1000>,
          <0x11f00000 0x1000>;
    reg-names = "base", "lm", "rb0", "rb1", "bm0" , "bm1",
                "bm2", "lt0", "lt1", "rt", "eint0", "eint1",
                "eint2", "eint3", "eint4";
    gpio-controller;
    #gpio-cells = <2>;
    gpio-ranges = <&pio 0 0 182>;
    interrupt-controller;
    interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH 0>;
    #interrupt-cells = <2>;

    i2c0-pins {
        pins {
            pinmux = <PINMUX_GPIO51__FUNC_SCL0>,
                     <PINMUX_GPIO52__FUNC_SDA0>;
            bias-disable;
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Line 74: PIN CONFIGURATION NODES

Edit this page