From patchwork Thu May 16 09:57:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2576171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id A74A93FC5A for ; Thu, 16 May 2013 10:02:09 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UcuyV-0001F6-NC; Thu, 16 May 2013 09:59:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UcuxX-0007II-LB; Thu, 16 May 2013 09:58:51 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ucuwn-0007Bj-A6 for linux-arm-kernel@lists.infradead.org; Thu, 16 May 2013 09:58:06 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MMV005WYYAWO240@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 16 May 2013 10:57:30 +0100 (BST) X-AuditID: cbfec7f4-b7fd76d0000035e1-17-5194ad8addca Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 11.AD.13793.A8DA4915; Thu, 16 May 2013 10:57:30 +0100 (BST) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MMV00J8RYBOHX80@eusync2.samsung.com>; Thu, 16 May 2013 10:57:30 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 6/6] usb: phy: samsung: Add support for USB 2.0 PHY on Exynos 4x12 Date: Thu, 16 May 2013 11:57:11 +0200 Message-id: <1368698231-24268-7-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.2.1 In-reply-to: <1368698231-24268-1-git-send-email-t.figa@samsung.com> References: <1368698231-24268-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPJMWRmVeSWpSXmKPExsVy+t/xK7pda6cEGry8oWVx8H69RduVg+wW zYvXs1mcbXrDbrHp8TVWixnn9zFZLFrWymxxfksnk8X6Ga9ZHDg99s9dw+6xeUm9R9+WVYwe x29sZ/L4vEkugDWKyyYlNSezLLVI3y6BK+Pp5Wb2gm2iFaf7VjI3MH4X7GLk5JAQMJHYvPU4 M4QtJnHh3nq2LkYuDiGBpYwSa99MZYJw+pgkPre0MIFUsQmoSXxueMQGYosIqEp8blvADlLE LNDAJHF23VxGkISwQLjEnNd9rCA2C1DRganbwBp4BZwkNm35zQixTkHi+PZtYDangLPEkf0r wOqFgGoeX3vKMoGRdwEjwypG0dTS5ILipPRcQ73ixNzi0rx0veT83E2MkED7soNx8TGrQ4wC HIxKPLyW0ycHCrEmlhVX5h5ilOBgVhLhnZE6JVCINyWxsiq1KD++qDQntfgQIxMHp1QDo+mW +H1CnktezeBY8uXJoTP/7FMF/nsU7naYVmpRbl4zZUXMzTypGY8Oqrgn3Yrg6/u+LuVbsIbD Y4aARTMqGPdMebg9ebXgi860MJPtq5kYyloaQjbmdWSLXzWKdL61tL48376t45rW+nePPY7z 2Ux7PXn+Kt5fp69tKBb4YtDybeZkxrXNx5VYijMSDbWYi4oTAchdpwgSAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130516_055805_485318_8C9F9654 X-CRM114-Status: GOOD ( 10.36 ) X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.12 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.6 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: Praveen Paneri , gregkh@linuxfoundation.org, Tomasz Figa , linux-usb@vger.kernel.org, balbi@ti.com, kyungmin.park@samsung.com, Vivek Gautam , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds driver data for Exynos 4x12 USB 2.0 PHY. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- drivers/usb/phy/phy-samsung-usb.h | 1 + drivers/usb/phy/phy-samsung-usb2.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/drivers/usb/phy/phy-samsung-usb.h b/drivers/usb/phy/phy-samsung-usb.h index 31e2ec3..585d12f 100644 --- a/drivers/usb/phy/phy-samsung-usb.h +++ b/drivers/usb/phy/phy-samsung-usb.h @@ -241,6 +241,7 @@ enum samsung_cpu_type { TYPE_S3C64XX, TYPE_EXYNOS4210, + TYPE_EXYNOS4X12, TYPE_EXYNOS5250, }; diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c index b81347b..381f8d4 100644 --- a/drivers/usb/phy/phy-samsung-usb2.c +++ b/drivers/usb/phy/phy-samsung-usb2.c @@ -177,6 +177,7 @@ static void samsung_usb2phy_enable(struct samsung_usbphy *sphy) rstcon |= RSTCON_SWRST; break; case TYPE_EXYNOS4210: + case TYPE_EXYNOS4X12: phypwr &= ~PHYPWR_NORMAL_MASK_PHY0; rstcon |= RSTCON_SWRST; default: @@ -240,6 +241,7 @@ static void samsung_usb2phy_disable(struct samsung_usbphy *sphy) phypwr |= PHYPWR_NORMAL_MASK; break; case TYPE_EXYNOS4210: + case TYPE_EXYNOS4X12: phypwr |= PHYPWR_NORMAL_MASK_PHY0; default: break; @@ -456,6 +458,16 @@ static const struct samsung_usbphy_drvdata usb2phy_exynos4 = { .phy_disable = samsung_usb2phy_disable, }; +static const struct samsung_usbphy_drvdata usb2phy_exynos4x12 = { + .cpu_type = TYPE_EXYNOS4X12, + .devphy_en_mask = EXYNOS_USBPHY_ENABLE, + .hostphy_en_mask = EXYNOS_USBPHY_ENABLE, + .rate_to_clksel = samsung_usbphy_rate_to_clksel_4x12, + .set_isolation = samsung_usbphy_set_isolation_4210, + .phy_enable = samsung_usb2phy_enable, + .phy_disable = samsung_usb2phy_disable, +}; + static struct samsung_usbphy_drvdata usb2phy_exynos5 = { .cpu_type = TYPE_EXYNOS5250, .hostphy_en_mask = EXYNOS_USBPHY_ENABLE, @@ -475,6 +487,9 @@ static const struct of_device_id samsung_usbphy_dt_match[] = { .compatible = "samsung,exynos4210-usb2phy", .data = &usb2phy_exynos4, }, { + .compatible = "samsung,exynos4x12-usb2phy", + .data = &usb2phy_exynos4x12, + }, { .compatible = "samsung,exynos5250-usb2phy", .data = &usb2phy_exynos5 }, @@ -491,6 +506,9 @@ static struct platform_device_id samsung_usbphy_driver_ids[] = { .name = "exynos4210-usb2phy", .driver_data = (unsigned long)&usb2phy_exynos4, }, { + .name = "exynos4x12-usb2phy", + .driver_data = (unsigned long)&usb2phy_exynos4x12, + }, { .name = "exynos5250-usb2phy", .driver_data = (unsigned long)&usb2phy_exynos5, },