From patchwork Thu Jan 2 09:41:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inderpal Singh X-Patchwork-Id: 306093 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9DD732C0095 for ; Thu, 2 Jan 2014 20:49:59 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 246944B13D; Thu, 2 Jan 2014 10:49:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zKwToyOgeA-g; Thu, 2 Jan 2014 10:49:57 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59B9E4B1E9; Thu, 2 Jan 2014 10:49:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EAAFB4B1E9 for ; Thu, 2 Jan 2014 10:49:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xPjSXBxlYrng for ; Thu, 2 Jan 2014 10:49:45 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by theia.denx.de (Postfix) with ESMTPS id 4ACA54B13D for ; Thu, 2 Jan 2014 10:49:35 +0100 (CET) Received: by mail-pb0-f51.google.com with SMTP id up15so14359482pbc.10 for ; Thu, 02 Jan 2014 01:49:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ln+IhR3A7LWm9WyYQ8/u/qolsH1TTa9a8peuewWr1Ns=; b=huoI+DBto7xGafdJkmMVi0s9nmERcbAuYxseo314AeRPElPG4skwQJf8H9Q9hu/sfM Nd44/zdfk/9RagcFr2y7GluVWm+RKFOVpsuhemAXD6L0762SU5UOhmwIoYpridD0PF5v 31sJCg5e38OgY1hPdAiCNZua5ZBEL7DjOsqJ7+0sOJNjkuoFtAeCPEHt3XAtDnRNzBrs SMdya6q6ioslBSZQqMzT+bYzZieIJUEGOaruI0MceUDDe26tYk4OZcMv4w9NggSUVGPK WiPoKYiUPh6wr9qOiCGmUUtF6ASC3Ua5g4Gz6GDxnN8NApwZDqjD8fKyToza31RjT130 15Ng== X-Gm-Message-State: ALoCoQlZByoFdnz7CKQ4DrBPQHSHpW6+VEvyoMZuwpVE9Edy29J+z2jmrdnRY3NcTsu8tKUqAdpD X-Received: by 10.66.232.40 with SMTP id tl8mr88277083pac.137.1388655744449; Thu, 02 Jan 2014 01:42:24 -0800 (PST) Received: from inder-ubuntu.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id un5sm39874333pab.3.2014.01.02.01.42.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Jan 2014 01:42:23 -0800 (PST) From: Inderpal Singh To: u-boot@lists.denx.de Date: Thu, 2 Jan 2014 15:11:59 +0530 Message-Id: <1388655719-8851-3-git-send-email-inderpal.singh@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1388655719-8851-1-git-send-email-inderpal.singh@linaro.org> References: <1388655719-8851-1-git-send-email-inderpal.singh@linaro.org> Cc: marex@denx.de Subject: [U-Boot] [PATCH v2 2/2] usb: exynos5: arndale: Add network support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Arndale board has AX88760, which is USB 2.0 Hub & USB 2.0 Ethernet Combo controller, connected to HSIC Phy of USB host controller via USB3503 hub. This patch implements a board specific board_usb_init function in ehci driver to perform reset sequence for USB3503 hub and enables the relevant config options for network to work. Signed-off-by: Inderpal Singh Signed-off-by: Chander Kashyap --- board/samsung/arndale/arndale.c | 13 +++++++++++++ drivers/usb/host/ehci-exynos.c | 10 ++++++++++ include/configs/arndale.h | 4 ++++ 3 files changed, 27 insertions(+) diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index 052fecd..deca348 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -7,10 +7,23 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_USB_EHCI_EXYNOS +void exynos_board_usb_init(int value) +{ + struct exynos5_gpio_part1 *gpio = (struct exynos5_gpio_part1 *) + samsung_get_base_gpio_part1(); + + /* Configure gpios for usb 3503 hub's reset and connect */ + s5p_gpio_direction_output(&gpio->x3, 5, value); + s5p_gpio_direction_output(&gpio->d1, 7, value); +} +#endif + int board_init(void) { gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 88e6466..4be6a60 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -175,6 +175,12 @@ static void reset_usb_phy(struct exynos_usb_phy *usb) set_usbhost_phy_ctrl(POWER_USB_HOST_PHY_CTRL_DISABLE); } +inline void __exynos_board_usb_init(int value) +{ +} +void exynos_board_usb_init(int) + __attribute__((weak, alias("__exynos_board_usb_init"))); + /* * EHCI-initialization * Create the appropriate control structures to manage @@ -201,8 +207,12 @@ int ehci_hcd_init(int index, enum usb_init_type init, gpio_direction_output(ctx->vbus_gpio.gpio, 1); #endif + exynos_board_usb_init(0); + setup_usb_phy(ctx->usb); + exynos_board_usb_init(1); + *hccr = ctx->hcd; *hcor = (struct ehci_hcor *)((uint32_t) *hccr + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); diff --git a/include/configs/arndale.h b/include/configs/arndale.h index b7fb29e..eda0e4f 100644 --- a/include/configs/arndale.h +++ b/include/configs/arndale.h @@ -116,6 +116,10 @@ #define CONFIG_USB_EHCI_EXYNOS #define CONFIG_USB_STORAGE +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_ASIX + /* MMC SPL */ #define CONFIG_EXYNOS_SPL #define CONFIG_SPL