i2c-gpio.txt 757 B

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