From patchwork Tue Nov 8 10:13:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 692234 X-Patchwork-Delegate: sjg@chromium.org 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 3tClXv38FBz9vFP for ; Tue, 8 Nov 2016 21:14:39 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="osEMQ/IG"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 80821B384F; Tue, 8 Nov 2016 11:14:26 +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 lX6yfCy-DLao; Tue, 8 Nov 2016 11:14:26 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7821BA7629; Tue, 8 Nov 2016 11:14:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20D8FA75DE for ; Tue, 8 Nov 2016 11:14:09 +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 ndiT5j6XhZzn for ; Tue, 8 Nov 2016 11:14:09 +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-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by theia.denx.de (Postfix) with ESMTPS id C8FCFB3835 for ; Tue, 8 Nov 2016 11:14:02 +0100 (CET) Received: by mail-pf0-f194.google.com with SMTP id n85so18895127pfi.3 for ; Tue, 08 Nov 2016 02:14:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=mVTwVaYGSffWsgdnVDgMd0spVmZUt9UrWiDwcp1KPCk=; b=osEMQ/IGAIfIN1W7JI7eXQs24YpJ86OpedgWWH5mIiOgVY7NiGouTawtkJA7kW/+Fx n6DdHTFgWAUYdKBr1QgVJ/Nkr2Ncy696x0jvK6DG87s307RX5hOLiDyYl4qkFZ6vnIXq lwG4uhvQ32eHrJ0LBqJcZjzyhcz0nyEI2nhObq53ZcfuieDb+E4/o4nf5jZlVF/+uOXB a/dPsGg4zIQUrdLImq46vajHiU8K4lZr8iSBWBIb1n0JbjKG+0issRvqv7jo70L9H/9G xJXwspvm6f0ASdy9cvz3ceQ/TuyKKJzBgIsklncKqWm4xvYtKtj2Sh1xHUDlaNeZxhhN kXiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=mVTwVaYGSffWsgdnVDgMd0spVmZUt9UrWiDwcp1KPCk=; b=FlCSNui9KnlsXCvvy8pEnDxzQE69v9ZBfkN7F8W0wScjmHEescv4agoSBrhpLcmcwi L25hoDMa00v1AAXj2/KAAuc/2M4xJbz2vzshnc423QUMQwhlJ2XrHceAmufo0Cw3L9t+ 4RQRrr1Uw3yldmNHLlQGrdSKSG5BoWJXGXtdfRQ3/QK/Z7gsUpr5+RF/PSSYR+1cDr0+ J51CI07bNd0PsYVcn1WFymhngC8BUN+FrrC31isA/QXYN2vMTpcO0MlXABlZwVzv9sQ1 WHpncKhLhdIUmT8QCIM1oznTp5SJ9EHUqEMDDkyFTW3sKSL6SJaKGdS9mGefbWP7roru 470w== X-Gm-Message-State: ABUngvftCiqELHRB79qfTutFkyAJMIapgEewaV4g42dk/OkBbjB3XO8IveyrTjyv2p1RIw== X-Received: by 10.98.149.140 with SMTP id c12mr22244965pfk.100.1478600041212; Tue, 08 Nov 2016 02:14:01 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id y73sm4371575pfa.68.2016.11.08.02.13.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Nov 2016 02:14:00 -0800 (PST) From: Kever Yang To: sjg@chromium.org Date: Tue, 8 Nov 2016 18:13:42 +0800 Message-Id: <1478600022-18822-5-git-send-email-kever.yang@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478600022-18822-1-git-send-email-kever.yang@rock-chips.com> References: <1478600022-18822-1-git-send-email-kever.yang@rock-chips.com> Cc: u-boot@lists.denx.de, eddie.cai@rock-chips.com, Albert Aribaud Subject: [U-Boot] [PATCH 4/4] rk3036: enable the vbus regulator when borad_init X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" enable the vbus for usb host in board_init(). Signed-off-by: Kever Yang --- arch/arm/mach-rockchip/rk3036-board.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3036-board.c b/arch/arm/mach-rockchip/rk3036-board.c index bf2b268..90d3d33 100644 --- a/arch/arm/mach-rockchip/rk3036-board.c +++ b/arch/arm/mach-rockchip/rk3036-board.c @@ -16,6 +16,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -57,7 +58,26 @@ int board_late_init(void) int board_init(void) { + int ret; + struct udevice *regulator; + + ret = regulator_get_by_platname("vcc5v0_host", ®ulator); + if (ret) { + printf("%s vcc5v0_host init fail! ret %d\n", __func__, ret); + goto out; + } + + ret = regulator_set_enable(regulator, true); + if (ret) { + printf("%s vcc5v0-host enable fail!\n", __func__); + goto out; + } + return 0; +out: + printf("%s board ini error %x\n", __func__, ret); + + return ret; } int dram_init(void)