From patchwork Tue Jan 8 06:30:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 13902 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 A516823E21 for ; Tue, 8 Jan 2013 06:24:06 +0000 (UTC) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by fiordland.canonical.com (Postfix) with ESMTP id 16B6BA18CA2 for ; Tue, 8 Jan 2013 06:24:05 +0000 (UTC) Received: by mail-vb0-f47.google.com with SMTP id e21so43606vbm.34 for ; Mon, 07 Jan 2013 22:24:05 -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=rAITMa8S2HdBkJKTHEDyttT0+nPoQgtC7Jim9k5UyB8=; b=oFlff1HtySmxxa3lZbT9uDYCMR6GeVpfKpyRTqKMdCIUtpSlqZeHx/1JDoz92FUUHe w0krBP1AG0PpxGc1CmiXGYncNkyZ/JeCsTMwhvxnFszCJ1WQb2ZOWDqLqmse6UB0Dj2n uGlKGci0H0jpSvhZ18AIo6Shl6HHA/73hOgIBNzhhdYUIc0NkJfALDr6bcr+zlavHSVP 0q6pi7wbBavJyFbmcpG7JITpWDIM/gdA1ENFQ0PWd96FatIrpmIoq7HEliLnGC9v/aFN oaDf3xuU+LJ8s2LTPsdWvM3RwRetzsL1kUFQa1MCzbz837Xs3xpNdltp3VCCH9dhW+Z5 vaWA== X-Received: by 10.58.196.196 with SMTP id io4mr88154466vec.22.1357626245495; Mon, 07 Jan 2013 22:24:05 -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 st5csp96138veb; Mon, 7 Jan 2013 22:24:04 -0800 (PST) X-Received: by 10.68.253.1 with SMTP id zw1mr40541041pbc.98.1357626243374; Mon, 07 Jan 2013 22:24:03 -0800 (PST) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id ru9si61531626pbc.340.2013.01.07.22.24.02; Mon, 07 Jan 2013 22:24:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.33 as permitted sender) smtp.mail=gautam.vivek@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MGA009XKN3ATGL0@mailout3.samsung.com> for patches@linaro.org; Tue, 08 Jan 2013 15:24:01 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 1E.63.01231.18BBBE05; Tue, 08 Jan 2013 15:24:01 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-f0-50ebbb81ec4e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id AD.63.01231.18BBBE05; Tue, 08 Jan 2013 15:24:01 +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 <0MGA00K05N3ULAA0@mmp2.samsung.com> for patches@linaro.org; Tue, 08 Jan 2013 15:24:01 +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 Subject: [PATCH v3] SMDK5250: Enable VBus for USB 2.0 controller Date: Tue, 08 Jan 2013 12:00:49 +0530 Message-id: <1357626649-24515-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+NgFjrMLMWRmVeSWpSXmKPExsWyRsSkSrdx9+sAg851RhZTDn9hcWD0uHNt D1sAYxSXTUpqTmZZapG+XQJXxvk/uQWt3BW9SzIbGDs4uxg5OSQETCRO3fnDBmGLSVy4tx7I 5uIQEljKKPFn7iU2mKKPu1cxQySmM0rMef8KylnFJPH43152kCo2AV2Jpre7GEFsEQEJiV/9 V8FsZoFMiZcbPzCB2MICDhL7fp0Es1kEVCWW338GZvMKeEjsXHGJFWKbgsSb28+YIWoEJL5N PsTSxcgBFJeV2HQAbK+EwBY2iSkTX0HVS0ocXHGDZQKj4AJGhlWMoqkFyQXFSem5hnrFibnF pXnpesn5uZsYgSF1+t8zqR2MKxssDjEKcDAq8fBeinkdIMSaWFZcmXuIUYKDWUmE91YKUIg3 JbGyKrUoP76oNCe1+BCjD9AlE5mlRJPzgeGeVxJvaGxibmpsamlkZGZqikNYSZyX8dSTACGB 9MSS1OzU1ILUIphxTBycUg2MWnKJ59+dYw+KPPF7b/ekCiVvfqmG/y2GHBteZmkXpvcLile4 8y67eOzi/BDhA142nWsvKIVan5znFmQqwrTiv0aB181Lu1ZsupX1T/N/rPGW+b810/7ej5+6 7K/gjMeNV0IyWbbztG/6u9erbN/0crU2IYXAT5H8x5jnnFDZ5XDX8I/mlaYNSizFGYmGWsxF xYkAvJ1g8VYCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsVy+t9jQd3G3a8DDFqaNCymHP7C4sDocefa HrYAxqgGRpuM1MSU1CKF1Lzk/JTMvHRbJe/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wc oLFKCmWJOaVAoYDE4mIlfTtME0JD3HQtYBojdH1DguB6jAzQQMIaxozzf3ILWrkrepdkNjB2 cHYxcnJICJhIfNy9ihnCFpO4cG89WxcjF4eQwHRGiTnvXzFDOKuYJB7/28sOUsUmoCvR9HYX I4gtIiAh8av/KpjNLJAp8XLjByYQW1jAQWLfr5NgNouAqsTy+8/AbF4BD4mdKy6xQmxTkHhz +xnzBEbuBYwMqxhFUwuSC4qT0nMN9YoTc4tL89L1kvNzNzGCA/aZ1A7GlQ0WhxgFOBiVeHgv xbwOEGJNLCuuzD3EKMHBrCTCeysFKMSbklhZlVqUH19UmpNafIjRB2j7RGYp0eR8YDTllcQb GpuYmxqbWppYmJhZ4hBWEudlPPUkQEggPbEkNTs1tSC1CGYcEwenVAOjZPPfhyZMs3Zc8W/k /WO16Mf7HDHrQob5JgZW2cVWjsb9US6br4UH2jnrvb25fq/Nvvgcz/XyWYU2e/bGLcne8PzM 9gs/pxS+4Hxky7HgidfcY//XHTX3P/bzYDsP2+tlblyNUy6593z2vH3xdE/eg86cpNBbS76z 7dy9btX89TxtXDOuN98/rcRSnJFoqMVcVJwIAI6FFH2FAgAA X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQm/tRytuhyVZ8qYG18s4EtU0//fHjQDQYbD/xPYjRmD5HI8Qup320uUA8/lC6oKVpYz+kNn This patch enables Vbus required for USB 2.0 controller. Signed-off-by: Vivek Gautam Signed-off-by: Rajeshwari Shinde Acked-by: Simon Glass --- 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 a5816e4..cf7f801 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -60,9 +60,28 @@ static int smc9115_pre_init(void) } #endif +#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_USB_EHCI_EXYNOS + board_usb_vbus_init(); +#endif return 0; }