]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - doc/device-tree-bindings/i2c/i2c-gpio.txt
dm: i2c: add i2c-gpio driver
[karo-tx-uboot.git] / doc / device-tree-bindings / i2c / i2c-gpio.txt
1 I2C gpio device binding
2 =======================
3
4 Driver:
5 - drivers/i2c/i2c-gpio.c
6
7 Software i2c device-tree node properties:
8 Required:
9 * #address-cells = <1>;
10 * #size-cells = <0>;
11 * compatible = "i2c-gpio";
12 * gpios = <sda ...>, <scl ...>;
13
14 Optional:
15 * i2c-gpio,delay-us = <5>;
16    The resulting transfer speed can be adjusted by setting the delay[us]
17    between gpio-toggle operations. Speed [Hz] = 1000000 / 4 * udelay[us],
18    It not defined, then default is 5us (~50KHz).
19
20 Example:
21
22 i2c-gpio@1 {
23         #address-cells = <1>;
24         #size-cells = <0>;
25
26         compatible = "i2c-gpio";
27         gpios = <&gpd1 0 GPIO_ACTIVE_HIGH>, /* SDA */
28                 <&gpd1 1 GPIO_ACTIVE_HIGH>; /* CLK */
29
30         i2c-gpio,delay-us = <5>;
31
32         some_device@5 {
33                 compatible = "some_device";
34                 reg = <0x5>;
35                 ...
36         };
37 };