From patchwork Fri Sep 25 21:06:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Alonso X-Patchwork-Id: 7268051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D7EF49F32B for ; Fri, 25 Sep 2015 21:10:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D81F720961 for ; Fri, 25 Sep 2015 21:10:31 +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 E3E6E208D2 for ; Fri, 25 Sep 2015 21:10:30 +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 1ZfaEd-0001JV-O1; Fri, 25 Sep 2015 21:08:51 +0000 Received: from mail-bn1bon0141.outbound.protection.outlook.com ([157.56.111.141] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZfaEA-000157-Dj for linux-arm-kernel@lists.infradead.org; Fri, 25 Sep 2015 21:08:24 +0000 Received: from DM2PR0301MB1229.namprd03.prod.outlook.com (10.160.219.18) by DM2PR0301MB0653.namprd03.prod.outlook.com (10.160.96.15) with Microsoft SMTP Server (TLS) id 15.1.280.20; Fri, 25 Sep 2015 21:08:04 +0000 Received: from BY2PR03CA002.namprd03.prod.outlook.com (10.255.93.19) by DM2PR0301MB1229.namprd03.prod.outlook.com (10.160.219.18) with Microsoft SMTP Server (TLS) id 15.1.268.17; Fri, 25 Sep 2015 21:08:02 +0000 Received: from BN1AFFO11FD038.protection.gbl (10.255.93.4) by BY2PR03CA002.outlook.office365.com (10.255.93.19) with Microsoft SMTP Server (TLS) id 15.1.274.16 via Frontend Transport; Fri, 25 Sep 2015 21:08:01 +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 BN1AFFO11FD038.mail.protection.outlook.com (10.58.52.242) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Fri, 25 Sep 2015 21:08:01 +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 t8PL7njh028753; Fri, 25 Sep 2015 14:08:00 -0700 From: Adrian Alonso To: , , , , Subject: [PATCH v6 6/6] pinctrl: freescale: imx: imx7d iomuxc-lpsr devicetree bindings Date: Fri, 25 Sep 2015 16:06:02 -0500 Message-ID: <1443215162-13716-6-git-send-email-aalonso@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443215162-13716-1-git-send-email-aalonso@freescale.com> References: <1443215162-13716-1-git-send-email-aalonso@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD038; 1:CvGz5BbFKD40oIr4UM7+wAxD31y+Lw3qnzn4eWa+gFPEIBUYc3Ge4LavVR+Abjo4zsRprrsOs12KbRIQihvks9cGBbISKhnQjfl/L21nlaqQfo6LuFr3SbO+p5dB1ZfLE0Iv4F6KlNmEkouE+xrfjf1Fw/tNW1zQEBzo3gRLF6KcrNodp+fJ4Y8Fp9yGpoRZM1z7PzqmAuMD13t30P/usQqleL9JZUdwAw0/EzkbwU8C6sL8jes3Eutfa6NR6ju/1lxugHW9jXIojni/HoNf0m+udlSJysqT0CRvm7g4rheJ9Wf/OEM8aJ/CKnN0Vq6Wcc7zoekU0GABnycWroZTc7pL9dCJ/JlTLwP3eMbXk5RdEiXnUy257H0VjLYZUBvRU/YycaTZo3mUUhj8Vw9rgA== 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)(106466001)(2950100001)(77156002)(107886002)(47776003)(81156007)(104016004)(6806005)(4001540100001)(64706001)(5001770100001)(5001830100001)(189998001)(97736004)(36756003)(5001860100001)(5001960100002)(50226001)(62966003)(50986999)(105606002)(92566002)(5007970100001)(2201001)(68736005)(19580395003)(229853001)(19580405001)(46102003)(33646002)(76176999)(77096005)(87936001)(5003940100001)(50466002)(86362001)(48376002)(11100500001)(85426001)(2101003)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB1229; 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; DM2PR0301MB1229; 2:iDkNOtGrX27gz7X6PMZ+7L1N2YnoazmNcTAFq/TRRmRmNdW3FAVKBHjmTB4IjnnRSTnCGglfOP3fyf/un4Psl9ni502T3hSbrg0reBws4y/5NAFoDaBI75GUekdJHJ3HTb5bT19iarkLBnUN8fzGrcsAEVtjL5KRCExBm1K68wE=; 3:mWfvCak2FittrO2gvxZUQpsn6HTYA47X/8OQV1Lhupa51B0wpFu9fTomA9N8suWAtknAfMz6y5Duvh0uJuQa6DOi5Pg8U6AkQJRzD8ZoJgb29kEaTGUNMrgIwRqpwz02cliuLOwLfnvW+aFP/rzZY+iK9QKlE2Oy2YailZqB6pyvQKeZBNYdUdHHBHU4Q/IpvvEEbRvy+VUY7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JFn+pMt3xT23IkCclJ7rLsWF+2SrmKK+zuNujdyzMTvtBaTYQkoz0gkthjZVxxX9TAjaLFx1qk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001); SRVR:DM2PR0301MB1229; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0301MB1229; X-Forefront-PRVS: 07106EF9B9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB1229; 23:TKm+W9s5qjVBKtSfSJrqlKuX75YZBnR5KkANROA?= =?us-ascii?Q?CzIXXHBpQzRT84w3Gbxrh7Wx8ly/QxGE5RSqgZ31GP4zm0iU2RMFkdTC6apn?= =?us-ascii?Q?k3+7W2f8T0sRrDj9kvb0Rrc0KmUNl4UCZoceUiios/+uVn0qwAP9yZ2NF2DV?= =?us-ascii?Q?45a53gGuyfbT9LxaTiPkzUcLqA9VHLOan9NWZaX59+4S/pjB+JIcbvD5JD7Y?= =?us-ascii?Q?iWEROUoscMI/9mjHvNKvWyyAd+mNJClX58ZF6obqYw4ZyLlaZEx8YzW8IL1D?= =?us-ascii?Q?2nCD4d65/DtOsKjrM5XItMZdZxUlBNv0fMOgga9UGnuUXqTm2PAB4ziY3Dk0?= =?us-ascii?Q?TVshRdNDpITi46MHo/j/Y2OO/MM+9ne8DI814OVe5BM8BCILIG1orTsgObRB?= =?us-ascii?Q?YoBoKLp0r38d2PnAuvSl28ogRtRkX82jM45XJt+tyj9kkPAX6JczviuZg0q1?= =?us-ascii?Q?4lhXfYh4/gf/D2rE55XJLy11k7vKlbQ6RVTwvH3F0Qx/RMLhDEMJwrTGd6/O?= =?us-ascii?Q?oROE/gb4dgH2mmwJqvanHPBwxjy+OJx0YKsBkhqPW1FWz5O6wcMs/TODwiKo?= =?us-ascii?Q?whT9rbl+NOfXIkrn/sr1qtfVP3LyZPxL5BlcOk2j7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PAEuyYWMgr9vB8jxoUcw19UEvnXVLB0qeNmVzVKP2hVtqO8NXWPXxKLYWeOqrWtE03OzzsR/B3ewdJVw=; 20:mZogLAP4MuM3CS58rf3qrDT3KIJT2vbyo4np+UnMquwL8vFfe4tk9guiltkmXSF+ki5HKyvMaTb2iPjAZTkc2w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2015 21:08:01.3209 (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: DM2PR0301MB1229 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0653; 2:r0dhBHIFmceHugDXWUQeqLdrUKaP86OqoM9/uqN8qkkPC/9/sYpxqFFDTvlUxySNi5UdY2K390EPzVv3dgQHavo7dSFB0sXF74KzhZ7TVi945v0rI3ePyyUTqcEIuZ8NNy1UvaWpgAoKlfqb4UdWBlTMi8e4/dC8mbjDxuVfaic=; 23:G3fkBuL/xZr5a9IDhGVarbIMO6kTe5/4mtvcIxhqpsYnLFxP0myrLqKrJtz17mAJ+a9Wxmzjp0Kleqr2bXQMUqpcL8J9faLD+PRX+CBdSS9flTLqtHyFv5TQl3+A8EX73NVvr+aC+3w7tlsmUfCRHvJlsvzPoaFr158M4R1L+gl8q1q1EfSzE4MFiMlIIfp3 X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150925_140822_754282_ECBCF404 X-CRM114-Status: GOOD ( 18.82 ) 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: 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, 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 .../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..aae069f 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_SCL__I2C1_SCL 0x4000007f + >; + }; +};