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