xref: /linux/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml (revision d2912cb15bdda8ba4a5dd73396ad62641af2f520)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Bindings for GPIO bitbanged I2C
8
9maintainers:
10  - Wolfram Sang <wolfram@the-dreams.de>
11
12allOf:
13  - $ref: /schemas/i2c/i2c-controller.yaml#
14
15properties:
16  compatible:
17    items:
18      - const: i2c-gpio
19
20  sda-gpios:
21    description:
22      gpio used for the sda signal, this should be flagged as
23      active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
24      from <dt-bindings/gpio/gpio.h> since the signal is by definition
25      open drain.
26    maxItems: 1
27
28  scl-gpios:
29    description:
30      gpio used for the scl signal, this should be flagged as
31      active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
32      from <dt-bindings/gpio/gpio.h> since the signal is by definition
33      open drain.
34    maxItems: 1
35
36  i2c-gpio,scl-output-only:
37    description: scl as output only
38    type: boolean
39
40  i2c-gpio,delay-us:
41    description: delay between GPIO operations (may depend on each platform)
42    $ref: /schemas/types.yaml#/definitions/uint32
43
44  i2c-gpio,timeout-ms:
45    description: timeout to get data
46    $ref: /schemas/types.yaml#/definitions/uint32
47
48  # Deprecated properties, do not use in new device tree sources:
49  gpios:
50    minItems: 2
51    maxItems: 2
52    description: sda and scl gpio, alternative for {sda,scl}-gpios
53
54  i2c-gpio,sda-open-drain:
55    # Generate a warning if present
56    not: true
57    description: this means that something outside of our control has put
58      the GPIO line used for SDA into open drain mode, and that something is
59      not the GPIO chip. It is essentially an inconsistency flag.
60
61  i2c-gpio,scl-open-drain:
62    # Generate a warning if present
63    not: true
64    description: this means that something outside of our control has put the
65      GPIO line used for SCL into open drain mode, and that something is not
66      the GPIO chip. It is essentially an inconsistency flag.
67
68required:
69  - compatible
70  - sda-gpios
71  - scl-gpios
72
73...
74