summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-04-02 12:42:51 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2015-04-02 16:23:30 +0200
commit88731dc0e8b6ba244e097b412b302acf3b9cc889 (patch)
tree8c2d0b647a336c68274c41f89ee6d33372ab185d /Documentation
parent512dc8ed77ec5ad4cf0be3c70732bf583410c7c2 (diff)
i2c-imx: add gpio recovery functionality
If the I2C is disturbed by other signals sometimes the i2c-imx bus gets stuck with SDA being low. This adds a recovery function to the bus driver. When e.g. a device driver detects a stuck bus int i2c_recover_bus(struct i2c_adapter *adap) can be called to try to recover the bus.
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-imx.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.txt b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
index 3614242e7732..9f3924fb503d 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
@@ -23,3 +23,26 @@ i2c@70038000 { /* HS-I2C on i.MX51 */
interrupts = <64>;
clock-frequency = <400000>;
};
+
+The driver can provide recovery functionality for cases were the bus gets
+stack with SDA pulled low.
+In order to enable this one has to specify an additional pinctrl property with
+the name 'recovery' to mux GPIO functionality on SDA/SCA and a gpios
+property with the GPIOs for SDA/SCL.
+The lack of the gpios property disables the functionality.
+
+Examples:
+&i2c3 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default", "recovery";
+ pinctrl-0 = <&pinctrl_i2c3_1>;
+ pinctrl-1 = <&pinctrl_i2c3_recovery_1>;
+ gpios = <&gpio3 18 0 /* sda */
+ &gpio3 17 0 /* scl */
+ >;
+ status = "disabled";
+};
+
+When e.g. a device driver detects a stuck bus
+int i2c_recover_bus(struct i2c_adapter *adap)
+can be called to try to recover the bus.