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