From patchwork Wed Sep 30 16:11:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Alonso X-Patchwork-Id: 7300361 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 30BD4BEEA4 for ; Wed, 30 Sep 2015 16:22:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DAA920643 for ; Wed, 30 Sep 2015 16:22:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23851205FA for ; Wed, 30 Sep 2015 16:22:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZhK7X-0007Cm-OF; Wed, 30 Sep 2015 16:20:43 +0000 Received: from mail-bn1bon0135.outbound.protection.outlook.com ([157.56.111.135] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZhK0t-0004ta-Sh for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2015 16:14:05 +0000 Received: from DM2PR03CA0048.namprd03.prod.outlook.com (10.141.96.47) by CY1PR0301MB0778.namprd03.prod.outlook.com (10.160.160.139) with Microsoft SMTP Server (TLS) id 15.1.268.17; Wed, 30 Sep 2015 16:13:30 +0000 Received: from BY2FFO11FD004.protection.gbl (2a01:111:f400:7c0c::127) by DM2PR03CA0048.outlook.office365.com (2a01:111:e400:2428::47) with Microsoft SMTP Server (TLS) id 15.1.280.20 via Frontend Transport; Wed, 30 Sep 2015 16:13:30 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD004.mail.protection.outlook.com (10.1.14.158) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Wed, 30 Sep 2015 16:13:25 +0000 Received: from bluefly.am.freescale.net (bluefly.am.freescale.net [10.81.17.130]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t8UGD6CQ005572; Wed, 30 Sep 2015 09:13:24 -0700 From: Adrian Alonso To: , , , , Subject: [PATCH v8 7/7] pinctrl: freescale: imx: imx7d iomuxc-lpsr devicetree bindings Date: Wed, 30 Sep 2015 11:11:09 -0500 Message-ID: <1443629469-12294-7-git-send-email-aalonso@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443629469-12294-1-git-send-email-aalonso@freescale.com> References: <1443629469-12294-1-git-send-email-aalonso@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD004; 1:3lIbsXRxRMDAFwybYl98uWu5P8zUKGApcfSuRXKvDlI0MRXEzm9eTuD5EPdHPyVbkls9fWRuSLNoGxxhXU2vs9ERzeM+2uIQUuDkrQZeJP66WjVTFHSSf4sFePxjd/vT8aGQ7KpOfJxSOOx6CVsRu3o/KjR5WrhTjILjgBnMRuAw0FtMC77tbO/CNdOGJncOio1R6iHSjj82xeDxoneY8u1U0Q4UcGpvse1ecn9ebS91/sbIHeg/5IOLZrkEF4lJIIEgudawuu7S5AYExXgRGPWJoPRph3Ox4eAu+BnxphUXzu41PR0g9/M6lajLnC/Ot1Z3+TZNvhgh1iCBDh7FYq+5EGrspfTDqg3fjmWzbLPYxuGS0NF0HfgRmtJVBsUgqQWO3yo3FzROwxwdYbhDBQ== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(64706001)(5003940100001)(6806005)(86362001)(2201001)(48376002)(77096005)(47776003)(5001830100001)(104016004)(50466002)(5008740100001)(107886002)(5001770100001)(46102003)(5001860100001)(189998001)(11100500001)(2950100001)(68736005)(33646002)(62966003)(92566002)(77156002)(76176999)(81156007)(19580395003)(5001960100002)(85426001)(50986999)(106466001)(97736004)(87936001)(4001540100001)(105606002)(19580405001)(229853001)(5007970100001)(36756003)(50226001)(4001430100001)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB0778; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0778; 2:XkunSgHtFDlNEx76nDTki3FGXxPRapXPleOtpUfGf5dahaKIgSHH3ZwSWQCSGewbLifZptT0VuGNnKzdvggSVQZif4wDTGdLGPu83zZa/py+ODv2ERu3sHS6XecKoxjX5NS6IEE5vPMQERixIfKCtBqzZlUGFKnKCWfReTKBsYk=; 3:C5eoLrY+g7BgMQzcyXKZ0yqgML5utFbEgTh5hfKbaybiuy7XYLg9WdOMgyQs4AV6d8K5TNbvsPJ/QCIWyuq02ptb/Q9iLhc7xz+y61bt9fd8IL97EgqSLHLLcISskjJRkhGlbOrp6mVF84mtTxUlvQCW6yTNOpK5Vsmipq9jidKIdoOZklpF+KpQAXThzI/ZVD/kDVOlEfN5k5UKDsrR0flPhDfbQ7wtWnv+FWv8pkQ=; 25:lYerQSYhURkEvLCbE7OI2OzH1DLaij240kNCSYj+ltNCfQpxssR1vFmGl+Lcc2kgYEQ5REetsaoQpeQ0ZReBbGDrlmYcEKaiejBkl/TPQmjozJtcwFRlIqHTXDt7r0KfcMHiB4TioEz0n5VS+EV6jc2Cd8L+QYa8haLEbssUI3KTD9eYvkSubMh/thvFYelQL4l0Y2uM7fd3GtnbmAakVKaFUTdIkNQWfN1a1ZnM1uY3iiun7JUXJiP/Q4HIhiFNCW78yrByZC5xEkDJRS9ZNA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0778; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0778; 20:77b7ymTyiCm2Sj+zApxz9VQ7WojAz7sBaG3wRgHtol6Wjjh+X4smzOw8LUI5ZgNgCsPOPlc+mUXsTVO8Hy2hElC1jcNy+QCDbS92JlFYwOg+6PbHg143joPYXDSZOWjy1QiC8PXNn1IXaXTvkh03vUdjXyYkraQxsyB/VcobS85AUXGJs436ZYPSCdnYEK8RFvtUXQn1Qn6Mo0Kbyay681/puBmcXi5/aSHSRzYcZad9ubvlEawdzlj7VdAJLmYcxaUIg+ePf3DMAg5syW52u2KfdQbCFArfH163iNdL5iiVVEykEEpcfaggvtGcvrbTN8yTZh1RoxLEQof8NzFOsr2hwC339/zcNqX/Z8bG2JY=; 4:+g+SczES/lPYr1NO4e2IDKk2QGA40l5sRz/4VxXHFL6q0yqKlIuoX9I3H4rH2bmo6UCIGC+RZRKQ8b32Zsxt0zLDj81D2AsF0DMl23KWIJzRDvgj6Z19mi1hcoGgcqLIRgaLGHYPk5HN+xwSnvZRZkr2lUAtoai2fpztB99oHTTi4GGnaJRihA/XDEziisuJxtvJdnoBHyDZS9nVVLmC8tUMv8KJqSmEGotrmjss3YAtljr+WrJuvHe5GJfKZ5+gUnoRYgBJLLtrZPkugya9aVssZafvoWrfdYjdjBcOJ/A1jFr+i/UkyDyx8O2jgXVFwOUha8YP2qkBy02/Yctp5Ouo+pbqlG3f4JAi4ygM6IU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(520078)(3002001); SRVR:CY1PR0301MB0778; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB0778; X-Forefront-PRVS: 071518EF63 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB0778; 23:Xstgyf309fUwwmxyYZ43xzlq3bnFL4hT1fcoNWb?= =?us-ascii?Q?hsnptWGJVRIYqnmOiMdkpMc+wo7fFsI6q+kGN6zH6JfFCxr9eRROYvzd5ies?= =?us-ascii?Q?hwbt8bedtdgjwVrhtRIg/qMQUetJM0nNwzjHyylZE/sGIhC+GLYOQO1wA0py?= =?us-ascii?Q?ZUcjqFeTa3pY0Hm9u+bEYk+aIbKBirR2k0y0ESWLWkW9DZQrmSP0cjMylVW7?= =?us-ascii?Q?go9fdexozOXip9k91I3ql3ANSUP9fE2u8mtAkMVRDeE4b3UMI971+Hxo44+K?= =?us-ascii?Q?Ze0URPCeuWEdPIWjFR8zboG16poAHVSINBVir33pYmeAU1zVwl+qkM76I8C0?= =?us-ascii?Q?QZs0JZh3dXAOn4Dhx+ty/Hlg0p+90j/yDT0bEGDlUeyzdlFLTeH/KSRucU93?= =?us-ascii?Q?84ehioGz3AahGbTQSqtN2bbAfSCNSulLlQdPdMnrNkkKiWskocYrPQ0BXDpl?= =?us-ascii?Q?72a+4/zafkuVnl+DVifRy8/AoAcvJDmPW29aisW31/PLWsDFuKwrt5m06rCC?= =?us-ascii?Q?bD6/HpSC8h/1GBemvtrxSwZC3trJeWp6DJ/WG3I5jBTDRMvJH33kYDxK0Cjb?= =?us-ascii?Q?RvGzT5encjbq7Sx//LHj4a82b7p/0PuEnvC1E9Na07qAsDzJE2aKG85Blu1E?= =?us-ascii?Q?BMGlo3ikYBVLn8/pmYFVU7Stxwrcnu8UkNXejOmYkGf/hCA6byHISlsimDj1?= =?us-ascii?Q?veKSwJnr/j3J2BgP7vSV2BFAic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R41Q78bw1Drmc9QTv7qiNHrseDWVKlHt/HcgjvvoBWA9F08J1Tz50Xn4RT76KqiZbCg== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2015 16:13:25.9348 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0778 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150930_091353_005330_6BAD45B1 X-CRM114-Status: GOOD ( 19.90 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aisheng.Dong@freescale.com, devicetree@vger.kernel.org, Frank.Li@freescale.com, nitin.garg@freescale.com, Anson.Huang@freescale.com, linux-gpio@vger.kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, yibin.gong@freescale.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add iomuxc-lpsr devicetree bindings documentation Provide documentation context as well an example on pheriperals that could use pad from either iomuxc controller supported by iMX7D SoC Signed-off-by: Adrian Alonso --- Changes for V2: New patch on imx7d iomuxc-lpsr patch series Changes for V3: Add shared input select register notes Changes for V4: Resend Changes for V5: - Fix spell error - Remove references of SHARE_INPUT_SELECT_REG flag Changes for V6: Resend Changes for V7: Resend Changes for V8: Correct SDA pad example .../bindings/pinctrl/fsl,imx7d-pinctrl.txt | 63 +++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt index 8bbf25d..457b2c6 100644 --- a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt @@ -1,16 +1,42 @@ * Freescale i.MX7 Dual IOMUX Controller +iMX7D supports two iomuxc controllers, fsl,imx7d-iomuxc controller is similar +as previous iMX SoC generation and fsl,imx7d-iomuxc-lpsr which provides low +power state retention capabilities on gpios that are part of iomuxc-lpsr +(GPIO1_IO7..GPIO1_IO0). While iomuxc-lpsr provides its own set of registers for +mux and pad control settings, it shares the input select register from main +iomuxc controller for daisy chain settings, the fsl,input-sel property extends +fsl,imx-pinctrl driver to support iomuxc-lpsr controller. + +iomuxc_lpsr: iomuxc-lpsr@302c0000 { + compatible = "fsl,imx7d-iomuxc-lpsr"; + reg = <0x302c0000 0x10000>; + fsl,input-sel = <&iomuxc>; +}; + +iomuxc: iomuxc@30330000 { + compatible = "fsl,imx7d-iomuxc"; + reg = <0x30330000 0x10000>; +}; + +Pheriparials using pads from iomuxc-lpsr support low state retention power +state, under LPSR mode GPIO's state of pads are retain. + Please refer to fsl,imx-pinctrl.txt in this directory for common binding part and usage. Required properties: -- compatible: "fsl,imx7d-iomuxc" +- compatible: "fsl,imx7d-iomuxc" for main IOMUXC controller, or + "fsl,imx7d-iomuxc-lpsr" for Low Power State Retention IOMUXC controller. - fsl,pins: each entry consists of 6 integers and represents the mux and config setting for one pin. The first 5 integers are specified using a PIN_FUNC_ID macro, which can be found in imx7d-pinfunc.h under device tree source folder. The last integer CONFIG is the pad setting value like pull-up on this pin. Please refer to i.MX7 Dual Reference Manual for detailed CONFIG settings. +- fsl,input-sel: required property for iomuxc-lpsr controller, this property is + a phandle for main iomuxc controller which shares the input select register for + daisy chain settings. CONFIG bits definition: PAD_CTL_PUS_100K_DOWN (0 << 5) @@ -25,3 +51,38 @@ PAD_CTL_DSE_X1 (0 << 0) PAD_CTL_DSE_X2 (1 << 0) PAD_CTL_DSE_X3 (2 << 0) PAD_CTL_DSE_X4 (3 << 0) + +Examples: +While iomuxc-lpsr is intended to be used by dedicated peripherals to take +advantages of LPSR power mode, is also possible that an IP to use pads from +any of the iomux controllers. For example the I2C1 IP can use SCL pad from +iomuxc-lpsr controller and SDA pad from iomuxc controller as: + +i2c1: i2c@30a20000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1_1 &pinctrl_i2c1_2>; + status = "okay"; +}; + +iomuxc-lpsr@302c0000 { + compatible = "fsl,imx7d-iomuxc-lpsr"; + reg = <0x302c0000 0x10000>; + fsl,input-sel = <&iomuxc>; + + pinctrl_i2c1_1: i2c1grp-1 { + fsl,pins = < + MX7D_PAD_GPIO1_IO04__I2C1_SCL 0x4000007f + >; + }; +}; + +iomuxc@30330000 { + compatible = "fsl,imx7d-iomuxc"; + reg = <0x30330000 0x10000>; + + pinctrl_i2c1_2: i2c1grp-2 { + fsl,pins = < + MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f + >; + }; +};