Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.yaml
Extension
.yaml
Size
5512 bytes
Lines
175
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/i2c/i2c-demux-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Pinctrl-based I2C Bus Demultiplexer

maintainers:
  - Wolfram Sang <wsa+renesas@sang-engineering.com>

description: |
  This binding describes an I2C bus demultiplexer that uses pin multiplexing to
  route the I2C signals, and represents the pin multiplexing configuration
  using the pinctrl device tree bindings.  This may be used to select one I2C
  IP core at runtime which may have a better feature set for a given task than
  another I2C IP core on the SoC.  The most simple example is to fall back to
  GPIO bitbanging if your current runtime configuration hits an errata of the
  internal IP core.

      +-------------------------------+
      | SoC                           |
      |                               |   +-----+  +-----+
      |   +------------+              |   | dev |  | dev |
      |   |I2C IP Core1|--\           |   +-----+  +-----+
      |   +------------+   \-------+  |      |        |
      |                    |Pinctrl|--|------+--------+
      |   +------------+   +-------+  |
      |   |I2C IP Core2|--/           |
      |   +------------+              |
      |                               |
      +-------------------------------+

allOf:
  - $ref: /schemas/i2c/i2c-controller.yaml#

properties:
  compatible:
    const: i2c-demux-pinctrl

  i2c-parent:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    minItems: 2
    items:
      maxItems: 1
    description:
      List of phandles of I2C masters available for selection.  The first one
      will be used as default.

  i2c-bus-name:
    $ref: /schemas/types.yaml#/definitions/string
    description:
      The name of this bus.  Also needed as pinctrl-name for the I2C parents.

required:
  - compatible
  - i2c-parent
  - i2c-bus-name

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    gpioi2c2: i2c-9 {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "i2c-gpio";

Annotation

Implementation Notes