From patchwork Wed Nov 9 08:40:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9418575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B2FA5601C0 for ; Wed, 9 Nov 2016 08:43:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A652428999 for ; Wed, 9 Nov 2016 08:43:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98ACB28A3A; Wed, 9 Nov 2016 08:43:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id EE00528999 for ; Wed, 9 Nov 2016 08:43:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c4ORY-0001ae-Mt; Wed, 09 Nov 2016 08:41:16 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c4OR2-0000qH-W6 for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2016 08:40:47 +0000 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGD00JHD9ESHG80@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2016 17:40:15 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-a7-5822e0ee8f25 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id F0.30.16530.EE0E2285; Wed, 9 Nov 2016 17:40:15 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGD00D9I9F2ZJ70@mmp1.samsung.com>; Wed, 09 Nov 2016 17:40:14 +0900 (KST) From: Chanwoo Choi To: tomasz.figa@gmail.com, krzk@kernel.org, s.nawrocki@samsung.com, linus.walleij@linaro.org, kgene@kernel.org Subject: [PATCH v4 2/2] pinctrl: samsung: Add GPF support for Exynos5433 Date: Wed, 09 Nov 2016 17:40:11 +0900 Message-id: <1478680811-24835-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1478680811-24835-1-git-send-email-cw00.choi@samsung.com> References: <1478680811-24835-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsVy+t9jAd33D5QiDI46Wlz/8pzV4s3bNUwW L+5dZLHof/ya2eL8+Q3sFlP+LGey2PT4GqvF5vl/GC0u75rDZjHj/D4mi6XXLzJZtO49wm5x +E07q8WqXX8YHfg81sxbw+ixc9Zddo9NqzrZPO5c28PmsXlJvceWfqBQ35ZVjB6fN8kFcES5 2WSkJqakFimk5iXnp2TmpdsqhYa46VooKeQl5qbaKkXo+oYEKSmUJeaUAnlGBmjAwTnAPVhJ 3y7BLePwzX9sBX9lKo5fmcHYwHhKoouRg0NCwETi527NLkZOIFNM4sK99WxdjFwcQgJLGSW2 /t/LCuH8YJT49u0ZC0gVm4CWxP4XN9hAbBGBAolb61eDdTAL7GGS2PfsDliRsICHxPst51hB bBYBVYnns2aCNfAKuErc23mQEWKdnMSHPY/YQWxOATeJFXM+MYHYQkA1Pz5eYJ/AyLuAkWEV o0RqQXJBcVJ6rlFearlecWJucWleul5yfu4mRnDUPJPewXh4l/shRgEORiUe3oyHihFCrIll xZW5hxglOJiVRHiX31aKEOJNSaysSi3Kjy8qzUktPsRoCnTYRGYp0eR8YETnlcQbmpibmBsb WJhbWpoYKYnzNs5+Fi4kkJ5YkpqdmlqQWgTTx8TBKdXAqJTCdjCnwWx5YN5RKcX4IAnR87dW 6bJ4bXF32S5+Nmdi3YTTe/7I9speM7qwPENi1rQvW9JMFSdWX28SPy7SILa7193l63ydN7Oq J3+6KMOwzbLi60P3krSvXzQWxj/Ylz9vtlp6x5+PcfEffCYzTn/7eEnT/D/dc47FXbmddf5h 8q/jq+ctKVdiKc5INNRiLipOBAC+BU61sAIAAA== X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161109_004045_346033_41EE1562 X-CRM114-Status: GOOD ( 13.92 ) 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: Mark Rutland , linux-samsung-soc@vger.kernel.org, Joonyoung Shim , Chanwoo Choi , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, javier@osg.samsung.com, Rob Herring , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch add the support of GPF[1-5] pin of Exynos5433 SoC. The GPFx need to support the multiple memory map because the registers of GPFx are located in the different domain. Cc: Linus Walleij Cc: Rob Herring Cc: Mark Rutland Cc: Tomasz Figa Cc: Krzysztof Kozlowski Cc: Sylwester Nawrocki Cc: Kukjin Kim Cc: linux-gpio@vger.kernel.org Signed-off-by: Joonyoung Shim Signed-off-by: Chanwoo Choi --- .../devicetree/bindings/pinctrl/samsung-pinctrl.txt | 19 +++++++++++++++++++ drivers/pinctrl/samsung/pinctrl-exynos.c | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index d49e22d2a8b5..1baf19eecabf 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt @@ -19,11 +19,30 @@ Required Properties: - "samsung,exynos5260-pinctrl": for Exynos5260 compatible pin-controller. - "samsung,exynos5410-pinctrl": for Exynos5410 compatible pin-controller. - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. + - "samsung,exynos5433-pinctrl": for Exynos5433 compatible pin-controller. - "samsung,exynos7-pinctrl": for Exynos7 compatible pin-controller. - reg: Base address of the pin controller hardware module and length of the address space it occupies. + - reg: Second base address of the pin controller if the specific registers + of the pin controller are separated into the different base address. + + Eg: GPF[1-5] of Exynos5433 are separated into the two base address. + - First base address is for GPAx and GPF[1-5] external interrupt + registers. + - Second base address is for GPF[1-5] pinctrl registers. + + pinctrl_0: pinctrl@10580000 { + compatible = "samsung,exynos5433-pinctrl"; + reg = <0x10580000 0x1a20>, <0x11090000 0x100>; + + wakeup-interrupt-controller { + compatible = "samsung,exynos7-wakeup-eint"; + interrupts = <0 16 0>; + }; + }; + - Pin banks as child nodes: Pin banks of the controller are represented by child nodes of the controller node. Bank name is taken from name of the node. Each bank node must contain following properties: diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index d657b52dfdb5..12f7d1eb65bc 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -1339,6 +1339,11 @@ static void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata) EXYNOS_PIN_BANK_EINTW(8, 0x020, "gpa1", 0x04), EXYNOS_PIN_BANK_EINTW(8, 0x040, "gpa2", 0x08), EXYNOS_PIN_BANK_EINTW(8, 0x060, "gpa3", 0x0c), + EXYNOS_PIN_BANK_EINTW_EXT(8, 0x020, "gpf1", 0x1004, 1), + EXYNOS_PIN_BANK_EINTW_EXT(4, 0x040, "gpf2", 0x1008, 1), + EXYNOS_PIN_BANK_EINTW_EXT(4, 0x060, "gpf3", 0x100c, 1), + EXYNOS_PIN_BANK_EINTW_EXT(8, 0x080, "gpf4", 0x1010, 1), + EXYNOS_PIN_BANK_EINTW_EXT(8, 0x0a0, "gpf5", 0x1014, 1), }; /* pin banks of exynos5433 pin-controller - AUD */ @@ -1420,6 +1425,7 @@ static void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata) .eint_wkup_init = exynos_eint_wkup_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .nr_ext_resources = 1, }, { /* pin-controller instance 1 data */ .pin_banks = exynos5433_pin_banks1,