Przemyslaw Marczak | d3aa7e1 | 2015-03-31 18:57:18 +0200 | [diff] [blame] | 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). |
Marek Vasut | d55b780 | 2020-02-18 18:24:42 +0100 | [diff] [blame] | 19 | * i2c-gpio,deblock |
| 20 | Run deblocking sequence when the driver gets probed. |
Heiko Schocher | 48f39d8 | 2020-03-16 07:55:06 +0100 | [diff] [blame^] | 21 | * i2c-gpio,scl-output-only; |
| 22 | Set if SCL is an output only |
Przemyslaw Marczak | d3aa7e1 | 2015-03-31 18:57:18 +0200 | [diff] [blame] | 23 | |
| 24 | Example: |
| 25 | |
| 26 | i2c-gpio@1 { |
| 27 | #address-cells = <1>; |
| 28 | #size-cells = <0>; |
| 29 | |
| 30 | compatible = "i2c-gpio"; |
| 31 | gpios = <&gpd1 0 GPIO_ACTIVE_HIGH>, /* SDA */ |
| 32 | <&gpd1 1 GPIO_ACTIVE_HIGH>; /* CLK */ |
| 33 | |
| 34 | i2c-gpio,delay-us = <5>; |
| 35 | |
| 36 | some_device@5 { |
| 37 | compatible = "some_device"; |
| 38 | reg = <0x5>; |
| 39 | ... |
| 40 | }; |
| 41 | }; |