Mediatek MT7621 SoC GPIO controller

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

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

Maintainers (maintainers): "Sergio Paracuellos <sergio.paracuellos@gmail.com>"

The IP core used inside these SoCs has 3 banks of 32 GPIOs each. The registers of all the banks are interwoven inside one single IO range. We load one GPIO controller instance per bank. Also the GPIO controller can receive interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU using GIC INT12.

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^gpio@[0-9a-f]+$"

compatible — required here #

Exact value (const): "mediatek,mt7621-gpio"

reg — required here #

Maximum number of items (maxItems): 1

#gpio-cells — required here #

Exact value (const): 2

gpio-controller — required here #

true — No constraints added by this property rule.

gpio-ranges — required here #

true — No constraints added by this property rule.

interrupt-controller — required here #

true — No constraints added by this property rule.

#interrupt-cells — required here #

Exact value (const): 2

interrupts — required here #

Maximum number of items (maxItems): 1

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

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

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/mips-gic.h>

gpio@600 {
  compatible = "mediatek,mt7621-gpio";
  reg = <0x600 0x100>;
  #gpio-cells = <2>;
  gpio-controller;
  gpio-ranges = <&pinctrl 0 0 95>;
  interrupt-controller;
  #interrupt-cells = <2>;
  interrupt-parent = <&gic>;
  interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>;
};

Source notes #

Annotations retained from the schema source

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

Edit this page