From patchwork Fri Aug 2 12:33:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 1141173 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="0FQz3jlD"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 460RSV6bbgz9sML for ; Fri, 2 Aug 2019 22:34:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 60EFAC21DCA; Fri, 2 Aug 2019 12:34:17 +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=2.5 required=5.0 tests=DRUGS_MUSCLE, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 85D3DC21E6A; Fri, 2 Aug 2019 12:33:55 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CB017C21C6A; Fri, 2 Aug 2019 12:33:52 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id 6C142C21D8E for ; Fri, 2 Aug 2019 12:33:52 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x72CWJUR001982; Fri, 2 Aug 2019 14:33:46 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=X81cit6DSAdUH2M1V3lsnYfYhMnzTBMvsz5JDAuGXyI=; b=0FQz3jlDu8tleH1JAaB4lkM3FKP9wJLoBcuraIWsPs9Ps7cwgijG1NEYrtrLWFNLq9WZ jWAfaca349sQXuJDWaCoBc4XEu148Px1+aEjBoGR47hSdWFG4qTfMEWexjLPAeuzmVb1 lRngh5jI2s84jl5RVHTBJyTloWizqyqaJtd1nlDOdevfX5109YpXkjSHJPXZZb8WMm5w bhH4GfCTwVKN2rkG9X+ZcApD3wevo9JQUkeKRVK6RSPthS6/pqCsUwRYXyd+uzCydES0 wB0hta8QN8NhOa4qnAqp3VFrIAh4NH/xwhCjhoe5nITxk2GPtnRGzg/WmZD0iFQZaFVy bA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2u2jp4um5q-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 02 Aug 2019 14:33:46 +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 1031631; Fri, 2 Aug 2019 12:33:46 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id E9ABB2C075F; Fri, 2 Aug 2019 14:33:45 +0200 (CEST) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 2 Aug 2019 14:33:45 +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:45 +0200 From: Patrick Delaunay To: Date: Fri, 2 Aug 2019 14:33:37 +0200 Message-ID: <1564749223-29298-1-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 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 0/5] usb: host: dwc2: use driver model for PHY and CLOCK 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" In this serie I update the DWC2 host driver to use the device tree information and the associated PHY and CLOCK drivers when they are available. I test this serie on stm32mp157c-ev1 board; The U-CLASS are provided by: - PHY by USBPHYC driver = ./drivers/phy/phy-stm32-usbphyc.c - CLOCK by RCC clock driver = drivers/clk/clk_stm32mp1.c - RESET by RCC reset driver = drivers/reset/stm32-reset.c And I activate the configuration +CONFIG_USB_DWC2=y PS: it is not the default configuration to avoid conflict with gadget driver To solve a binding issue, I also deactivate the gadget support: by default only one driver is bound to theusbotg_hs node with "snps,dwc2" compatible, and today it is the device one (the first in the driver list). I also need to deactivate hnp-srp support with: &usbotg_hs { /* need to disable ONLY for HOST support */ hnp-srp-disable; }; WARNING: OTG with device or host support is not correctly handle by DWC2 driver (see example for dynamic OTG role in DWC3 driver). The tests executed on the stm32mp157c-ev1 target: STM32MP> usb start starting USB... Bus usb-otg@49000000: USB DWC2 Bus usbh-ehci@5800d000: USB EHCI 1.00 scanning bus usb-otg@49000000 for devices... 2 USB Device(s) found scanning bus usbh-ehci@5800d000 for devices... 3 USB Device(s) found scanning usb for storage devices... 2 Storage Device(s) found STM32MP> usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) | U-Boot Root Hub | +-2 Mass Storage (480 Mb/s, 300mA) Verbatim STORE N GO 070731C8ACD7EE97 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 2mA) | +-3 Mass Storage (480 Mb/s, 500mA) Generic USB Storage STM32MP> ls usb 0 4096 . 4096 .. 16384 lost+found 4096 record 1490212 xipImage 21058006 vmlinux STM32MP> load usb 0 0xC0000000 vmlinux 21058006 bytes read in 10851 ms (1.9 MiB/s) Patrick Delaunay (5): usb: host: dwc2: add phy support usb: host: dwc2: add support for clk usb: host: dwc2: force reset assert usb: host: dwc2: add usb33d supply support for stm32mp1 usb: host: dwc2: add trace to have clean usb start drivers/usb/host/dwc2.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-)