From patchwork Sat Jul 21 10:32:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 1223571 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 46C7C3FC5A for ; Sat, 21 Jul 2012 10:27:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SsWp1-0003MI-93; Sat, 21 Jul 2012 10:22:03 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SsWmr-0003GB-OA for linux-arm-kernel@lists.infradead.org; Sat, 21 Jul 2012 10:19:50 +0000 Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M7I00KQX9X3CWE0@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 21 Jul 2012 19:17:32 +0900 (KST) X-AuditID: cbfee61b-b7f566d000005c8a-6d-500a81bcfb9a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id FA.C9.23690.CB18A005; Sat, 21 Jul 2012 19:17:32 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M7I000KP9WQC260@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 21 Jul 2012 19:17:32 +0900 (KST) From: Vivek Gautam To: kgene.kim@samsung.com, l.majewski@samsung.com, kyungmin.park@samsung.com, thomas.abraham@linaro.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, m.szyprowski@samsung.com Subject: [PATCH 4/8 v2] ARM: EXYNOS5: Add EHCI device from device tree Date: Sat, 21 Jul 2012 16:02:05 +0530 Message-id: <1342866729-30460-5-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1342866729-30460-1-git-send-email-gautam.vivek@samsung.com> References: <1342866729-30460-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMJMWRmVeSWpSXmKPExsVy+t9jAd09jVwBBjvnmVlsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6MF3cPMhWsk6q4MfsiYwPjOdEuRk4OCQETiSMrWtkhbDGJC/fW s4HYQgKLGCXO31bvYuQCsjcwSezs+MMMkmAT0JVoeruLESQhIvCVUeLk13XMIA6zwH5GiR+X P4FVCQu4STTO7AcbxSKgKjGvqZ0RxOYV8JA48q6bGWKdgkTrskNgqzkFPCV2Tv3MBLHaQ+L0 jUbGCYy8CxgZVjGKphYkFxQnpeca6RUn5haX5qXrJefnbmIEe/2Z9A7GVQ0WhxgFOBiVeHgZ lnEGCLEmlhVX5h5ilOBgVhLhfV3GFSDEm5JYWZValB9fVJqTWnyIUZqDRUmc18T7q7+QQHpi SWp2ampBahFMlomDU6qBMWNRyUpTljzhbeFajsub/Wxi5ngaK3lnJQor3glySn+YullT86r9 +r0xSvzin4/kyjz5s4Sh1Fe/KetVbcV/A8uttTYJC66ZRL+8fztz3s9tu5ZuU3j5MmPd5K2H fgm+tY/NzJBabcm2xyg3KeH1izjRNYvyVnTvfSvIe89LxGqh5fqZGct+K7EUZyQaajEXFScC AEFTty72AQAA X-TM-AS-MML: No X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -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: yulgon.kim@samsung.com, av.tikhomirov@samsung.com, prashanth.g@samsung.com, boyko.lee@samsung.com, joshi@samsung.com, a.kesavan@samsung.com, olofj@google.com, ajaykumar.rs@samsung.com 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 This patch adds EHCI device from device tree for exynos5 and adds platform data. Signed-off-by: Vivek Gautam --- .../devicetree/bindings/usb/exynos-usb.txt | 22 ++++++++++++++++++++ arch/arm/boot/dts/exynos5250-smdk5250.dts | 4 +++ arch/arm/boot/dts/exynos5250.dtsi | 6 +++++ arch/arm/mach-exynos/mach-exynos5-dt.c | 8 +++++++ 4 files changed, 40 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt index 63b80b9..45dadca 100644 --- a/Documentation/devicetree/bindings/usb/exynos-usb.txt +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt @@ -17,3 +17,25 @@ ohci { interrupts = <0 71 0>; }; +EHCI +Required properties: + - compatible: should be "samsung,exynos-ehci" for USB 2.0 + EHCI controller in host mode. + - reg: physical base address of the controller and length + of memory mapped. + - interrupts: interrupt number to the cpu. + +Optional properties: + - samsung,vbus-gpio: if present, specifies the GPIO + that needs to be pulled up for the bus to be powered. + +ehci { + compatible = "samsung,exynos-ehci"; + reg = <0x12110000 0x100>; + interrupts = <0 71 0>; +}; + +ehci { + samsung,vbus-gpio = <&gpx2 6 1 3 3>; +}; + diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 8a5e348..bf18286 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -109,4 +109,8 @@ spi_2: spi@12d40000 { status = "disabled"; }; + + ehci { + samsung,vbus-gpio = <&gpx2 6 1 3 3>; + }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 3c73d15..988f52a 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -64,6 +64,12 @@ interrupts = <0 71 0>; }; + ehci { + compatible = "samsung,exynos-ehci"; + reg = <0x12110000 0x100>; + interrupts = <0 71 0>; + }; + rtc { compatible = "samsung,s3c6410-rtc"; reg = <0x101E0000 0x100>; diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 39a4b34..0cc626e 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "common.h" @@ -28,6 +29,11 @@ static struct exynos4_ohci_platdata smdk5250_ohci_pdata = { .phy_exit = s5p_usb_phy_exit, }; +static struct s5p_ehci_platdata smdk5250_ehci_pdata = { + .phy_init = s5p_usb_phy_init, + .phy_exit = s5p_usb_phy_exit, +}; + /* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable @@ -65,6 +71,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL), OF_DEV_AUXDATA("samsung,exynos-ohci", 0x12120000, "exynos-ohci", &smdk5250_ohci_pdata), + OF_DEV_AUXDATA("samsung,exynos-ehci", 0x12110000, + "s5p-ehci", &smdk5250_ehci_pdata), {}, };