From patchwork Thu Jul 16 20:34:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Alonso X-Patchwork-Id: 6810911 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 0FABFC05AC for ; Thu, 16 Jul 2015 20:39:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB1A320726 for ; Thu, 16 Jul 2015 20:39:07 +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 B7A63206FB for ; Thu, 16 Jul 2015 20:39:06 +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 1ZFpu1-0002ar-Qr; Thu, 16 Jul 2015 20:37:09 +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-0001kW-7V for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2015 20:36:15 +0000 Received: from BLUPR0301CA0026.namprd03.prod.outlook.com (10.162.113.164) by BLUPR0301MB1636.namprd03.prod.outlook.com (10.162.214.142) with Microsoft SMTP Server (TLS) id 15.1.213.14; Thu, 16 Jul 2015 20:35:49 +0000 Received: from BY2FFO11OLC010.protection.gbl (2a01:111:f400:7c0c::137) by BLUPR0301CA0026.outlook.office365.com (2a01:111:e400:5259::36) with Microsoft SMTP Server (TLS) id 15.1.219.17 via Frontend Transport; Thu, 16 Jul 2015 20:35:49 +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 BY2FFO11OLC010.mail.protection.outlook.com (10.1.15.21) with Microsoft SMTP Server (TLS) id 15.1.213.8 via Frontend Transport; Thu, 16 Jul 2015 20:35:48 +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 t6GKZgbd012925; Thu, 16 Jul 2015 13:35:48 -0700 From: Adrian Alonso To: , , , , Subject: [PATCH 3/4][v4] ARM: imx: pinctrl-imx: imx7d: add support for iomuxc lpsr Date: Thu, 16 Jul 2015 15:34:46 -0500 Message-ID: <1437078887-2524-3-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; BY2FFO11OLC010; 1:ovbMKnj8ZXZiXTiporRawvkEVqb2w3qPel1k5tRygcQFSIHMqnGF2keOmpYcETDMj0GGc7/F/m0FMWPJrzxYI/29Ep4MylXImvvvuaO+bQ5fWFvqC3yPX3L3rK6lpPkEX+T7NKGCMTb1Hxdd7KYQwjKQGd4ATCNBUf7Ayj6a+iLXnfQZGuKR+Sk8kOHmb0kDvC8jmdrJwZzFjY9nXd536zwo0jl4Kr3i1TmJkUj8NF9+xJp3MTHY+2/gMBeGKd05mwiuuBVNI2pcQSvfP4UZ/f5pBU7nFzTSjXnbSKe30DUvigY6CkuNmqSXQG2wiaISO6Jr77SbuJqhge3n6PxolCY8XirykVq1IMQ0NAOI4oG3RBFB8Iowg2BAg9aDhvvm/sSrG0/jSjDo428+DSud6XcsT5Bmd7gjkbnWLwtxOO6mrUWHtjmGnjbsLVhU5A1Z X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(76176999)(50986999)(77096005)(104016003)(33646002)(46102003)(2950100001)(106466001)(87936001)(2201001)(229853001)(575784001)(107886002)(86362001)(189998001)(62966003)(77156002)(47776003)(85426001)(19580395003)(6806004)(50226001)(19580405001)(5001960100002)(5001770100001)(92566002)(5003940100001)(36756003)(50466002)(48376002)(4001430100001)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR0301MB1636; 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; BLUPR0301MB1636; 2:NRHKwS3fzVaV11FqM3vBmubtM0E1wemAOfANPf6OYLutBxwp3IHgGrD0oAevXMGl; 3:WzHioJrqSyAYd8xx38zKtf6zs0DGihVH+uelD2QM+fpHjXRcLe0XxZLks60MbgZAfxTneURYF78HVZZj+AWasU9TK+hknDxcSr+IdQ8TXi1RxCb0a9Dp7+5EmHj0i8c4wgUv5v5jjF2u0N0bYMSsSMOCIMetTXqZXPAhPu/oNHkAbMf8vIMank++Wsqguewhc5pml0ARR69Sa8xg7z0OwNjvzl+TZwyywgzlFb+p40Y=; 25:K4N6fJKX1IjUF43xjZj8/L+dVks2mL1oocmxzLlMAOPWje3wtl3vmNzrwasfe3fjg6ZlvoQmM6K74hmzCkIHU2KNCESWQBg4Xcfcc+a8lH17Vtd4+JTamLDnNDnH4gCYUUHPdfbOwyxVfax8bgxYGsIqIRQ2+Zp4Wx+yO4OZhN5sNIOr5dMTvVLOmuA/C1kWRHyBybGQZ0WZ4R8FihwH4Lt4hAJ0dca21vbi/GHQNx0bO+2bRwgJ7roKozqWf18+2chzXv7k3yIM9NzLAdGZoA==; 20:Jo/JwkLSNv28HjCrrFs1MxJU70+2LdzsHEJdIicBs5nWBx9+bgMZxdz1x8cIahtSY93VaFzutO/OWlW8zBZa/8I+IoUq1Ykb1nEm80ciPcI6SNNl7UENtVWtvFEnul+TtukdnZhZgMm8sBpqRbm06G853sOYT8oCS5kfThVTOV4I/O+U0B2a29f+mvEDkDKOBPZ8387yadSSA9/AdHDylGMMdo0uKibAhnbBIYSocla1sU9Tiiw7MNu5dkNTUQwdn0F1Tkp46/QhRTcJk06uujBrAImqTsNgR14RyR2T8+CaehPgZqx5SHhDfa7dCOopfsRwQM56vbX3dLyuAH74rejuVTPqIWH8/k+i02iLmvM= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB1636; BLUPR0301MB1636: X-MS-Exchange-Organization-RulesExecuted 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:BLUPR0301MB1636; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1636; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1636; 4:3c6R9htI5w9OR+gqNEnq3cWR3yk2Pjn7u0lF8Vg/D8nYvU9fmJSPkyXuHQ501IygzMYVabIppogLEAfDf7ajhZHjMe/eBWfwBxdNo+pKJ2ipFWIPMu+VTnRAMwkWTX2XM3DEFszuflVhvJ88Ypxrqn7jEpMt6E5YvMV108DgYIfqb4sERwJFt5/QB2Mvyi/pMpb5D/qnXflxFHwchm5NQsZAAqeIYnAIjuKSHatoiDhGw7C5g9LJaZGGND1jk659UbT8XBBH07s90TPby1RsiTD5epmyT02ujdLtqSUFjZQ= X-Forefront-PRVS: 0639027A9E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB1636; 23:JTzvDIu4gklUlwXYBh7mRVNjesbvzCQEAVFFD1d?= =?us-ascii?Q?Pi3UwSdz5b6UaACID2zSt3wFny+4uZoZPtpWnUucfXm/m9n4S9SjxiqwoZr2?= =?us-ascii?Q?ygrlMU/kTlGjXXAMkq3Pg2sOUB3aRxXZy0gTYIUvKu4h9Zqy21JIZC5eDxa3?= =?us-ascii?Q?w6qGnIvH3W2CSocYPoxAj4sIvrklB6E/UBkDahlyQN9pRXiXxkwkiYNwZlFX?= =?us-ascii?Q?ozmiyAA9DzRzjiMmQSaMXRHFKMMwABJGLdhGbp4/hS0Jj1eU0Ljx9Syx1t+x?= =?us-ascii?Q?qVhziOfy2r/6YWtI+qgh4Lp4iI6ZXg8FTEDeCzgdWf02JUkD2rqKNzl8Dcrf?= =?us-ascii?Q?0TyynZPM/FuRsPzkU6zhc8HvuPgjflrJbx7oYWzrYS6ep+5VhrQjnR0BR9Ee?= =?us-ascii?Q?8259P9I10lzzkhx1HFL1y0+wwZuDTjfnBMDUshxJxcs7rpOpT5BcxUtsHGfu?= =?us-ascii?Q?FTQJMEeLL0OQeM5Z2YFJhFz/knaKILwql/K0rrAxxhyLfYkJ9e6K/Vx3wKKP?= =?us-ascii?Q?oWbL5bZOESeQjN237AXk1adeDHk2g0b2+/ToKLmcOUI8B+ufYUyTUS2Giyu/?= =?us-ascii?Q?Ivk91QYXZUcpD4581NpU7NMZ/Jxmfcd4qs3bWqnjockylwnl4SYu8TL4S7mO?= =?us-ascii?Q?Vj7BCvs3f72JJjpsihH1ghdr8NKWNnWyRWyahfBjqYa6+gaO10hh1iT9O0M5?= =?us-ascii?Q?Sm0iYBBKOEuiAU9PhfLujdb4+SLdEqpydsKSe0/VBbhg6tx4QedgzthZrQps?= =?us-ascii?Q?/ZmCHoy1/C1e/xFLm7iXpOcdDeMVuQjoY+HQGi9hwgktXdYUnwkIEmnq+Pwa?= =?us-ascii?Q?a+ZiBp2w5FQYUowaM8b+6wYs8ckgVDprI2BJ1E2LoThmMrAcobJAuokyKfsJ?= =?us-ascii?Q?zYGeb1VEMUBTdaqqMz5J3tBiP+61Dfs8EfdxUXhWdAC8lVA2EsB0GwSsbr10?= =?us-ascii?Q?6ukoge9lg578JnDaVtVQ7G8z7ojrXxWc5WdzDSwzsYJPccZzjFFsqAZp2UVz?= =?us-ascii?Q?n0+Q=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1636; 5:lxaUy2pEOceom2eH6fK7XeGqu1DXzbqkSBdMwGxK93ivx0elBrcJhdDr+e2Pb0BaF9l25ehN8PJKFJCp5vCO1/cz+bZKrG38t8Z7KC1C9RoeHHFZsTKEi4btHzDaI00LsYCn4IDsy6am47QZPNBA1Q==; 24:+iHy/MXoZdpeyXTYUEk00YrYNmxvWI7nQNbEhJqZRYiYJSSBXyBF1qwXZd5scPQtZUm8cSAGRzzw+/Qc9LiUa+0zs4xqWAVdbeU1HZMiGos=; 20:hQLF3rAA4/jku628roHAA1Yx3dyrVz+3PVq7bLH3wu5YB2kCeoEZKNf6+Kqg9ievHicVxIX2M/zsAbw24WNXFw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2015 20:35:48.8461 (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: BLUPR0301MB1636 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150716_133611_536788_2E154836 X-CRM114-Status: GOOD ( 23.36 ) 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 * Extend pinctrl-imx driver to support iomux lpsr conntroller, * iMX7D has two iomuxc controllers, iomuxc controller similar as previous iMX SoC generation and iomuxc-lpsr which provides low power state rentetion capabilities on gpios that are part of iomuxc-lpsr (GPIO1_IO7..GPIO1_IO0). * Use IOMUXC_LPSR_SUPPORT and iput_val most significant bits to properly configure iomuxc/iomuxc-lpsr settings. Signed-off-by: Adrian Alonso --- * Change from v1 to v2: - Add suggested comment for input select register shared between iomuxc-lpsr and normal iomuxc controller. - Use IOMUXC_LPSR_MASK to extract pad group id and aling pin_id to 16 bit representation. * Change from v2 to v3 - Use devm_ioremap_resource instead of of_iomap to get iomuxc-lpsr base register address. * Version 4: Resend drivers/pinctrl/freescale/pinctrl-imx.c | 72 ++++++++++++++++++++++----------- drivers/pinctrl/freescale/pinctrl-imx.h | 7 +++- 2 files changed, 55 insertions(+), 24 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index d7b98ba..aef4ca3 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -1,7 +1,7 @@ /* * Core driver for the imx pin controller * - * Copyright (C) 2012 Freescale Semiconductor, Inc. + * Copyright (C) 2012-2015 Freescale Semiconductor, Inc. * Copyright (C) 2012 Linaro Ltd. * * Author: Dong Aisheng @@ -38,7 +38,6 @@ struct imx_pinctrl { struct device *dev; struct pinctrl_dev *pctl; - void __iomem *base; const struct imx_pinctrl_soc_info *info; }; @@ -212,12 +211,12 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, if (info->flags & SHARE_MUX_CONF_REG) { u32 reg; - reg = readl(ipctl->base + pin_reg->mux_reg); + reg = readl(pin_reg->base + pin_reg->mux_reg); reg &= ~(0x7 << 20); reg |= (pin->mux_mode << 20); - writel(reg, ipctl->base + pin_reg->mux_reg); + writel(reg, pin_reg->base + pin_reg->mux_reg); } else { - writel(pin->mux_mode, ipctl->base + pin_reg->mux_reg); + writel(pin->mux_mode, pin_reg->base + pin_reg->mux_reg); } dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n", pin_reg->mux_reg, pin->mux_mode); @@ -245,16 +244,22 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, * The input_reg[i] here is actually some IOMUXC general * purpose register, not regular select input register. */ - val = readl(ipctl->base + pin->input_reg); + val = readl(pin_reg->base + pin->input_reg); val &= ~mask; val |= select << shift; - writel(val, ipctl->base + pin->input_reg); + writel(val, pin_reg->base + pin->input_reg); } else if (pin->input_reg) { /* * Regular select input register can never be at offset * 0, and we only print register value for regular case. */ - writel(pin->input_val, ipctl->base + pin->input_reg); + if (info->flags & IOMUXC_LPSR_SUPPORT && + IOMUXC_LPSR_MASK(pin->input_val)) + /* iomuxc-lpsr select input register shared with normal iomuxc */ + writel(pin->input_val, info->base + pin->input_reg); + else + writel(pin->input_val, pin_reg->base + pin->input_reg); + dev_dbg(ipctl->dev, "==>select_input: offset 0x%x val 0x%x\n", pin->input_reg, pin->input_val); @@ -326,10 +331,10 @@ static int imx_pmx_gpio_request_enable(struct pinctrl_dev *pctldev, return -EINVAL; mux_pin: - reg = readl(ipctl->base + pin_reg->mux_reg); + reg = readl(pin_reg->base + pin_reg->mux_reg); reg &= ~(0x7 << 20); reg |= imx_pin->config; - writel(reg, ipctl->base + pin_reg->mux_reg); + writel(reg, pin_reg->base + pin_reg->mux_reg); return 0; } @@ -354,12 +359,12 @@ static int imx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, return -EINVAL; /* IBE always enabled allows us to read the value "on the wire" */ - reg = readl(ipctl->base + pin_reg->mux_reg); + reg = readl(pin_reg->base + pin_reg->mux_reg); if (input) reg &= ~0x2; else reg |= 0x2; - writel(reg, ipctl->base + pin_reg->mux_reg); + writel(reg, pin_reg->base + pin_reg->mux_reg); return 0; } @@ -386,7 +391,7 @@ static int imx_pinconf_get(struct pinctrl_dev *pctldev, return -EINVAL; } - *config = readl(ipctl->base + pin_reg->conf_reg); + *config = readl(pin_reg->base + pin_reg->conf_reg); if (info->flags & SHARE_MUX_CONF_REG) *config &= 0xffff; @@ -415,12 +420,12 @@ static int imx_pinconf_set(struct pinctrl_dev *pctldev, for (i = 0; i < num_configs; i++) { if (info->flags & SHARE_MUX_CONF_REG) { u32 reg; - reg = readl(ipctl->base + pin_reg->conf_reg); + reg = readl(pin_reg->base + pin_reg->conf_reg); reg &= ~0xffff; reg |= configs[i]; - writel(reg, ipctl->base + pin_reg->conf_reg); + writel(reg, pin_reg->base + pin_reg->conf_reg); } else { - writel(configs[i], ipctl->base + pin_reg->conf_reg); + writel(configs[i], pin_reg->base + pin_reg->conf_reg); } dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%lx\n", pin_reg->conf_reg, configs[i]); @@ -442,7 +447,7 @@ static void imx_pinconf_dbg_show(struct pinctrl_dev *pctldev, return; } - config = readl(ipctl->base + pin_reg->conf_reg); + config = readl(pin_reg->base + pin_reg->conf_reg); seq_printf(s, "0x%lx", config); } @@ -551,14 +556,25 @@ static int imx_pinctrl_parse_groups(struct device_node *np, } pin_id = mux_reg ? mux_reg / 4 : conf_reg / 4; + + pin->input_reg = be32_to_cpu(*list++); + pin->mux_mode = be32_to_cpu(*list++); + pin->input_val = be32_to_cpu(*list++); + + if (info->flags & IOMUXC_LPSR_SUPPORT && + IOMUXC_LPSR_MASK(pin->input_val)) + pin_id = IOMUXC_LPSR_MASK(pin->input_val); + pin_reg = &info->pin_regs[pin_id]; pin->pin = pin_id; grp->pin_ids[i] = pin_id; pin_reg->mux_reg = mux_reg; pin_reg->conf_reg = conf_reg; - pin->input_reg = be32_to_cpu(*list++); - pin->mux_mode = be32_to_cpu(*list++); - pin->input_val = be32_to_cpu(*list++); + pin_reg->base = info->base; + + if (info->flags & IOMUXC_LPSR_SUPPORT && + IOMUXC_LPSR_MASK(pin->input_val)) + pin_reg->base = info->base_lpsr; /* SION bit is in mux register */ config = be32_to_cpu(*list++); @@ -709,9 +725,19 @@ int imx_pinctrl_probe(struct platform_device *pdev, } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ipctl->base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(ipctl->base)) - return PTR_ERR(ipctl->base); + info->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(info->base)) + return PTR_ERR(info->base); + + if (info->flags & IOMUXC_LPSR_SUPPORT) { + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + info->base_lpsr = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(info->base_lpsr)) { + dev_err(&pdev->dev, + "iomuxc-lpsr base address not found\n"); + return PTR_ERR(info->base_lpsr); + } + } imx_pinctrl_desc.name = dev_name(&pdev->dev); imx_pinctrl_desc.pins = info->pins; diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h index 49e55d3..5e0f2e0 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.h +++ b/drivers/pinctrl/freescale/pinctrl-imx.h @@ -1,7 +1,7 @@ /* * IMX pinmux core definitions * - * Copyright (C) 2012 Freescale Semiconductor, Inc. + * Copyright (C) 2012-2015 Freescale Semiconductor, Inc. * Copyright (C) 2012 Linaro Ltd. * * Author: Dong Aisheng @@ -69,6 +69,7 @@ struct imx_pmx_func { struct imx_pin_reg { s16 mux_reg; s16 conf_reg; + void __iomem *base; }; struct imx_pinctrl_soc_info { @@ -81,9 +82,13 @@ struct imx_pinctrl_soc_info { struct imx_pmx_func *functions; unsigned int nfunctions; unsigned int flags; + void __iomem *base; + void __iomem *base_lpsr; }; #define SHARE_MUX_CONF_REG 0x1 +#define IOMUXC_LPSR_SUPPORT 0x2 +#define IOMUXC_LPSR_MASK(id) ((id >> 0x10) & 0xffff) #define NO_MUX 0x0 #define NO_PAD 0x0