From patchwork Tue Mar 26 14:53:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2337851 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0F89C3FC54 for ; Tue, 26 Mar 2013 14:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934579Ab3CZOxt (ORCPT ); Tue, 26 Mar 2013 10:53:49 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:43210 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933632Ab3CZOxs (ORCPT ); Tue, 26 Mar 2013 10:53:48 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MK900FKVW16N100@mailout1.samsung.com>; Tue, 26 Mar 2013 23:53:47 +0900 (KST) X-AuditID: cbfee61b-b7f076d0000034b6-e8-5151b67bfb76 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 9E.41.13494.B76B1515; Tue, 26 Mar 2013 23:53:47 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MK9000TTW0VGU70@mmp1.samsung.com>; Tue, 26 Mar 2013 23:53:47 +0900 (KST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Cc: linux-usb@vger.kernel.org, balbi@ti.com, kyungmin.park@samsung.com, kgene.kim@samsung.com, p.paneri@samsung.com, gautam.vivek@samsung.com, m.szyprowski@samsung.com, Tomasz Figa Subject: [PATCH 6/6] usb: phy: samsung: Add support for USB 2.0 PHY on Exynos 4x12 Date: Tue, 26 Mar 2013 15:53:15 +0100 Message-id: <1364309595-16102-7-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1364309595-16102-1-git-send-email-t.figa@samsung.com> References: <1364309595-16102-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMLMWRmVeSWpSXmKPExsVy+t9jAd3qbYGBBpff6lgcvF9v0XblILtF 74KrbBZnm96wW8w4v4/JYtGyVmaLtUfusluc39LJZLF+xmsWB06Pvi2rGD2O39jO5PF5k1wA cxSXTUpqTmZZapG+XQJXxuKvj5kKtolWLFh2h7mB8btgFyMnh4SAicSBE6uYIGwxiQv31rN1 MXJxCAksYpSYcWQaO4TTxSSxcddjdpAqNgE1ic8Nj9hAbBEBVYnPbQvAipgFzjJKNHYcZQFJ CAuESPRdv8YIYrMAFf2cshesmVfASeLOw+ssEOvkJZ7e7wMbxCngLHF90hKgGg6gbU4S+1rK JzDyLmBkWMUomlqQXFCclJ5rpFecmFtcmpeul5yfu4kRHFTPpHcwrmqwOMQowMGoxMPLERYQ KMSaWFZcmXuIUYKDWUmEV3BjYKAQb0piZVVqUX58UWlOavEhRmkOFiVx3oOt1oFCAumJJanZ qakFqUUwWSYOTqkGxmb1qbuzE1Smn/MPLyhTt350W2hB+f//87iNE5UtWg5wnC85er9eplBU 12rCCtkZvMUvCxbo6XAIBCRVttreq+yNXhWx5v26by5cf/nLdp4Vc9oq9nLy7Sy5X71l+966 JQcYsdUHLciti9rjq/c/4lpSi0+r3YWy15Z6z6dPX1qpUl7+8H2iEktxRqKhFnNRcSIAMXJv /SYCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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, },