summaryrefslogtreecommitdiff
path: root/doc/device-tree-bindings/i2c/i2c-gpio.txt
blob: ba56ed5dea11cf2b21e51789bb8a601829bb7e29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
I2C gpio device binding
=======================

Driver:
- drivers/i2c/i2c-gpio.c

Software i2c device-tree node properties:
Required:
* #address-cells = <1>;
* #size-cells = <0>;
* compatible = "i2c-gpio";
* gpios = <sda ...>, <scl ...>;

Optional:
* i2c-gpio,delay-us = <5>;
   The resulting transfer speed can be adjusted by setting the delay[us]
   between gpio-toggle operations. Speed [Hz] = 1000000 / 4 * udelay[us],
   It not defined, then default is 5us (~50KHz).

Example:

i2c-gpio@1 {
	#address-cells = <1>;
	#size-cells = <0>;

	compatible = "i2c-gpio";
	gpios = <&gpd1 0 GPIO_ACTIVE_HIGH>, /* SDA */
		<&gpd1 1 GPIO_ACTIVE_HIGH>; /* CLK */

	i2c-gpio,delay-us = <5>;

	some_device@5 {
		compatible = "some_device";
		reg = <0x5>;
		...
	};
};