From patchwork Tue Jan 8 09:37:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 13913 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A4FC523E21 for ; Tue, 8 Jan 2013 09:30:32 +0000 (UTC) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by fiordland.canonical.com (Postfix) with ESMTP id 3F928A180A1 for ; Tue, 8 Jan 2013 09:30:32 +0000 (UTC) Received: by mail-vb0-f41.google.com with SMTP id l22so164696vbn.0 for ; Tue, 08 Jan 2013 01:30:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=Qg/0s9s0z7+qQ1XRQA/jXB9qaJ+74nbwY0+99lGLYbQ=; b=nNIRqT3y7CBtxdC4rpzw6GlzLbEJVAGOVPfwU4zDjHoo/vR35igPx8VI7ykPab0NGr qzW8GIw8obF6ZHa/mOJjv2ZWDFfO/54pqqW3XBsrNayl5gD4IqvFWF0mTcmLxduGeN3C hxCNWbTn6cISnDRXKYQ/CpEAI6NYwYFJHLGn9ilP/M194YCPNfAhCVAeyEvu/D98SRBK lQJL1wEOAHMQzRAnSwPTv3lefJCfL0ISbJ3QLNOBdU1jtivfcwJIpanfoDIJEJ36DaFF 0Rne6ng69vF0dcIRMxl9r0Tqhw0AaY+RD4piRb4oRzcF94MjoUJSV0ISheztmIvwQOjK WUhQ== X-Received: by 10.52.18.147 with SMTP id w19mr75246483vdd.94.1357637431656; Tue, 08 Jan 2013 01:30:31 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp101084veb; Tue, 8 Jan 2013 01:30:30 -0800 (PST) X-Received: by 10.68.213.233 with SMTP id nv9mr196035517pbc.155.1357637430504; Tue, 08 Jan 2013 01:30:30 -0800 (PST) Received: from mailout1.samsung.com (mailout1.samsung.com. [203.254.224.24]) by mx.google.com with ESMTP id sn9si61985737pbc.9.2013.01.08.01.30.29; Tue, 08 Jan 2013 01:30:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.24 as permitted sender) client-ip=203.254.224.24; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.24 as permitted sender) smtp.mail=gautam.vivek@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MGA00HI6VPT8QF0@mailout1.samsung.com> for patches@linaro.org; Tue, 08 Jan 2013 18:30:28 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 11.29.01231.437EBE05; Tue, 08 Jan 2013 18:30:28 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-92-50ebe734829b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 80.29.01231.437EBE05; Tue, 08 Jan 2013 18:30:28 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.73.134]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MGA007B9VQN1E40@mmp2.samsung.com> for patches@linaro.org; Tue, 08 Jan 2013 18:30:28 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de Cc: patches@linaro.org, marex@denx.de, sjg@chromium.org, kmpark@infradead.org, rajeshwari.s@samsung.com, joshi@samsung.com Subject: [PATCH v4] SMDK5250: Enable VBus for USB 2.0 controller Date: Tue, 08 Jan 2013 15:07:18 +0530 Message-id: <1357637838-10500-1-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCLMWRmVeSWpSXmKPExsWyRsSkVtfk+esAg+kPLSymHP7C4sDocefa HrYAxigum5TUnMyy1CJ9uwSujPl/zrEXvOSuWLFkOWsD4zXOLkZODgkBE4lfHTcYIWwxiQv3 1rN1MXJxCAksZZT4e/gDI0xR7+anzBCJ6YwSh6f9ZIFwVjFJ3PjUxw5SxSagK9H0dhdYh4iA hMSv/qtANgcHs0CNxN6F8SBhYQEHid1f94OVsAioSjw9MoMVxOYV8JC4cHIzE8QyBYk3t58x Q9QISHybfIgFZIyEgKzEpgNgN0gI7GGTOPXqNlS9pMTBFTdYJjAKLmBkWMUomlqQXFCclJ5r qFecmFtcmpeul5yfu4kRGFSn/z2T2sG4ssHiEKMAB6MSD++lmNcBQqyJZcWVuYcYJTiYlUR4 7fcBhXhTEiurUovy44tKc1KLDzH6AF0ykVlKNDkfGPB5JfGGxibmpsamlkZGZqamOISVxHkZ Tz0JEBJITyxJzU5NLUgtghnHxMEp1cDYFFRz+FlTcY7ja7+b1QfT+6/u/ddq69OU+bf4y6LV MbLiU9+12bu05nBkzpqoFB75oHESx3yTB0pePSLOMZN+MLN0O+a7rvui0MgfbVx242nyba4f x7qWr7sk1LHs0+RqXYcUIffobRWLWPtK3zZI/rn3cXnZt6oDr/d+0jv+4t485Zqzvy4rsRRn JBpqMRcVJwIAlN1cT1cCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsVy+t9jQV2T568DDL7P1LCYcvgLiwOjx51r e9gCGKMaGG0yUhNTUosUUvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJz gMYqKZQl5pQChQISi4uV9O0wTQgNcdO1gGmM0PUNCYLrMTJAAwlrGDPm/znHXvCSu2LFkuWs DYzXOLsYOTkkBEwkejc/ZYawxSQu3FvP1sXIxSEkMJ1R4vC0nywQziomiRuf+thBqtgEdCWa 3u5iBLFFBCQkfvVfBbI5OJgFaiT2LowHCQsLOEjs/rofrIRFQFXi6ZEZrCA2r4CHxIWTm5kg lilIvLn9jHkCI/cCRoZVjKKpBckFxUnpuYZ6xYm5xaV56XrJ+bmbGMEh+0xqB+PKBotDjAIc jEo8vJdiXgcIsSaWFVfmHmKU4GBWEuG13wcU4k1JrKxKLcqPLyrNSS0+xOgDtH0is5Rocj4w nvJK4g2NTcxNjU0tTSxMzCxxCCuJ8zKeehIgJJCeWJKanZpakFoEM46Jg1OqgVG78KDsIa2/ tbtCG7T7d79w4G0tWNERMoXZo/PDh5MrLT+6XPDdZiroW7e7mUHp91Kv16WBUjUm3t2J4QJW L62mfppnuPDKrJ2TUh7bf1qUpsu8wuTLw/UTwkwmT6s/vjFv3d/KnsdxDSt+R9y3W3dydeXB R08+C3Bne3rv+r/o1ZLOzRXN524qsRRnJBpqMRcVJwIA77ADY4YCAAA= X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQlKvkRER4V10fRzNHdbHiZ3n+vnIeWuOQc3vSfV78ZAY4sCsUxsRm1P85jy4LxKA8hLyf61 This patch enables Vbus required for USB 2.0 controller. Signed-off-by: Vivek Gautam Signed-off-by: Rajeshwari Shinde --- Changes from v3: - Rebased on top of u-boot-samsung/master. Changes from v2: - Rebased on top of u-boot-usb/next - Enclosed the function definition for board_usb_vbus_init() inside "CONFIG_USB_EHCI_EXYNOS" Changes from v1: - Using the old school method of setting up gpio instead of using the pinmux method, since the required gpio line here is board specific. board/samsung/smdk5250/smdk5250.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 73c3ec0..d80f75d 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -35,12 +35,31 @@ DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_USB_EHCI_EXYNOS +int board_usb_vbus_init(void) +{ + struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *) + samsung_get_base_gpio_part1(); + + /* Enable VBUS power switch */ + s5p_gpio_direction_output(&gpio1->x2, 6, 1); + + /* VBUS turn ON time */ + mdelay(3); + + return 0; +} +#endif + int board_init(void) { gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); #ifdef CONFIG_EXYNOS_SPI spi_init(); #endif +#ifdef CONFIG_USB_EHCI_EXYNOS + board_usb_vbus_init(); +#endif return 0; }