From patchwork Wed Aug 17 07:43:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 659996 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 3sDh7z70Dxz9sXx for ; Wed, 17 Aug 2016 17:44:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=hOywFmyH; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0C764A7541; Wed, 17 Aug 2016 09:44:05 +0200 (CEST) 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 IbAA5wZrorOa; Wed, 17 Aug 2016 09:44:04 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C625FA7552; Wed, 17 Aug 2016 09:43:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BCB664BD3D for ; Wed, 17 Aug 2016 09:43:46 +0200 (CEST) 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 AgjgbKMT1yHQ for ; Wed, 17 Aug 2016 09:43:46 +0200 (CEST) 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-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by theia.denx.de (Postfix) with ESMTPS id 12C394BA29 for ; Wed, 17 Aug 2016 09:43:32 +0200 (CEST) Received: by mail-pf0-f193.google.com with SMTP id h186so7171294pfg.2 for ; Wed, 17 Aug 2016 00:43:32 -0700 (PDT) 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=5qqJpH8LOFDmS4DBaOon/yadQEFqxyRmgNCc76BRC0s=; b=hOywFmyHFDwgqIaQ0UrHhzX4dPgf5JnglJzAMqEpmqbYAAdiXTQXhR6paNauoOG6Bq t8afvsr/eHPrWVaOATIWpxlgaTEVsd2V4UH1Zn6kOk9svk62IaRPoMz6lCAW6VnIOnz6 MG94zhyKO9PT49DHhvplp9jPz40Ng9Lu63+FH5qSS+1HMzY7KD9UqPB9FS8PM+B98duX Qx78Qh7+954QLLyxCjHG0T38oHgcMiliRN7BVzQ8nOOborrd3LwHEhA7oACdQx6G32oX oAa0BB77zTVjZLsjGNBeNSlUozNFBUctixdG4iUkDJ2uPSJh76oVzKJFKnuYJmVDyhxv eqLg== 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=5qqJpH8LOFDmS4DBaOon/yadQEFqxyRmgNCc76BRC0s=; b=W56m6l58pei7gNVQX+0xGyOzaftBBFptHecNPZVe08yUgnZdfwTOxV3752hf8fusSC 8TIujDDFqN9lrFK3ku1dkaoUqWC0p7o9HNN55R1W6bIUGIMWQle7KWXZI4naRxBv7OwT Td0ifF+J5sF/huenbg6sUU+V/0sRWHQB2QmlRaJ/xda9jUDHJckaT9lIlMK76Tmz4ame BE9VcnKTjo5fMZLsPApXD8uXEp7GeA6K7qUucDzq6D335vmvC52lrGL6jgRfG6xrvm8H n40cbr2ovabpco/cGruxI2n1Rogqijdqnfgs1ArSzxFpiCgiAc5QWoK8pBU5jlDz941o 8cOw== X-Gm-Message-State: AEkooutgeXmY8TSF1iMc7YovTfQs3HA5klFyRqFcgFSMtcOTQ13j8IfUEYQBvVwxCW2bFA== X-Received: by 10.98.62.65 with SMTP id l62mr679346pfa.2.1471419810779; Wed, 17 Aug 2016 00:43:30 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id t80sm44590725pfj.38.2016.08.17.00.43.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Aug 2016 00:43:30 -0700 (PDT) From: Kever Yang To: sjg@chromium.org Date: Wed, 17 Aug 2016 15:43:04 +0800 Message-Id: <1471419785-32571-7-git-send-email-kever.yang@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471419785-32571-1-git-send-email-kever.yang@rock-chips.com> References: <1471419785-32571-1-git-send-email-kever.yang@rock-chips.com> Cc: frank.wang@rock-chips.com, liuyi@rock-chips.com, u-boot@lists.denx.de, wulf@rock-chips.com, daniel.meng@rock-chips.com Subject: [U-Boot] [PATCH 6/7] board: evb-rk3399: enable usb 2.0 host vbus power on board_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" rk3399 using one gpio control signal for two usb 2.0 host port, it's better to enable the power in board file instead of in usb driver. Signed-off-by: Kever Yang --- board/rockchip/evb_rk3399/evb-rk3399.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c index cd61f59..12a49ee 100644 --- a/board/rockchip/evb_rk3399/evb-rk3399.c +++ b/board/rockchip/evb_rk3399/evb-rk3399.c @@ -9,12 +9,13 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - struct udevice *pinctrl; + struct udevice *pinctrl, *regulator; int ret; /* @@ -40,6 +41,19 @@ int board_init(void) goto out; } + ret = uclass_get_device_by_name(UCLASS_REGULATOR, + "vcc5v0-host-en", ®ulator); + if (ret) { + debug("%s vcc5v0-host-en init fail!\n", __func__); + goto out; + } + + ret = regulator_set_enable(regulator, true); + if (ret) { + debug("%s vcc5v0-host-en set fail!\n", __func__); + goto out; + } + out: return 0; }