• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Device-Tree bindings for i2c gpio driver
2
3Required properties:
4	- compatible = "i2c-gpio";
5	- sda-gpios: gpio used for the sda signal, this should be flagged as
6	  active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
7	  from <dt-bindings/gpio/gpio.h> since the signal is by definition
8	  open drain.
9	- scl-gpios: gpio used for the scl signal, this should be flagged as
10	  active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
11	  from <dt-bindings/gpio/gpio.h> since the signal is by definition
12	  open drain.
13
14Optional properties:
15	- i2c-gpio,scl-output-only: scl as output only
16	- i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform)
17	- i2c-gpio,timeout-ms: timeout to get data
18
19Deprecated properties, do not use in new device tree sources:
20	- gpios: sda and scl gpio, alternative for {sda,scl}-gpios
21	- i2c-gpio,sda-open-drain: this means that something outside of our
22	  control has put the GPIO line used for SDA into open drain mode, and
23	  that something is not the GPIO chip. It is essentially an
24	  inconsistency flag.
25	- i2c-gpio,scl-open-drain: this means that something outside of our
26	  control has put the GPIO line used for SCL into open drain mode, and
27	  that something is not the GPIO chip. It is essentially an
28	  inconsistency flag.
29
30Example nodes:
31
32#include <dt-bindings/gpio/gpio.h>
33
34i2c@0 {
35	compatible = "i2c-gpio";
36	sda-gpios = <&pioA 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
37	scl-gpios = <&pioA 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
38	i2c-gpio,delay-us = <2>;	/* ~100 kHz */
39	#address-cells = <1>;
40	#size-cells = <0>;
41
42	rv3029c2@56 {
43		compatible = "rv3029c2";
44		reg = <0x56>;
45	};
46};
47