Documentation/devicetree/bindings/gpio/gpio-mmio.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
Extension
.yaml
Size
4729 bytes
Lines
164
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Generic MMIO GPIO

maintainers:
  - Linus Walleij <linusw@kernel.org>
  - Bartosz Golaszewski <brgl@bgdev.pl>

description:
  Some simple GPIO controllers may consist of a single data register or a pair
  of set/clear-bit registers. Such controllers are common for glue logic in
  FPGAs or ASICs. Commonly, these controllers are accessed over memory-mapped
  NAND-style parallel busses.

properties:
  compatible:
    enum:
      - brcm,bcm6345-gpio
      - intel,ixp4xx-expansion-bus-mmio-gpio
      - ni,169445-nand-gpio
      - opencores,gpio
      - wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller

  big-endian: true

  '#gpio-cells':
    const: 2

  gpio-controller: true

  little-endian: true

  reg:
    minItems: 1
    description:
      A list of registers in the controller. The width of each register is
      determined by its size. All registers must have the same width. The number
      of GPIOs is set by the width, with bit 0 corresponding to GPIO 0, unless
      the ngpios property further restricts the number of used lines.
    items:
      - description:
          Register to READ the value of the GPIO lines. If GPIO line is high,
          the bit will be set. If the GPIO line is low, the bit will be cleared.
          This register may also be used to drive GPIOs if the SET register is
          omitted.
      - description:
          Register to SET the value of the GPIO lines. Setting a bit in this
          register will drive the GPIO line high.
      - description:
          Register to CLEAR the value of the GPIO lines. Setting a bit in this
          register will drive the GPIO line low. If this register is omitted,
          the SET register will be used to clear the GPIO lines as well, by
          actively writing the line with 0.
      - description:
          Register to set the line as OUTPUT. Setting a bit in this register
          will turn that line into an output line. Conversely, clearing a bit
          will turn that line into an input.
      - description:
          Register to set this line as INPUT. Setting a bit in this register
          will turn that line into an input line. Conversely, clearing a bit
          will turn that line into an output.

  reg-names:
    minItems: 1
    maxItems: 5
    items:

Annotation

Implementation Notes