From patchwork Wed Nov 14 10:45:38 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: 1740611 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 A5D373FCF7 for ; Wed, 14 Nov 2012 10:42:01 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYaOH-0002Bx-T8; Wed, 14 Nov 2012 10:40:18 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYaO9-00028v-CQ for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2012 10:40:14 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MDH00GU24AUT020@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2012 19:40:06 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 35.E2.12699.60573A05; Wed, 14 Nov 2012 19:40:06 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-9f-50a37506906a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 14.E2.12699.60573A05; Wed, 14 Nov 2012 19:40:06 +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 <0MDH00MM040KCS50@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2012 19:40:06 +0900 (KST) From: Praveen Paneri To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v8 3/3] ARM: EXYNOS: Enabling samsung-usbphy driver for EXYNOS4210 Date: Wed, 14 Nov 2012 16:15:38 +0530 Message-id: <1352889938-17311-4-git-send-email-p.paneri@samsung.com> X-Mailer: git-send-email 1.7.1 In-reply-to: <1352889938-17311-1-git-send-email-p.paneri@samsung.com> References: <1352889938-17311-1-git-send-email-p.paneri@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsWyRsSkWpetdHGAwcXduhabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugStj2sqfbAVrZStmrDnN3MB4T6KLkZNDQsBE4lDPYXYIW0ziwr31 bF2MXBxCAksZJZ4+a2CCKVrW+ZsRIjGdUeJb71cmCGcDk8TMh6+BWjg42AS0JRpmGoE0iAio SnxuW8AOUsMs8ItJ4t6HqWArhAVCJL43LmMGsVmAih52zGAC6eUVcJG4+9kVYpmcxI7VT8AW cwq4Svy9+pIFxBYCKtnSPQGqVUDi2+RDLCCtEgKyEpsOMIOskhC4ziYx9cNDVog5khIHV9xg mcAovICRYRWjaGpBckFxUnqukV5xYm5xaV66XnJ+7iZGYAie/vdMegfjqgaLQ4wCHIxKPLwB /YsChFgTy4orcw8xSnAwK4nwupUsDhDiTUmsrEotyo8vKs1JLT7E6AN0yURmKdHkfGB85JXE GxqbmJsam1oaGZmZmuIQVhLnbfZICRASSE8sSc1OTS1ILYIZx8TBKdXA2LBpQ0qubKDp0Su/ 4pi2eFU/v3rv0SEe6yQWVx/JW04cXg26NSKp4V+2Xjx3dGZOf/rTe2+fhUS9cDv9KDpufpls /ly55fsPrdBI/2/Qu1wp+eeKvElioSuf7unckJvP4veO5+wMg6/OW7ucj+8QMD/xXfJ03nOD j/v6Z7dfZNax+fD3dUfmNSWW4oxEQy3mouJEAMFQ/qVuAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42I5/e+xoC5b6eIAg9arMhabHl9jdWD02Lyk PoAxqoHRJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwdo qpJCWWJOKVAoILG4WEnfDtOE0BA3XQuYxghd35AguB4jAzSQsIYxY9rKn2wFa2UrZqw5zdzA eE+ii5GTQ0LARGJZ529GCFtM4sK99WxdjFwcQgLTGSW+9X5lgnA2MEnMfPgaKMPBwSagLdEw 0wikQURAVeJz2wJ2kBpmgV9MEvc+TGUHSQgLhEh8b1zGDGKzABU97JjBBNLLK+AicfezK8Qy OYkdq58wgdicAq4Sf6++ZAGxhYBKtnRPYJ7AyLuAkWEVo2hqQXJBcVJ6rpFecWJucWleul5y fu4mRnCAP5PewbiqweIQowAHoxIPb0D/ogAh1sSy4srcQ4wSHMxKIrxuJYsDhHhTEiurUovy 44tKc1KLDzH6AB01kVlKNDkfGH15JfGGxibmpsamliYWJmaWOISVxHmbPVIChATSE0tSs1NT C1KLYMYxcXBKNTB6saxe+SjhYHJY2UuOjssqP0tXTl+vu/Uqu/g07sOTroVKnli8557I1/uP izZ4Gqy76LKqX9Kt1LJ3Sx/Ttkjugmdi/Mt2Pk06wBp1jH1yR2dMqjeLoVzIxIAFdQK3/n2X 0GWceXJG6O/brLbiK7axKH9cFbrupKl6T/9WJZnY+3Gyx3N19ngosRRnJBpqMRcVJwIANLyw NZ0CAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121114_054011_120983_B8D0CD88 X-CRM114-Status: GOOD ( 14.65 ) 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.34 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, 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/Kconfig | 1 + 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 +++++++++++++ 5 files changed, 28 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts index 9b23a82..550903a 100644 --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts @@ -59,6 +59,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/Kconfig b/arch/arm/mach-exynos/Kconfig index bb3b09a..315308c 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -410,6 +410,7 @@ config MACH_EXYNOS4_DT select PINCTRL select PINCTRL_EXYNOS4 select USE_OF + select EXYNOS4_SETUP_USB_PHY help Machine support for Samsung Exynos4 machine with device tree enabled. Select this if a fdt blob is available for the Exynos4 SoC based board. diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index ef4958b..e64fe1c 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -244,6 +244,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 8858068..f7887e5 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 @@ -79,6 +85,8 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), OF_DEV_AUXDATA("samsung,exynos4210-tmu", EXYNOS4_PA_TMU, "exynos-tmu", 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); + } +}