From patchwork Fri Nov 21 01:26:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suriyan Ramasami X-Patchwork-Id: 412933 X-Patchwork-Delegate: promsoft@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 67BC114011E for ; Fri, 21 Nov 2014 12:26:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D5BDE4B81C; Fri, 21 Nov 2014 02:26:56 +0100 (CET) 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 9b9JPVd4oxh5; Fri, 21 Nov 2014 02:26:56 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 280334B810; Fri, 21 Nov 2014 02:26:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5455B4B7F3 for ; Fri, 21 Nov 2014 02:26:46 +0100 (CET) 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 09H--HVbH8IT for ; Fri, 21 Nov 2014 02:26:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by theia.denx.de (Postfix) with ESMTPS id 83A424B7F9 for ; Fri, 21 Nov 2014 02:26:41 +0100 (CET) Received: by mail-pa0-f41.google.com with SMTP id rd3so3718891pab.14 for ; Thu, 20 Nov 2014 17:26:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RELRlSrw+kV6oi2GEGlwTEjJZCE0smDM5blvmr+vHQY=; b=EqQjNiyZAE3GGmzpt+BttDzhOUWIMtvhip7OW5rLmTNoM9BkX6fuF8Zpfu/a/npmsM h2f73AvmQCn05XwXitC9j35iXnYEZSuL4DlWto3F7aOKuiTlNIc5xhBN6QFfxDj+LpOG A2mDialiNr4v0UY/2qbfSY91aGWlcXXkZa8Nbku2dSVyPv135UvED0e4iCH+hbRYdDSn fD0OQ2iOJ/3S0528yCgZi8Wr/frj7QAMkwbGfdB5Q0hkK8a3OXb092hzv10ADsuj+doV a/geIDnMjcIopLewb5rEzXB+s5QeH0lGd53ovxLztqrfGC+XeiDyKlHdwIluw8rEEaLT 0qjw== X-Received: by 10.66.141.165 with SMTP id rp5mr1878621pab.121.1416533199099; Thu, 20 Nov 2014 17:26:39 -0800 (PST) Received: from Stealth.localdomain ([73.170.223.86]) by mx.google.com with ESMTPSA id pc8sm3140545pdb.54.2014.11.20.17.26.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Nov 2014 17:26:38 -0800 (PST) From: Suriyan Ramasami To: Przemyslaw Marczak Date: Thu, 20 Nov 2014 17:26:30 -0800 Message-Id: <1416533190-10662-2-git-send-email-suriyan.r@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1416533190-10662-1-git-send-email-suriyan.r@gmail.com> References: <1416533190-10662-1-git-send-email-suriyan.r@gmail.com> Cc: Suriyan Ramasami , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 2/2] odroid: usbhost - Add missing gpio_request call X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 The USB host code was missing gpio_request() calls before using the gpio functions, causing errors to be printed out. As a side note calls to max77686_set_buck_mode(OPMODE_OFF/OPMODE_ON) have been removed, as they did not have any effect. This is as per Przemyslaw: I looked into the documentation and there is a "ENB8" pin in PMIC package. This pin allows steering BUCK8 ON/OFF by the hardware. If ENB8 is set to low then you can do on/off. If high, then you cannot change its state by I2C write, which seems to be the case with the Odroids. Signed-off-by: Suriyan Ramasami Acked-by: Przemyslaw Marczak --- Changes in v2: - Add comment why max77686_set_buck_mode() has been removed Series-changes: 1 - Added gpio_request() call in board_gpio_init() board/samsung/odroid/odroid.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index f7396ab..a2c008e 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -382,6 +382,17 @@ static void board_gpio_init(void) gpio_set_pull(EXYNOS4X12_GPIO_X31, S5P_GPIO_PULL_UP); gpio_set_drv(EXYNOS4X12_GPIO_X31, S5P_GPIO_DRV_4X); gpio_direction_input(EXYNOS4X12_GPIO_X31); + +#ifdef CONFIG_CMD_USB + /* USB3503A Reference frequency */ + gpio_request(EXYNOS4X12_GPIO_X30, "USB3503A RefFreq"); + + /* USB3503A Connect */ + gpio_request(EXYNOS4X12_GPIO_X34, "USB3503A Connect"); + + /* USB3503A Reset */ + gpio_request(EXYNOS4X12_GPIO_X35, "USB3503A Reset"); +#endif } static int pmic_init_max77686(void) @@ -489,10 +500,8 @@ int board_usb_init(int index, enum usb_init_type init) p_pmic = pmic_get("MAX77686_PMIC"); if (p_pmic && !pmic_probe(p_pmic)) { - max77686_set_buck_mode(p_pmic, 8, OPMODE_OFF); max77686_set_buck_voltage(p_pmic, 8, 750000); max77686_set_buck_voltage(p_pmic, 8, 3300000); - max77686_set_buck_mode(p_pmic, 8, OPMODE_ON); } #endif