From patchwork Tue Feb 8 12:32:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12738594 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BDCBC433F5 for ; Tue, 8 Feb 2022 12:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EAYwHMU24PYDoumISpYU0DcfSCQLZA9Y8Md4GZtZeWg=; b=h+nPEsXdYYemg2 OdCxGZdQNXQ1wgfA22e3NpiHV4uVejVkLIFdoJhn+5AU9XuamWXg1CpQNY9/9J+X4Pg/25PNTGr/R 6GDKimVzYfIBYQxb7PGVHj4JabwRa2IBkEf7/QJvTpjBGB9kjt5aRV3ti1yb18vI0MAS6lJ4wNl50 P/Fo6w51dsJIexmFtoQ0kq/EmkI69wz/jdR0+GA88VAOs2CKUoYY/6Pn5n4ZfGiq1510N1FlcXBtG qVqK0mSFavCHzcrQb525/E3zSGQhXhcqHRTvFFSILygfHrdg1H4JFUacuotgKr0U5NCUAQLCseNV3 2CnaMernVqNpOkxQ6Qgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHPgJ-00Dkuv-6J; Tue, 08 Feb 2022 12:33:15 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHPg8-00Dkqy-Qp for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 12:33:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644323584; x=1675859584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hiKaa+vjng7QGQwzXwJDmhDTUVL/l7PjxijS5yiT0vw=; b=XipQ4NNfwWOG9hthEdOOokLGIkxp2A536Zw242FK0lin1qK6b9vgRDoS aI6f9z3fv0TGhe1E8Tz31N3GxIQw9P3JppFdOM26zTSB4tvy+XHRE49WS dMuB0KAu4K8sHOFc3gUg8rPlJ2irljxos+0K59kP4JkLpQlAVaZ4spl8M SGFv723vrg52jZuYud1hzfUaLRS6qbHmprEi2w+hzfheVdJ91v62NLQpa +4lkty2XGBcMJp/NaeDxOwPpd9PH3GUjOxhf/mepSishhSTl9ISZKjkOn SN9n121KXVGfQl2EUjBhPHr/O7xw2txNMdN39i1Bem6Hv9pa6W7svcmTz w==; X-IronPort-AV: E=Sophos;i="5.88,352,1635199200"; d="scan'208";a="21960352" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 08 Feb 2022 13:32:58 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Tue, 08 Feb 2022 13:32:58 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Tue, 08 Feb 2022 13:32:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644323578; x=1675859578; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hiKaa+vjng7QGQwzXwJDmhDTUVL/l7PjxijS5yiT0vw=; b=Jv0DcV4Bm5jyPAAKO1Zv2Aveg5YfqrqeaJvcg/+fexhWEK5Lb/6DqYwv t+z3zJTxUDLMabBgtLxHIEzhuQRyzVLl22So1y/QSrmFwZS0551sMTMvT 95GiNh81EKW9s1TmgTJOgk6tgMISRcQW2CaYfFI2wwwHISbNwmLPq+jWX 7hpYDcVJmZJ4Vz8UuCIjk0JkjnFiOkKvDdSBICZfoREI4We9NETMqwni1 5diLaK3poGqfVkISMeN4By9dWSvYH5PGQSxrnOG8UgLPoj+o1el4TbOO8 cK16gXcxeTWTtwO1i7KDpBBwpEYJifSL9RzyMBC4p9O7YITN9lsu/jzVZ g==; X-IronPort-AV: E=Sophos;i="5.88,352,1635199200"; d="scan'208";a="21960350" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 08 Feb 2022 13:32:58 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 2A531280075; Tue, 8 Feb 2022 13:32:58 +0100 (CET) From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Matthias Schiffer , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/5] ARM: dts: imx6qdl: tqma6: Add i2c bus recovery Date: Tue, 8 Feb 2022 13:32:45 +0100 Message-Id: <20220208123248.821826-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208123248.821826-1-alexander.stein@ew.tq-group.com> References: <20220208123248.821826-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_043305_208415_3D805245 X-CRM114-Status: GOOD ( 13.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the pinmuxing and GPIO settings for SCL/SDA for i2c1 & i2c3. Signed-off-by: Alexander Stein --- arch/arm/boot/dts/imx6qdl-mba6b.dtsi | 5 ++++- arch/arm/boot/dts/imx6qdl-tqma6.dtsi | 14 ++++++++++++++ arch/arm/boot/dts/imx6qdl-tqma6a.dtsi | 7 ++++++- arch/arm/boot/dts/imx6qdl-tqma6b.dtsi | 7 ++++++- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-mba6b.dtsi b/arch/arm/boot/dts/imx6qdl-mba6b.dtsi index 2e3407790963..7d1cd7454c7f 100644 --- a/arch/arm/boot/dts/imx6qdl-mba6b.dtsi +++ b/arch/arm/boot/dts/imx6qdl-mba6b.dtsi @@ -13,8 +13,11 @@ &fec { &i2c1 { clock-frequency = <100000>; - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c1>; + pinctrl-1 = <&pinctrl_i2c1_recovery>; + scl-gpios = <&gpio5 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio5 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "okay"; }; diff --git a/arch/arm/boot/dts/imx6qdl-tqma6.dtsi b/arch/arm/boot/dts/imx6qdl-tqma6.dtsi index 51a3a5392c95..344ea935c7da 100644 --- a/arch/arm/boot/dts/imx6qdl-tqma6.dtsi +++ b/arch/arm/boot/dts/imx6qdl-tqma6.dtsi @@ -52,6 +52,13 @@ MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b899 >; }; + pinctrl_i2c1_recovery: i2c1recoverygrp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x4001b899 + MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27 0x4001b899 + >; + }; + pinctrl_i2c3: i2c3grp { fsl,pins = < MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b899 @@ -59,6 +66,13 @@ MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b899 >; }; + pinctrl_i2c3_recovery: i2c3recoverygrp { + fsl,pins = < + MX6QDL_PAD_GPIO_5__GPIO1_IO05 0x4001b899 + MX6QDL_PAD_GPIO_6__GPIO1_IO06 0x4001b899 + >; + }; + pinctrl_pmic: pmicgrp { fsl,pins = < MX6QDL_PAD_NANDF_RB0__GPIO6_IO10 0x1b099 /* PMIC irq */ diff --git a/arch/arm/boot/dts/imx6qdl-tqma6a.dtsi b/arch/arm/boot/dts/imx6qdl-tqma6a.dtsi index bfb67da64b96..7dc3f0005b0f 100644 --- a/arch/arm/boot/dts/imx6qdl-tqma6a.dtsi +++ b/arch/arm/boot/dts/imx6qdl-tqma6a.dtsi @@ -4,6 +4,8 @@ * Copyright 2013-2017 Markus Niebel */ +#include + &fec { interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>; @@ -11,8 +13,11 @@ &fec { }; &i2c1 { - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c1>; + pinctrl-1 = <&pinctrl_i2c1_recovery>; + scl-gpios = <&gpio5 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio5 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; clock-frequency = <100000>; status = "okay"; diff --git a/arch/arm/boot/dts/imx6qdl-tqma6b.dtsi b/arch/arm/boot/dts/imx6qdl-tqma6b.dtsi index 49c472285c06..dd0925766440 100644 --- a/arch/arm/boot/dts/imx6qdl-tqma6b.dtsi +++ b/arch/arm/boot/dts/imx6qdl-tqma6b.dtsi @@ -4,9 +4,14 @@ * Copyright 2013-2017 Markus Niebel */ +#include + &i2c3 { - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c3>; + pinctrl-1 = <&pinctrl_i2c3_recovery>; + scl-gpios = <&gpio1 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; clock-frequency = <100000>; status = "okay";