From patchwork Mon Oct 14 08:00:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1176051 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="inv8ceNi"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46s9z623Zxz9sPd for ; Mon, 14 Oct 2019 19:02:58 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id CFD8FC21E44; Mon, 14 Oct 2019 08:01:16 +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 A3084C21D72; Mon, 14 Oct 2019 08:01:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AE69BC21C4A; Mon, 14 Oct 2019 08:00:48 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id 80E06C21DF9 for ; Mon, 14 Oct 2019 08:00:46 +0000 (UTC) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9E7tkto023120; Mon, 14 Oct 2019 10:00:44 +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=E0SUAKd7kDijgDsZj0s6Qmu0hNQF6dEuFeQhlDOdoh0=; b=inv8ceNi6NgruO9lSeRqjKLey6KDxCDs8iZ8bE/ZfcR5Y5poZnXs/V/itLgg5tc2732Z gUpYFsS0wJTQHjsTNdelnS5+7WcJQQYjHzN+Mqm5hvPnyVY3Ru8GHij6Oj8sc6f9NYjn o/WnPucL2zvonz51RFrcy+Qb1GYW6lNZvoS/kZRP0HrsZGIffISY4kI6eedNTpAUgWmQ s41t1I7p0SGi9r/MOLFyp3rwIh/0GTH664r/tH1cH1Bjten8IeJWe0ffmOCHQfj2YnhN ZkiHUOmwp9jiphT3gM44NCKGRNoWJc3VqF8VKOFJo2moqrQhGZShTxtfYRvVhbC2IO6c DA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2vk3y9hbab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2019 10:00:44 +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 0951410002A; Mon, 14 Oct 2019 10:00:43 +0200 (CEST) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id F3DCD2B1867; Mon, 14 Oct 2019 10:00:42 +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; Mon, 14 Oct 2019 10:00:42 +0200 Received: from localhost (10.201.21.107) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 14 Oct 2019 10:00:42 +0200 From: Patrick Delaunay To: Date: Mon, 14 Oct 2019 10:00:24 +0200 Message-ID: <20191014080025.11245-5-patrick.delaunay@st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191014080025.11245-1-patrick.delaunay@st.com> References: <20191014080025.11245-1-patrick.delaunay@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.21.107] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-14_06:2019-10-10,2019-10-14 signatures=0 Cc: Marek Vasut , U-Boot STM32 , Michal Suchanek , Sven Schwermer Subject: [U-Boot] [RESEND 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 3086411fc4..5b499abded 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -1414,6 +1414,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); }