From patchwork Wed Aug 8 07:41:01 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: 1292911 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 AD922DF223 for ; Wed, 8 Aug 2012 07:36: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 1Sz0l8-0002Nn-DQ; Wed, 08 Aug 2012 07:32:50 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sz0kd-0002LR-IZ for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2012 07:32:21 +0000 Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8F006ZME8Z7P20@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2012 16:32:01 +0900 (KST) X-AuditID: cbfee61a-b7f616d000004b7e-1b-502215f18c6c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6A.82.19326.1F512205; Wed, 08 Aug 2012 16:32:01 +0900 (KST) Received: from matrix.sisodomain.com ([107.108.73.199]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8F00I26E8TE5F0@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2012 16:32:01 +0900 (KST) From: Praveen Paneri To: linux-usb@vger.kernel.org Subject: [PATCH v3 5/5] ARM: Exynos4210: Enabling samsung-usbphy driver Date: Wed, 08 Aug 2012 13:11:01 +0530 Message-id: <1344411661-17821-6-git-send-email-p.paneri@samsung.com> X-Mailer: git-send-email 1.7.1 In-reply-to: <1344411661-17821-1-git-send-email-p.paneri@samsung.com> References: <1344411661-17821-1-git-send-email-p.paneri@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jAd2PokoBBi/XqlhsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6MbUdWsRTMkqxYuugeawPjCtEuRk4OCQETiRk/vrBB2GISF+6t B7K5OIQEFjFKXLnUwAzhbGCS+NayBSjDwcEmoC3RMNMIpEFEQFbi8JXfzCA2s8BbJonnZ8JA bGEBd4lrc+YzgtgsAqoS34/0MIHYvAIuEptvHWCGWCYnsWP1E7A4p4CrxKH1r8DiQkA1Wyb3 sk9g5F3AyLCKUTS1ILmgOCk911CvODG3uDQvXS85P3cTI9jjz6R2MK5ssDjEKMDBqMTDG5Ws GCDEmlhWXJl7iFGCg1lJhHfPQaAQb0piZVVqUX58UWlOavEhRmkOFiVxXmPvr/5CAumJJanZ qakFqUUwWSYOTqkGxg2mFQG/kyLLW+JY66qN5r5pklGI2+h4I07o5LpD9rJHpGZw2yxR5XoU 4ff1+cr3Bmo7O/57xKgc+RTId7mcLUmvrPrw5og/V+cVve99fFNGNnJT5kfpVfMTReRr3MvV eL7Njmvouc73KVNapt5Twahw68c3/ecWNtvYpSS67Mv+ce7+jTddSizFGYmGWsxFxYkAm9Vq nPQBAAA= X-TM-AS-MML: No X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 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.0 T_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..a652db0 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); + } +}