From patchwork Thu Jan 3 15:22:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 13780 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 3DB2C23E03 for ; Thu, 3 Jan 2013 15:16:24 +0000 (UTC) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by fiordland.canonical.com (Postfix) with ESMTP id C37AFA19553 for ; Thu, 3 Jan 2013 15:16:23 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id f13so15394846vcb.4 for ; Thu, 03 Jan 2013 07:16:23 -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=FR7IRIdMctKyFZsuZ2Ib+YQCDW5q+9Zvi+Z+MsF2ThA=; b=cKeVZUPwiG1w5orwOkr52mG6ijoharMl+yymkVtjK7QD//ejU5WeA5oPMZsuj1WY76 7bUUPO6G/RMHeOgXrtkp4nwn8z/pMgbDOi8cbil93iBCXvJx1i2YuPZn2uBjM6JPdRyH PseH4fwXYuGz8OB3GopA0HkgC6t7lYXOrfyGzVxUEcCeYeRJRvO5l53IkulttZ2xoN4H L/Ct+R0wypDGYDLTTp8BTV9XPDWy3koDWNn+3NVdJlwotx8a9eYd21jGlp4vqldEdsZG JYHnJlVHJj5cmJhEakdAfN8pBgn1a7lQuO8R1ueY3+Yn5GmRwTiTeF1bohLtcYLOYZhG ivlg== X-Received: by 10.52.18.147 with SMTP id w19mr64817790vdd.94.1357226183255; Thu, 03 Jan 2013 07:16:23 -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 st5csp95998veb; Thu, 3 Jan 2013 07:16:22 -0800 (PST) X-Received: by 10.66.80.70 with SMTP id p6mr146580658pax.23.1357226182079; Thu, 03 Jan 2013 07:16:22 -0800 (PST) Received: from mailout1.samsung.com (mailout1.samsung.com. [203.254.224.24]) by mx.google.com with ESMTP id ax10si47748192pbd.134.2013.01.03.07.16.21; Thu, 03 Jan 2013 07:16:22 -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 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 <0MG2001ZI2F8LA10@mailout1.samsung.com> for patches@linaro.org; Fri, 04 Jan 2013 00:16:20 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F2.FE.12699.4C0A5E05; Fri, 04 Jan 2013 00:16:20 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-76-50e5a0c44431 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 62.FE.12699.3C0A5E05; Fri, 04 Jan 2013 00:16:20 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.73.134]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MG20052C2EF4I40@mmp1.samsung.com> for patches@linaro.org; Fri, 04 Jan 2013 00:16:19 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de Cc: marex@denx.de, patches@linaro.org, sjg@chromium.org, kmpark@infradead.org, rajeshwari.s@samsung.com Subject: [PATCH v2] SMDK5250: Enable VBus for USB 2.0 controller Date: Thu, 03 Jan 2013 20:52:40 +0530 Message-id: <1357226560-13573-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+NgFjrKLMWRmVeSWpSXmKPExsWyRsSkRvfIgqcBBt0/JCymHP7C4sDocefa HrYAxigum5TUnMyy1CJ9uwSujOM3t7EUPOCsOD7/DFsD41/2LkZODgkBE4mtj98xQdhiEhfu rWfrYuTiEBJYyijx7esZFpiiphP9LBCJRYwSzXP/MUM4q5gkzi+7xApSxSagK9H0dhcjiC0i ICHxq/8qmM0skCmx98xPsBphAQeJnXsmMYPYLAKqEnu6/oHV8Ap4SFzfMx1qm4LEm9vPoGoE JL5NPgQU5wCKy0psOgC2V0JgB5vEnjnfGSHqJSUOrrjBMoFRcAEjwypG0dSC5ILipPRcI73i xNzi0rx0veT83E2MwLA6/e+Z9A7GVQ0WhxgFOBiVeHgZ658ECLEmlhVX5h5ilOBgVhLhnZ3/ NECINyWxsiq1KD++qDQntfgQow/QJROZpUST84Ehn1cSb2hsYm5qbGppZGRmaopDWEmcl/EU 0HiB9MSS1OzU1ILUIphxTBycUg2M4l58d75tY1U7+v5ztfGaVfUrBb7/v/pK+69s9RJRS+e5 egEBKz5efvuv9JOEeBHn168BZhqK3oECK036fJdvUPKSf2jkGZld4xLKlufcbOaz/t4LKfGb NbrXl9s2GTg8P1q5KdRJbXo7Q1Lmui+GynIy/32eyh9zWDvpxML7SaqhKWsuNzxSYinOSDTU Yi4qTgQAsYLhVVgCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsVy+t9jAd0jC54GGHRsZ7OYcvgLiwOjx51r e9gCGKMaGG0yUhNTUosUUvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJz gMYqKZQl5pQChQISi4uV9O0wTQgNcdO1gGmM0PUNCYLrMTJAAwlrGDOO39zGUvCAs+L4/DNs DYx/2bsYOTkkBEwkmk70s0DYYhIX7q1n62Lk4hASWMQo0Tz3HzOEs4pJ4vyyS6wgVWwCuhJN b3cxgtgiAhISv/qvgtnMApkSe8/8BKsRFnCQ2LlnEjOIzSKgKrGn6x9YDa+Ah8T1PdOhtilI vLn9jHkCI/cCRoZVjKKpBckFxUnpuUZ6xYm5xaV56XrJ+bmbGMFB+0x6B+OqBotDjAIcjEo8 vIz1TwKEWBPLiitzDzFKcDArifDOzn8aIMSbklhZlVqUH19UmpNafIjRB2j7RGYp0eR8YETl lcQbGpuYmxqbWppYmJhZ4hBWEudlPAU0XiA9sSQ1OzW1ILUIZhwTB6dUA2Pj5g5xkcaHU78G vs+xehJ9fENGH9823ncTztmERlXlftTmEfFd4cEe07KklXFOs++reRdeB74POqCw6PWClGIf 8SPSC3/db3FJsuk+uOv7RcnVlQdvBayeF/JI5RKzwc3ptTbXfxn/fWaXNU34sey/irTXEj2p z21rL+m8PDXvef5flzdHz8xRYinOSDTUYi4qTgQAmlU5zIcCAAA= X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnAxqzJIkVTworX91eq/088INwUR+tagVSdjhoaRntZVfeIL5K71dtNSlyQDAQeGtJErxXL This patch enables Vbus required for USB 2.0 controller. Signed-off-by: Vivek Gautam Signed-off-by: Rajeshwari Shinde --- 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 | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 268b42c..fad58f3 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -35,12 +35,29 @@ DECLARE_GLOBAL_DATA_PTR; +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; +} + 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; }