Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: i2c: gpio: Add properties for dealing with write-only SDA/SCL w/o pullup

There are slave devices that understand I2C but have read-only SDA and
SCL. Examples are FD650 7-segment LED controller and its derivatives.
Typical board designs don't even have a pull-up for both pins.
Therefore add properties for not using open-drain. For write-only SCL
we have a property already, add one for write-only SDA.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

authored by

Heiner Kallweit and committed by
Wolfram Sang
a00bb94c f531ecf7

+26
+26
Documentation/devicetree/bindings/i2c/i2c-gpio.yaml
··· 33 33 open drain. 34 34 maxItems: 1 35 35 36 + i2c-gpio,sda-output-only: 37 + description: sda as output only 38 + type: boolean 39 + 36 40 i2c-gpio,scl-output-only: 37 41 description: scl as output only 38 42 type: boolean ··· 66 62 description: this means that something outside of our control has put the 67 63 GPIO line used for SCL into open drain mode, and that something is not 68 64 the GPIO chip. It is essentially an inconsistency flag. 65 + 66 + i2c-gpio,sda-has-no-pullup: 67 + type: boolean 68 + description: sda is used in a non-compliant way and has no pull-up. 69 + Therefore disable open-drain. This property is mutually-exclusive 70 + with i2c-gpio,sda-open-drain. 71 + 72 + i2c-gpio,scl-has-no-pullup: 73 + type: boolean 74 + description: scl is used in a non-compliant way and has no pull-up. 75 + Therefore disable open-drain. This property is mutually-exclusive 76 + with i2c-gpio,scl-open-drain. 77 + 78 + dependencies: 79 + i2c-gpio,sda-has-no-pullup: 80 + not: 81 + required: 82 + - i2c-gpio,sda-open-drain 83 + i2c-gpio,scl-has-no-pullup: 84 + not: 85 + required: 86 + - i2c-gpio,scl-open-drain 69 87 70 88 required: 71 89 - compatible