From patchwork Thu Jul 16 20:34:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Alonso X-Patchwork-Id: 6810901 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 B8813C05AC for ; Thu, 16 Jul 2015 20:38:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5FF820739 for ; Thu, 16 Jul 2015 20:38:46 +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 C17ED20723 for ; Thu, 16 Jul 2015 20:38:45 +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 1ZFptk-0002N0-Mp; Thu, 16 Jul 2015 20:36:52 +0000 Received: from mail-bn1bon0113.outbound.protection.outlook.com ([157.56.111.113] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZFpt5-0001m7-93 for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2015 20:36:14 +0000 Received: from BY2PR03CA068.namprd03.prod.outlook.com (10.141.249.41) by CY1PR0301MB0778.namprd03.prod.outlook.com (10.160.160.139) with Microsoft SMTP Server (TLS) id 15.1.207.19; Thu, 16 Jul 2015 20:35:51 +0000 Received: from BN1BFFO11OLC001.protection.gbl (2a01:111:f400:7c10::1:136) by BY2PR03CA068.outlook.office365.com (2a01:111:e400:2c5d::41) with Microsoft SMTP Server (TLS) id 15.1.219.17 via Frontend Transport; Thu, 16 Jul 2015 20:35:51 +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; 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 BN1BFFO11OLC001.mail.protection.outlook.com (10.58.145.12) with Microsoft SMTP Server (TLS) id 15.1.213.8 via Frontend Transport; Thu, 16 Jul 2015 20:35:50 +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 t6GKZgbe012925; Thu, 16 Jul 2015 13:35:49 -0700 From: Adrian Alonso To: , , , , Subject: [PATCH 4/4][v4] ARM: imx: pinctrl-imx7d: add iomuxc-lpsr gpio group ids Date: Thu, 16 Jul 2015 15:34:47 -0500 Message-ID: <1437078887-2524-4-git-send-email-aalonso@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437078887-2524-1-git-send-email-aalonso@freescale.com> References: <1437078887-2524-1-git-send-email-aalonso@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC001; 1:VMsKgw/yNkNLmZC1WiCJh42NW4RlIwBXNQGfzTRcBn1Mda+S5D48GPCjWaMTwfUKbkx6FpjORnkqhl52j/iVecyplw/Ufgh0R5LTvukUW2tr8jrWqb1DkatLILXB/HRiT5IC8wiBypJlZh5Uz00WLImRrFXtkmgUcgZstVg5K580HLmhJx6W+obQYzpRsj8loXyCXGfPIN62qkqLn7c40WFWSOdWWYWzewjABoPKaKAaZbsuD2G7W79pV77dnpp8sCL+TcMZkAorHjf2lTQx/4wa4KEJfp1LNU+R349ETSUEKyzLKJkcUqMKVQXh8ub1rI72sF+6DzwCJdDGyfRTCIyM8TS70pGRtdusVmoN0PiiCqennlBszZsW36Jax8PMokKW7ib3mPfO6H+j9fNIA3C9c557/tBBNiqbZzbDZAoipESZp8cNXO1GeXxXlyud X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(36756003)(19580395003)(5001960100002)(19580405001)(107886002)(85426001)(46102003)(50986999)(77096005)(189998001)(5001770100001)(2950100001)(5003940100001)(76176999)(6806004)(50466002)(62966003)(48376002)(86362001)(106466001)(229853001)(2201001)(47776003)(50226001)(87936001)(92566002)(77156002)(104016003)(33646002)(4001430100001)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB0778; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0778; 2:pajduLlY2BJulWqNm5N8H3Vl+xOG2Nsm3NtX4rxMzc+0jn+6S9Y315vYn1zJJmPe; 3:gSu8+wRGZK9unLXjVyM+Z5h/XEzYVkJ0i4mslO7QKduA4DE7diZFHHn1mLfH0ogWlVsVBFHF1BAaRnHOKA0jiphRrGefu6rtGtG9btWNZ92vWDH3csA8q/0ShOwkxy1m18Ht+h9FFhcPK9sBFh+VYrrxOCJ+Ru/MENSWoVdHBVFwFGBv6gRrnV05HriAlh3TAtZNt2Z8ci4+retMsckSSXTVylKqvH5jdG1IcPsGVDU=; 25:dTJNmEgM/F7nmJaLwWfMzb2klVZtrEs3tnpFz8QINiH2WxKdClWf60yJ0RDLXMfnX1jy+/p1+YWMD9emTYmVfMTR5Tg+ShYiJ26tENbkNVmgSpZVLLCFO2JW4PdXb6bL3SSNtXMaZgnFCVIfHbpS2+SOwE4FfzjhZ3UIxPdO2So9wQ2BkAnzc0SiIRNuGYpxQeP//LL1SC0KdeR5TwNDkct9tLRyeM0jjv8icakzS+c4K3gi8CWmEh641o8byzSvHkhyc6dZFI+3+ShyMDo9TA==; 20:6GncpgKD2N6LeOVOx7ZZutwFYk/c2zpin3KfoPqXW9mK9idRn6n4YUU9K9R1XJkh0wHQYzgNQVsQsRljB4/UQ/tovEubxuBbjBGo19x990SGfn+7TV9/7VdwXKrF1icFozEZcLBLpzirtYArxpZ5JY+8al5dzRCeAVxZVGugBLsC74ZwiXKbTjQjpkcai9PPkLhELUwy7rzWWwQ4vUuS3m5BppTpm4Z1UQ5rC660rGVB9Li7xOoshlfNPT83Mgxk99DnbWCJOly76qu2BlpMv2LeyLne41vP6CNXamNirqRNDKLLC+e6wiDc9dMR8UX5xRD2UgHBKho7J1L+sV+oekZB+QlAuhMFJO7j3gVUPGs= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0778; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:CY1PR0301MB0778; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB0778; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0778; 4:75jXXlvt6snJ2qaMBhnS859u/xc11Kb71VhWpAF1SxiXHpuzR+kGpXoGQefUVVNf+KhgQsxU7xf2TK1QT5s6VrZHGNg41Dmiu1njwkflAuJzcsyEPwQItqNeNtBeT7pnIfbNoj+IZGSQEayD1PNiaFQs8m4IScAM6LjtJlnqQUCQB9iGU1ue/teHmOvhboqnjXhK//EER2cMu/SekH94g3mdQMqsb/ReKeV5lWut2uKdbKcpssQ92I2Xi55kUj5Lb+yaQirrzDIKiSGIwakVRWrwfiNDEjO+KZWofhavmSg= X-Forefront-PRVS: 0639027A9E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB0778; 23:1aAZXSP0VbTYWnY9VfngXIOAELjYL1NOD8i8NvY?= =?us-ascii?Q?fqo27UcartxDhLYpZMNbUcxUU/TWDO4r/6sEeFAE8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hHa3/bN5Dzt3TrauhhcWbtqMdkXvd1yNHF/LUt46bg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0778; 5:SXnAm4j8WPDw4XuoZ/Qyerz2PLX5UVQDNUKUYKVaeRB2UHn4AsiJ5jlxYffKkJ+AlBZC2rX5e/y8jGP7dr+7AcviHXYzb5/esAKIK28bua1HGw6qzFkIGG4bUqGVxEizTApKeyW7h5y6WpUlEJFgLw==; 24:w6NwjZC8DE/3jZUyUthMoNaawnErFpo5bggsEhNm5L+fvg2yYNyegUcwBAh4TrqUQnNgpJDxmQsybdESdJRLSNZAn6v9rESIamozevZFVe0=; 20:Wi8yt9Fyifb6fDv4epljYSMMcaWB3xXHtzV7vwStU03Lo131662iPcM8yPMwFOwerQW/XzfdmzYm621/LHxONQ== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2015 20:35:50.9188 (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-20150716_133611_658713_45DE3A8C X-CRM114-Status: GOOD ( 16.58 ) 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, 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=-5.5 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 imx7d SoC iomuxc-lpsr gpio group id's * Add IOMUXC_LPSR_SUPPORT flag for pinctrl-imx driver to support iomuxc-lpsr controller. * Add fsl,imx7d-pinctrl.txt documentation for encoded pad groupd is for iomux-lpsr GPIO1. Signed-off-by: Adrian Alonso --- - Version 4: Add devicetreee bindings fsl,imx7d-pinctrl.txt documentation for encoded pad groupd is for iomux-lpsr GPIO1. .../bindings/pinctrl/fsl,imx7d-pinctrl.txt | 26 ++++++++++++++++++++++ drivers/pinctrl/freescale/pinctrl-imx7d.c | 17 ++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt index 8bbf25d..9c48ce9 100644 --- a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt @@ -25,3 +25,29 @@ PAD_CTL_DSE_X1 (0 << 0) PAD_CTL_DSE_X2 (1 << 0) PAD_CTL_DSE_X3 (2 << 0) PAD_CTL_DSE_X4 (3 << 0) + +IOMUXC-LPSR controller: +i.MX7D supports two iomux controllers iomuxc and iomuxc-lpsr; LPSR is a power mode +where NVCC_GPIO1 power rail remains on and GPIO1 under LPSR mode can retain the +state of GPIO1 pads (GPIO1_07 to GPIO1_00). + +To support both controllers "fsl,imx7d-iomuxc" is extended to include the pad group +id's for GPIO1 and these are encoded in input_val integer so pinctrl parse groups +can be created for all imx7d_pads. + +For example pad group id for GPIO1_IO00 correspod to 155 + +drivers/pinctrl/freescale/pinctrl-imx7d.c +enum imx7d_pads { + ... + MX7D_PAD_GPIO1_IO00 = 155, + ... +}; + +In pad definition for GPIO1_IO00 the group id is encoded as 0x009B, while the lower 16 bit +correspond to input_val. + +arch/arm/boot/dts/imx7d-pinfunc.h +#define MX7D_PAD_GPIO1_IO00__GPIO1_IO0 0x0000 0x0030 0x0000 0x0 0x009B0000 +#define MX7D_PAD_GPIO1_IO00__PWM4_OUT 0x0000 0x0030 0x0000 0x1 0x009B0000 +#define MX7D_PAD_GPIO1_IO00__WDOD1_WDOG_ANY 0x0000 0x0030 0x0000 0x2 0x009B0000 diff --git a/drivers/pinctrl/freescale/pinctrl-imx7d.c b/drivers/pinctrl/freescale/pinctrl-imx7d.c index 1fa7530..cf89275 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx7d.c +++ b/drivers/pinctrl/freescale/pinctrl-imx7d.c @@ -172,6 +172,14 @@ enum imx7d_pads { MX7D_PAD_ENET1_RX_CLK = 152, MX7D_PAD_ENET1_CRS = 153, MX7D_PAD_ENET1_COL = 154, + MX7D_PAD_GPIO1_IO00 = 155, + MX7D_PAD_GPIO1_IO01 = 156, + MX7D_PAD_GPIO1_IO02 = 157, + MX7D_PAD_GPIO1_IO03 = 158, + MX7D_PAD_GPIO1_IO04 = 159, + MX7D_PAD_GPIO1_IO05 = 160, + MX7D_PAD_GPIO1_IO06 = 161, + MX7D_PAD_GPIO1_IO07 = 162, }; /* Pad names for the pinmux subsystem */ @@ -331,11 +339,20 @@ static const struct pinctrl_pin_desc imx7d_pinctrl_pads[] = { IMX_PINCTRL_PIN(MX7D_PAD_ENET1_RX_CLK), IMX_PINCTRL_PIN(MX7D_PAD_ENET1_CRS), IMX_PINCTRL_PIN(MX7D_PAD_ENET1_COL), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO00), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO01), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO02), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO03), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO04), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO05), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO06), + IMX_PINCTRL_PIN(MX7D_PAD_GPIO1_IO07), }; static struct imx_pinctrl_soc_info imx7d_pinctrl_info = { .pins = imx7d_pinctrl_pads, .npins = ARRAY_SIZE(imx7d_pinctrl_pads), + .flags = IOMUXC_LPSR_SUPPORT, }; static struct of_device_id imx7d_pinctrl_of_match[] = {