From patchwork Tue Oct 30 04:57:37 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: 1668321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 065293FDDA for ; Tue, 30 Oct 2012 04:56:11 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TT3q6-0000OC-1t; Tue, 30 Oct 2012 04:54:10 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TT3q0-0000Mk-Co for linux-arm-kernel@lists.infradead.org; Tue, 30 Oct 2012 04:54:06 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCO00AZ4W8VQ8L0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 30 Oct 2012 13:54:03 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 0C.AC.01231.B6D5F805; Tue, 30 Oct 2012 13:54:03 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-7f-508f5d6bb8ad Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id DA.AC.01231.B6D5F805; Tue, 30 Oct 2012 13:54:03 +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 <0MCO00KD6VWRVA70@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 30 Oct 2012 13:54:03 +0900 (KST) From: Praveen Paneri To: linux-usb@vger.kernel.org Subject: [PATCH v7 5/5] ARM: Exynos4210: Enabling samsung-usbphy driver Date: Tue, 30 Oct 2012 10:27:37 +0530 Message-id: <1351573057-22249-6-git-send-email-p.paneri@samsung.com> X-Mailer: git-send-email 1.7.1 In-reply-to: <1351573057-22249-1-git-send-email-p.paneri@samsung.com> References: <1351573057-22249-1-git-send-email-p.paneri@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsWyRsSkSjc7tj/AYM4SKYtNj6+xOjB6bF5S H8AYxWWTkpqTWZZapG+XwJXxb849xoL1khVt/b1MDYyHRbsYOTgkBEwkmu7GdTFyApliEhfu rWfrYuTiEBJYyigxp+UTC0zNmS/eEPHpjBK37qxnhnA2MEn8u72NHaSITUBbomGmEcggEQFZ icNXfjOD2MwCc5klem8IgtjCAu4SO+7/YAWxWQRUJfY/WccIYvMKuEh8/XuLBeIIOYkdq58w gdicAq4SP5oawWqEgGr69/xmgugVkPg2+RDUbbISmw6AnSMhcJ1N4uLTy8wQcyQlDq64wTKB UXgBI8MqRtHUguSC4qT0XEO94sTc4tK8dL3k/NxNjMDwO/3vmdQOxpUNFocYBTgYlXh4N6zp CxBiTSwrrsw9xCjBwawkwpvv3R8gxJuSWFmVWpQfX1Sak1p8iNEH6JKJzFKiyfnA2MgriTc0 NjE3NTa1NDIyMzXFIawkztvskRIgJJCeWJKanZpakFoEM46Jg1OqgbFrav29R4qxHhIs5qZ/ WWcHPfc/+Gnfgmt/Qn4cPui6h+Pl1AQrUQN5zgu5OzYwfO1hOM3zVNCrs/qDEPt/8ysqTlOn yRl8FA3yX2lRPuW08zqF5UVHQ6qP5Nofn2168Gtr+Nyf5x8mLlSL//jrpcyCiw9E/ueran+Z f3MB899oE/Zc2z+6/bOVWIozEg21mIuKEwH49bhZbAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42I5/e+xoG52bH+Awb81nBabHl9jdWD02Lyk PoAxqoHRJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwdo qpJCWWJOKVAoILG4WEnfDtOE0BA3XQuYxghd35AguB4jAzSQsIYx49+ce4wF6yUr2vp7mRoY D4t2MXJwSAiYSJz54t3FyAlkiklcuLeerYuRi0NIYDqjxK0765khnA1MEv9ub2MHaWAT0JZo mGkE0iAiICtx+MpvZhCbWWAus0TvDUEQW1jAXWLH/R+sIDaLgKrE/ifrGEFsXgEXia9/b7FA LJOT2LH6CROIzSngKvGjqRGsRgiopn/Pb6YJjLwLGBlWMYqmFiQXFCel5xrqFSfmFpfmpesl 5+duYgSH9zOpHYwrGywOMQpwMCrx8G5Y0xcgxJpYVlyZe4hRgoNZSYQ337s/QIg3JbGyKrUo P76oNCe1+BCjD9BVE5mlRJPzgbGXVxJvaGxibmpsamliYWJmiUNYSZy32SMlQEggPbEkNTs1 tSC1CGYcEwenVAOj3Dq75ZsimyedU+fnq/6f8ZDttr5B89XCPU/4V7hIWvUp6Uzckit//dEU tT+B1hXJt+Ic39opzM23M1Zlka+u617GpP6+cc2dbfv/NbVeu/pjB+fBc7cUvtamFGwVUUjV mf32/DHHA+xGNVotU5n/ni+OWDnjzFeXhDnJd6fu+KE8K//Uoa1pSizFGYmGWsxFxYkA0G09 3ZwCAAA= X-CFilter-Loop: Reflected X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 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, gautam.vivek@samsung.com, ben-linux@fluff.org, t.figa@samsung.com, 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-smdkv310.dts | 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-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts index 63610c3..f59e255 100644 --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts @@ -43,6 +43,11 @@ status = "okay"; }; + usbphy@125B0000 { + compatible = "samsung,exynos4210-usbphy"; + reg = <0x125B0000 0x100>; + }; + keypad@100A0000 { samsung,keypad-num-rows = <2>; samsung,keypad-num-columns = <8>; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 8480849..9694424 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -242,6 +242,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 e58d786..a9e0a0d 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 @@ -77,6 +83,8 @@ static const struct of_dev_auxdata exynos4_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); + } +}