u-boot/doc/device-tree-bindings/i2c/i2c-gpio.txt
Alex Shumsky f315a48131 i2c: i2c-gpio: add support for i2c-gpio,sda-output-only
Some I2C slave devices are read-only and don't even answer with NACK.
For example FD65x segment LED controllers.
Make them usable with i2c-gpio,sda-output-only that are already supported
by Linux 6.3+.

Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2024-10-21 06:32:40 +02:00

43 lines
952 B
Text

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).
* i2c-gpio,deblock
Run deblocking sequence when the driver gets probed.
* i2c-gpio,scl-output-only;
Set if SCL is an output only
* i2c-gpio,sda-output-only;
Set if SDA is an output only
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>;
...
};
};