summaryrefslogtreecommitdiff
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-04-02 12:42:51 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-01-10 23:11:44 +0100
commitb5480282f42e3d6f5d7875a495a1f9f6a803088e (patch)
tree503a0a2eb9a96ba17803a852f8c3aad9414e7eb3 /Documentation/devicetree
parentfc0d0a29ab0e6fc0de72b63fba80845cc554d543 (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. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 88731dc0e8b6ba244e097b412b302acf3b9cc889) (cherry picked from commit 478388b32ac83fc44a75d63ae819aadb220c83ec) Conflicts: arch/arm/boot/dts/imx6qdl-apalis.dtsi drivers/i2c/busses/i2c-imx.c
Diffstat (limited to 'Documentation/devicetree')
-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 ce4311d726ae..50f1ad81331f 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.txt
@@ -38,3 +38,26 @@ i2c0: i2c@40066000 { /* i2c0 on vf610 */
<&edma0 0 51>;
dma-names = "rx","tx";
};
+
+The driver can provide recovery functionality for cases were the bus gets
+stuck 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.