From patchwork Mon Aug 26 15:37:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 11114917 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BC6416B1 for ; Mon, 26 Aug 2019 15:39:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 313B421848 for ; Mon, 26 Aug 2019 15:39:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fhXirzUx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 313B421848 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=andred.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S+WbFyeCj0nMHjd0CR8yvEXe9YuJsL0l9d6XSVxpQaw=; b=fhXirzUxoorzSu Erv1bAb9aK4HBHusWHP7YS6rlJQJI8HDErj533UiBujJXrfvCzqvxYgUeTlAoHUXw44e6wZiWS8sN XY0KAQ6k2P14FWBP+mtzjNM877TohuJW+cFxBCFeUfAkWXcjRk7jbJmk1hPU8fmFnzHGwtt3DMPJm bdAibTKME/Fyfef8haJz0FMNtmBZHj9WXzs+7kcJCnz7L3iESNrFzlD5/Tc6W/HCzpF1TiSKx1COa z5s+91TSOxbgPp5sp8yb7QoAOtleQQa72v99pcNMlEGWVsgvtLV8pVsFz6bZmQm0Af3zJfVKGQ+Xo 7okrom53aoDqODKBPXEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i2H5V-0003EE-4K; Mon, 26 Aug 2019 15:39:21 +0000 Received: from mail-wm1-f66.google.com ([209.85.128.66]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i2H4w-0002ic-UV for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2019 15:38:48 +0000 Received: by mail-wm1-f66.google.com with SMTP id e8so293535wme.1 for ; Mon, 26 Aug 2019 08:38:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oRnNY4JLf7ZTy3fdUTm9bEVVoWS6JMbuHY/wh8kGwgE=; b=MIk4J1ktB4YCUzypHKSRLJeH6buuxxRnDxwyeVHxa8V/Mjo7v0iYbESRhPgI142dl3 q7p6TTjWdgWZ6WEZWgcj6CQOJru64cViWz9JpWTiTBUyFUZF9G3I3ZjnDs0+Or2Rtg8I Dl2JzC2vwf9rxOVho9I+EiimEalaxG55rNQhv5t59Audjyd83L5rt5xcDopAJmLeqaI4 r1k19e7WOh/vPaK0oKV9iGTE+n9eUDx0YDpmS9B81xW0CQxXnC9CAJsbh746UBqYdNL1 1bs+junYIzePwpdOEFu/NqkrczPRU/MuAAqdFn4WXKNv8kPRxA+9roChTrbX0e4JJ1MJ 7tLQ== X-Gm-Message-State: APjAAAU1FEn1CrGPEXkEXHiBqJVUknGQaqlMFB/BhXZwDnwyh8RZHIzp YAs3Lb5zU/O0z6Qmt8EDH3s= X-Google-Smtp-Source: APXvYqxyyoXPftbW6GeJwx4yF6wo2uOK6DKbLk1+l/KNCdpLBNfpM76u9knFOkAdArEhuytwOMmhtg== X-Received: by 2002:a1c:804b:: with SMTP id b72mr22413166wmd.139.1566833925797; Mon, 26 Aug 2019 08:38:45 -0700 (PDT) Received: from 1aq-andre.garage.tyco.com ([77.107.218.170]) by smtp.gmail.com with ESMTPSA id z8sm11580798wru.13.2019.08.26.08.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 08:38:45 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= To: linux-kernel@vger.kernel.org Subject: [PATCH 03/12] ARM: dts: imx7d: cl-som-imx7: fix i2c2 Date: Mon, 26 Aug 2019 16:37:51 +0100 Message-Id: <20190826153800.35400-3-git@andred.net> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190826153800.35400-1-git@andred.net> References: <20190826153800.35400-1-git@andred.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190826_083846_977221_7714CA96 X-CRM114-Status: GOOD ( 15.98 ) X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.66 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (andre.draszik[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Fabio Estevam , linux-arm-kernel@lists.infradead.org, =?utf-8?q?Andr=C3=A9_Draszik?= , Sascha Hauer , Rob Herring , Igor Grinberg , Pengutronix Kernel Team , Shawn Guo , Ilya Ledvich , NXP Linux Team Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org I2C2 is configured incorrectly at the moment: * update i2c2 to actually work (fix incorrect pinctrl assignments) * add the i2c2 bus recovery information [1] [1] Note that scl is being marked as GPIO_OPEN_DRAIN even though the i.MX pinctrl driver does not support enabling open drain directly - it is enabled by the fixed pinmux entry. So while this flag has no effect in practice, it needs to be there purely so as to fix the following warning from gpiolib: gpio-6 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file as that is the mode requested by i2c-imx.c Signed-off-by: André Draszik Cc: Ilya Ledvich Cc: Igor Grinberg Cc: Rob Herring Cc: Mark Rutland Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 26 +++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts index e0432a3aa36f..ec82f4738c4f 100644 --- a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts +++ b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts @@ -72,8 +72,11 @@ }; &i2c2 { - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c2>; + pinctrl-1 = <&pinctrl_i2c2_recovery>; + sda-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; + scl-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "okay"; pmic: pmic@8 { @@ -236,13 +239,6 @@ >; }; - pinctrl_i2c2: i2c2grp { - fsl,pins = < - MX7D_PAD_I2C2_SDA__I2C2_SDA 0x4000007f - MX7D_PAD_I2C2_SCL__I2C2_SCL 0x4000007f - >; - }; - pinctrl_uart1: uart1grp { fsl,pins = < MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79 @@ -273,4 +269,18 @@ MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4 0x34 >; }; + + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX7D_PAD_LPSR_GPIO1_IO07__I2C2_SDA 0x4000000f + MX7D_PAD_LPSR_GPIO1_IO06__I2C2_SCL 0x4000000f + >; + }; + + pinctrl_i2c2_recovery: i2c2recoverygrp { + fsl,pins = < + MX7D_PAD_LPSR_GPIO1_IO07__GPIO1_IO7 0x4000007f + MX7D_PAD_LPSR_GPIO1_IO06__GPIO1_IO6 0x4000007f + >; + }; };