From patchwork Fri Aug 2 12:33:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1141177 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=st.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.b="L83QexpN"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 460RTk64JKz9sBF for ; Fri, 2 Aug 2019 22:35:54 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 55D6DC21EB4; Fri, 2 Aug 2019 12:34:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2A4D4C21E44; Fri, 2 Aug 2019 12:34:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8E096C21E74; Fri, 2 Aug 2019 12:33:59 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) by lists.denx.de (Postfix) with ESMTPS id 02CE3C21C6A for ; Fri, 2 Aug 2019 12:33:55 +0000 (UTC) Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x72CQZFt031144; Fri, 2 Aug 2019 14:33:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=T8vcUmncndOV6X8CqhTdCOVkpxVcY5LWO7iz3xC7Jhw=; b=L83QexpNaX+u0OgYOcQ53yK0u/zEj+Jr5CUp3RTRx50bZ5tVPQnNrRrW0ZWcB2L8s+l3 BElfA/grt7aS9ZOeymdl36zMsUdwD0I0EA2286T5JQhwjFj/59gUt9uPe/x5FokrUFSP cEVrOc8u9lrOmzygxDmtREaTDDSQDnDowTXiKnedYRPs/39/mon+0HeHnnMmyCrDbdS+ bj2mmTMNLDMcmW5kknsuVdEwzynwT/pj1bYy6maKvziw2iYBQPsgifbiSKmE/uPNLRSM 5IJ7IgSKBrAE8R4w2lGkjNCZOL5NDWwn3ExBVLGxMvFYMPGWjuw7ATlwfGMrOEpkaeJj +Q== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2u3vd0789d-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 02 Aug 2019 14:33:51 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7BD9834; Fri, 2 Aug 2019 12:33:50 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 710842C075F; Fri, 2 Aug 2019 14:33:50 +0200 (CEST) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 2 Aug 2019 14:33:50 +0200 Received: from localhost (10.201.23.85) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 2 Aug 2019 14:33:49 +0200 From: Patrick Delaunay To: Date: Fri, 2 Aug 2019 14:33:41 +0200 Message-ID: <1564749223-29298-5-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564749223-29298-1-git-send-email-patrick.delaunay@st.com> References: <1564749223-29298-1-git-send-email-patrick.delaunay@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-08-02_06:, , signatures=0 Cc: Marek Vasut , U-Boot STM32 , Sven Schwermer Subject: [U-Boot] [PATCH 4/5] usb: host: dwc2: add usb33d supply support for stm32mp1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Enable the usb33d-supply on STM32MP1 SoCs (with "st,stm32mp1-hsotg" compatible), it is the external VBUS and ID sensing comparators supply needed to perform OTG operation. Signed-off-by: Patrick Delaunay --- drivers/usb/host/dwc2.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index 836f706..1639bf2 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -1411,6 +1411,24 @@ static int dwc2_usb_probe(struct udevice *dev) if (ret) return ret; + if (CONFIG_IS_ENABLED(ARCH_STM32MP) && + device_is_compatible(dev, "st,stm32mp1-hsotg")) { + struct udevice *usb33d_supply; + + ret = device_get_supply_regulator(dev, "usb33d-supply", + &usb33d_supply); + if (ret) { + dev_err(dev, + "can't get voltage level detector supply\n"); + } else { + ret = regulator_set_enable(usb33d_supply, true); + if (ret) { + dev_err(dev, + "can't enable voltage level detector supply\n"); + } + } + } + return dwc2_init_common(dev, priv); }