From patchwork Thu Sep 24 20:54:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Alonso X-Patchwork-Id: 522584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1BA661401AD for ; Fri, 25 Sep 2015 06:56:44 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754109AbbIXU4k (ORCPT ); Thu, 24 Sep 2015 16:56:40 -0400 Received: from mail-by2on0118.outbound.protection.outlook.com ([207.46.100.118]:49993 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754096AbbIXU4h (ORCPT ); Thu, 24 Sep 2015 16:56:37 -0400 Received: from BN3PR0301CA0002.namprd03.prod.outlook.com (10.160.180.140) by CY1PR0301MB1226.namprd03.prod.outlook.com (10.161.212.148) with Microsoft SMTP Server (TLS) id 15.1.274.16; Thu, 24 Sep 2015 20:56:33 +0000 Received: from BL2FFO11FD019.protection.gbl (2a01:111:f400:7c09::161) by BN3PR0301CA0002.outlook.office365.com (2a01:111:e400:4000::12) with Microsoft SMTP Server (TLS) id 15.1.280.20 via Frontend Transport; Thu, 24 Sep 2015 20:56:33 +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 BL2FFO11FD019.mail.protection.outlook.com (10.173.161.37) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Thu, 24 Sep 2015 20:56:32 +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 t8OKu0F6030281; Thu, 24 Sep 2015 13:56:32 -0700 From: Adrian Alonso To: , , , , CC: , , , , , , , Subject: [PATCH v5 7/7] pinctrl: freescale: imx: imx7d iomuxc-lpsr devicetree bindings Date: Thu, 24 Sep 2015 15:54:03 -0500 Message-ID: <1443128043-21063-7-git-send-email-aalonso@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443128043-21063-1-git-send-email-aalonso@freescale.com> References: <1443128043-21063-1-git-send-email-aalonso@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD019; 1:Xug1gnhtRfOKGI8Cpr51U+WOjp7ROcP4kIxeB+yxGriwxytocWTCRi4H060fJDn977SU8w1/PEVpMAnpzHKw++/XCE69ckWZE4xY6m0Ouoa9aZxLK2WbqtBfthqol224V6/1CUMV47kDDIlyzMV7lBi5wky6beL5WhAAV1bERjQxrRFFad8I8zvDX8LGF2dpeayHf5QXnNj4UnCdWcNkVTIZasx6sIk3Qx9D5wpV88ASJWKYBLOeibX2cUwbnHgLTTxNmX20HeWYh2xAmuoiXDJHjPOE0tp+q9CEQaOPcNlFPsy/OrpDO5HvYVH5TF6SFj8thI6mbDY6oAzOC3dd5cM+gAdphNc6l1c9u8Qws25v6hcEzJCSJ8xp+RcQpxVdr+1g6ho5ujCBATTP/8nKjg== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(48376002)(189998001)(106466001)(50986999)(5007970100001)(19580405001)(77156002)(229853001)(50226001)(19580395003)(36756003)(105606002)(6806005)(104016004)(92566002)(33646002)(11100500001)(68736005)(86362001)(2201001)(46102003)(5001830100001)(50466002)(85426001)(64706001)(76176999)(87936001)(5001960100002)(77096005)(5001770100001)(62966003)(81156007)(4001540100001)(107886002)(5003940100001)(97736004)(47776003)(5001860100001)(2950100001)(2101003)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB1226; 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; CY1PR0301MB1226; 2:ARa10xW6hbJIkZkNxWDIBzhmvIQ+M7m8j9Eb7xZFQzPSp7LiXIMnDRPIf3soeRyVNyy4443Gsob3vlHuONkgy9/dGUkMQKl3QhGr/d85qoQQcP1qG3lRjs6DH2r50PBXoKvDBhZPbLH+gVZCeUa+dq0bO5G/AfUAhhny12Crq3E=; 3:8Y1RPtsZmVdJiB84iIg1ECoT8VcfOoDYlbY30haiIvBupID4YQdOPv0MMFh9u5Cbaaiebrd3WqhBx8biW+6JMvXybgEcN0NDlIkmmKIxX0eLTgrXxYMMBRdSAh5/l4UO7qiLn8hqsAqQyWln4lnhlIdlork9cuG6qjtM9noDCJL6sq5P2Q2gDxxqHnIvATGBMXXYqky9Q1/cjz+m8nMXOr6wqCOj4fDwVnHOJpj4JPs=; 25:dgUwXIxGCLx9hfxf3oJ/AVS7/sorRS1rs5yd7WYKDSKxCBccaaRqoIHqoHUqif08vi50eX47vMcnWVwAr3JATtJQIxhU+8RZJXGRD3MblJFfLqkBUT+VI260fFPXEcK1N+gnZzkzj0mR8TGySxbxL8OYp+Zn/4J82pP0kajQgfHIVBmKPuTLK1nWcyIxshnVbG/00gguY8DDE+YrcTybJLkqW8UJmgfiRoNQNNOXZLH0S+t1A8y8xv1hOEkfpWA/3WSriD/ojN5QnH16WgqrSQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1226; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1226; 20:sdhaAfEKbedKkZ5BbqukHxXuPHhBklYiXJ8R6ayiKWUgZQsPgXSB9KtQxAJJPq2MyjoBMU28am3XI2rWvyl3uWdxiAzByPGz/L+5nnxwMrix1lTlmBthsF+nvpOTU6BekswLQQ1ky56dMBKfkLrdfvKTgEy8VsXpEcwgf4QMi1PIHDOtcEK31KvMiZwLzoEZh0tUHX+BU8Yc1RfGUOd3A/vOxnTyS43snWn035pM63VkIEcWp2vZnAB3JNxHtLL2xtlOspc/Zer5e5OxFYS8CkQX3FFop2xE1Ojk5Y+M71KZmI+VTVkg7qYSTsr06m3crRvwG2bmCjMMh7hrlwCju+J0XWF3SzDjomEusJ84JXc=; 4:j/ry7YS/jXhMh09p/xBe7KImIBd1RjyGyO5vPP1cesao1QfvA5Q3l+mrEq8Rs4lX/PPDRqW+64Svr/nU5Np0u+ndluSxcnavaUFA/5/h60hrX5dJyW6/0l3c1xmrwv6H0oVveCXEFC+WegI5f1KIP/ovRy5PrUZD7J8L3CaqMGvQqFMNAtAQB8v8IygP8tQ917bXyKvNayeCsKa1TqpaEY6s3lY/7faO0uQ0NXXxViJgEkZVYHLfetnnZEBT7RBmHojJczKVxfHvzKmU2YZq24s7G84VYx2v5k62EAbN3XekjALnOwit4kZlWd5gvj7Rb6KAjUpWrGqdkRjtFDANAvMFn5L3EMW7tMB9JZUId6Y= 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:CY1PR0301MB1226; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1226; X-Forefront-PRVS: 070912876F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1226; 23:64JqFUljJwX4+gfrrBOQ4nM8ZBa9dueNWx0b1nx?= =?us-ascii?Q?XZCi4600KpUo3zlGVlTaEFXGV7s8r7/tsDTp5ROm28AamOqcAKYAHoNL8/xB?= =?us-ascii?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o//jlOgLhpxWLGPBf3tqbztCX/uV9udjsl?= =?us-ascii?Q?ZO1Efx8WaoVrniFs4a6RDbt71N5cMkXQ4zIV5RJywOL6+bh3WnrOmCv51j8r?= =?us-ascii?Q?Hx0huOVYDGx914j8Ov2Hilve+094A62xCJs1otGyds29luG1CkJ+/VJ7px5d?= =?us-ascii?Q?pL2eFPYGCXQeiwReQ4ykAjj9kb6K9+Hj0tbTsxR57LVzFHfFwSyM45iitGOf?= =?us-ascii?Q?Ql65DsyFH79tQ9qdalPHCdjqcFunOwL3dDB990ChDXC9H4ptIvabnP+T8mYp?= =?us-ascii?Q?KCVV6CKV6QdkMuMrTsmcSpCbH6i9FgJyqFJ/SzH7PAb842Dp1URnqyCsl5Hk?= =?us-ascii?Q?jbA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1226; 5:UTqfCROE+BNelrkwQigkvuLsuI7XKZzQ8pm8gQHZOfsZK/BVRB4CiKfjiJYb05xdcqfzKcZveqQWB9FTW0PhqdUfpHeWDEh86cHDiITj0FjfuiQNYQmsEOXozOnJqmD2QE/dNzdOtHPkkIfq4q8GTg==; 24:0E2pV118SXgLGgPgR7CkoXgSdvLke0/QUDJZHzinJ9YGbVRA32uexFgP5bl69MdfpwF7nILGHvPFgeMtH8Sj+GZCkhT5tVGA6WJyx/QV7SY=; 20:+ikzw1lJgE8rLCsZlr4SAula/asnrNsoSqdMHSYPrnPk1sHrGPD8Bmu1lg+HU50rpD91Nppub6x740Rr5F/XKQ== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2015 20:56:32.9636 (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: CY1PR0301MB1226 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 .../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 + >; + }; +};