From patchwork Mon Sep 17 12:54:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: p.paneri@samsung.com X-Patchwork-Id: 1466851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 2E22CDF2D8 for ; Mon, 17 Sep 2012 12:55:12 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TDan0-0002Cv-AB; Mon, 17 Sep 2012 12:51:02 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TDamu-0002AU-B2 for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2012 12:50:57 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAH00FCZVOS2FU0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2012 21:50:54 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id AF.ED.03783.EAC17505; Mon, 17 Sep 2012 21:50:54 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-e0-50571cae822f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6E.ED.03783.EAC17505; Mon, 17 Sep 2012 21:50:54 +0900 (KST) Received: from matrix.sisodomain.com ([107.108.73.199]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAH00JKBVDCHZB0@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2012 21:50:54 +0900 (KST) From: Praveen Paneri To: linux-usb@vger.kernel.org Subject: [PATCH v6 5/5] ARM: Exynos4210: Enabling samsung-usbphy driver Date: Mon, 17 Sep 2012 18:24:44 +0530 Message-id: <1347886484-16064-6-git-send-email-p.paneri@samsung.com> X-Mailer: git-send-email 1.7.1 In-reply-to: <1347886484-16064-1-git-send-email-p.paneri@samsung.com> References: <1347886484-16064-1-git-send-email-p.paneri@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsWyRsSkWnedTHiAwfotlhabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugStjw8fZrAWzJCvuTfrN1sC4QrSLkZNDQsBEYuGGCawQtpjEhXvr 2boYuTiEBJYySnxovsEKU/Tx1WRGEFtIYDqjRNdNW4iiDUwSq991MncxcnCwCWhLNMw0AqkR EZCVOHzlNzOIzSzwlkni+ZkwkBJhAXeJgw0CIGEWAVWJVX8OMIGEeQVcJCZfE4bYJCexY/UT sDCngKvEg4WCEEtdJN4s+M4O0Skg8W3yIRaQEgmgRZsOMIPcIiFwmU1iycFdbBBjJCUOrrjB MoFReAEjwypG0dSC5ILipPRcQ73ixNzi0rx0veT83E2MwNA7/e+Z1A7GlQ0WhxgFOBiVeHgN J4UFCLEmlhVX5h5ilOBgVhLhvS0QHiDEm5JYWZValB9fVJqTWnyI0QfokonMUqLJ+cC4yCuJ NzQ2MTc1NrU0MjIzNcUhrCTOK/wpMEBIID2xJDU7NbUgtQhmHBMHp1QD43k5RUG+ONbX9X4d JybnXy2Olja1KpzzsuuZ9QbeJw25kyPfy3hk3y5MOM95y64vfdJ1q+pbprNfesvd2WS3uOz4 wl35q+zjJMod0gOf//L4WXXUOUfF0iVos8GVA1Ky8XN+y3fL8R5y2qdrVxui2ed1teL+df8L zukLfbUWnd3pet71pOo0JZbijERDLeai4kQA9NWoYGoCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42I5/e+xoO46mfAAg8u3VSw2Pb7G6sDosXlJ fQBjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYQ1jxoaPs1kLZklW3Jv0m62B cYVoFyMnh4SAicTHV5MZIWwxiQv31rOB2EIC0xklum7adjFyAdkbmCRWv+tk7mLk4GAT0JZo mGkEUiMiICtx+MpvZhCbWeAtk8TzM2EgJcIC7hIHGwRAwiwCqhKr/hxgAgnzCrhITL4mDLFJ TmLH6idgYU4BV4kHCwUhlrpIvFnwnX0CI+8CRoZVjKKpBckFxUnpuYZ6xYm5xaV56XrJ+bmb GMGB/UxqB+PKBotDjAIcjEo8vIaTwgKEWBPLiitzDzFKcDArifDeFggPEOJNSaysSi3Kjy8q zUktPsToA3TTRGYp0eR8YNTllcQbGpuYmxqbWppYmJhZ4hBWEucV/hQYICSQnliSmp2aWpBa BDOOiYNTqoFRUHuRzB/Nzo/7tiv06F1yrfnC1xrkXvTLfN+rxRFTZToVtsp+Kw5cnjfHMcZ4 jo7phNQjHVE2HmsfL7gcy/qM5575o72yJ9PUJrDedzudqS/a6WXYGCgmbmIsUDKX46nEv0u+ JzOXbYipL3spd3mG7/dXal9zOi4F5C8q1bXImnq1JzTvPqsSS3FGoqEWc1FxIgD4to39mQIA AA== X-CFilter-Loop: Reflected X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: l.majewski@samsung.com, kgene.kim@samsung.com, heiko@sntech.de, gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org, broonie@opensource.wolfsonmicro.com, balbi@ti.com, grant.likely@secretlab.ca, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.abraham@linaro.org, ben-linux@fluff.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Adding usbphy node for Exynos4210 along with the platform data. Signed-off-by: Praveen Paneri --- arch/arm/boot/dts/exynos4210.dtsi | 5 +++++ arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/mach-exynos4-dt.c | 8 ++++++++ arch/arm/mach-exynos/setup-usb-phy.c | 13 +++++++++++++ 4 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 02891fe..e28cf10 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -62,6 +62,11 @@ interrupts = <0 44 0>, <0 45 0>; }; + usbphy@125B0000 { + compatible = "samsung,exynos4210-usbphy"; + reg = <0x125B0000 0x100>; + }; + keypad@100A0000 { compatible = "samsung,s5pv210-keypad"; reg = <0x100A0000 0x100>; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index c72b675..0625c0a 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -234,6 +234,7 @@ #define S3C_PA_SPI1 EXYNOS4_PA_SPI1 #define S3C_PA_SPI2 EXYNOS4_PA_SPI2 #define S3C_PA_USB_HSOTG EXYNOS4_PA_HSOTG +#define S3C_PA_USB_PHY EXYNOS4_PA_HSPHY #define S5P_PA_EHCI EXYNOS4_PA_EHCI #define S5P_PA_FIMC0 EXYNOS4_PA_FIMC0 diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index b2b5d5f..0739be8 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -20,9 +21,14 @@ #include #include +#include #include "common.h" +static struct samsung_usbphy_data exynos4_usbphy_pdata = { + .pmu_isolation = s5p_usb_phy_pmu_isolation, +}; + /* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable @@ -63,6 +69,8 @@ static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = { "exynos4210-spi.2", NULL), OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), + OF_DEV_AUXDATA("samsung,exynos4210-usbphy", EXYNOS4_PA_HSPHY, + "s3c-usbphy", &exynos4_usbphy_pdata), {}, }; diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c index b81cc56..1c62d20 100644 --- a/arch/arm/mach-exynos/setup-usb-phy.c +++ b/arch/arm/mach-exynos/setup-usb-phy.c @@ -221,3 +221,16 @@ int s5p_usb_phy_exit(struct platform_device *pdev, int type) return -EINVAL; } + +void s5p_usb_phy_pmu_isolation(int on) +{ + if (on) { + writel(readl(S5P_USBDEVICE_PHY_CONTROL) + & ~S5P_USBDEVICE_PHY_ENABLE, + S5P_USBDEVICE_PHY_CONTROL); + } else { + writel(readl(S5P_USBDEVICE_PHY_CONTROL) + | S5P_USBDEVICE_PHY_ENABLE, + S5P_USBDEVICE_PHY_CONTROL); + } +}