From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EA75C43334 for ; Mon, 18 Jul 2022 08:13:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4D7708400C; Mon, 18 Jul 2022 10:13:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="OsIFgrDV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D603283F81; Mon, 18 Jul 2022 10:13:32 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2076.outbound.protection.outlook.com [40.107.243.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7BCE08400C for ; Mon, 18 Jul 2022 10:13:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M0dJ8ck8SQe4P4bL0UHB6A9aeUCGJXJjrRxCbVzVKqU1xwJUyggViIDc7WzlSdjoijHSVpvrne0EAD//QPiioxJO5D6ZJ3/QVMKzbyCFhbRaUG38LhuMZy+2j6Ux2r+MhuGMbOFupLvp1WxI55owSGuAJw4eXSlSguCCe8ORq8oG6ezXqz/AODR1KoLcWSGYrVuu10reDgG3Rv94VW15pVfmaPe+lTyUMZhrbfiJ0AwSKIp8wVIBj/klONwb8tZ61fW6mNKsXLU3HvD4tdUfZfjdKLddLhsCOkM+dRAavjvx6/HVvAoQZZOwJ2YZp2Nq/x52g40s3J6LMK2gqfRHiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=URzdoPNmZJHxCqed4LhHKWV+WdPUsNNWX3q1We/Pr5I=; b=Cr+vKAFtmTJuAQkAalpma0KlCdDSkaEQ+Uv9J7bWV4CsooccbaaTXb2kurWF9endQwu/8P2LxwozW+i/NsvJAWcZNOx+GxIhZ99OcljF6Jf7k6rh4EUoan302wAoeM1N9BR8MR2FKVhHsjKDytxDw//ShcNd8tDd7x3Kn4ftrDU3fKorYeQWNeq55vw5a7LAzAyqgxUJ2dQNrTZvZJO1Dwr1l5Aift4WgPs5AAYS55uIWmkfiCcm3oyt/QgtobUXV6zg+rddow3+CCDrk7LsbnMoAOCLOVO+NI03ylribbyREoMQxWQg+t8+UqapUvflP3de11Uks1LQkpMmLwgN3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=URzdoPNmZJHxCqed4LhHKWV+WdPUsNNWX3q1We/Pr5I=; b=OsIFgrDVhv2jmBPj7navcF670N6nvmEoCUtQ2DycyMnyPUdBHNoui6OS1OKFTbazGjjVB4ymqqhPstBVXXNdja2PnXM8iSTY9yFwaP9rb8+ucUgoHcA82eOHnZ7rg3lzeObCYWRRgyYjDVowEjxFDIsDdZXn7iFAUNG4AJpXo8k= Received: from DM6PR01CA0010.prod.exchangelabs.com (2603:10b6:5:296::15) by BL3PR12MB6449.namprd12.prod.outlook.com (2603:10b6:208:3b8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21; Mon, 18 Jul 2022 08:13:27 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:5:296::4) by DM6PR01CA0010.outlook.office365.com (2603:10b6:5:296::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26 via Frontend Transport; Mon, 18 Jul 2022 08:13:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5438.12 via Frontend Transport; Mon, 18 Jul 2022 08:13:27 +0000 Received: from [10.254.241.52] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 18 Jul 2022 03:13:23 -0500 Message-ID: <147796d0-76af-c712-a426-1b3830691587@amd.com> Date: Mon, 18 Jul 2022 10:13:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: DWC3 host support Content-Language: en-US To: Marek Vasut , Angus Ainslie CC: U Boot , Michal Simek , References: <13226946-1652-f917-f580-e626f51c2525@denx.de> <0d799969-37a5-cafb-6d5d-8692dc5645c2@denx.de> From: Michal Simek In-Reply-To: <0d799969-37a5-cafb-6d5d-8692dc5645c2@denx.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a491d16-27f1-4f5c-4842-08da68956496 X-MS-TrafficTypeDiagnostic: BL3PR12MB6449:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G8k+oKopAz3Q6/3LeI6495BZ2QFJKHr0qpzRrUovm3OP0ue9FJCPQldx0YjefY6oEMwX1ZZXJh9g6CoRQy2qZpps4dsXM72ueeR1/UkbsdFLgBAwbTxkgtpQrsC0savn2SksFfhBWwyNPEg4vrCfELd5ZnUNvvUcEkZuiC5IgZ3g4qvDM0H+S2OT9XsCn1MxSERxeehbshF86eq4NjOQxCbekuqXz7QoOPhqreX4p4BdCixPyP5QX0NEh3ZQI7YWWKxu3BbrYoneCwYqG7C0MDIPnIDRbs02BgwL7ax9hpnwUJ2nHcN7ZtE6YgAIeEpStEcm0bU2RbfybmxR90CWdgmufnotomBUZvBffcr/rY4hR1T+5tCBDSQaHG5MyH0h4PT5PFiCVbQt9wjWI8+n1dXBSBWsvUiG/uMkjn9/7ab4rDhFB5mgkh9LcAJJykhUdzhXG/sfHecHfFwGjoBYkXnQQG4jub2zt7m3qVXV0dk6gJ/5BArJO/MrgBdAAfUTwZQDihKBpcjE5wPmvXHKDSrnlIhdKwZhzjBTA2U1N0W4nR6+m4JanCHlPlf2Sfuu9vvxiz8KzbandoPuXJAzj1Sz2BC0Zry7971g/ukuzK+MQDVyIiNCNvbPtCqo3SrihhlZvBZmHqKN5VT3S63/W21uYXA7dxI5Ve+keI/V30DdmMcbRkAWixFerGs6hg8UI6KCVBAA0l1OGHv2aiyZK6rp3hEXsWWkg02qfqpuxjMSlJDwYcgG+JJw3wauKU1FPxQqDV7SQ+KGeJwQFBQSTaOBddmsEhtgUzteo5zARiyN+zcA+euEF9ExoL4I63sOjCYJpoxwbYMtxrofKGkDUXUwb/DlLh+1DzJfKr9xzEM10qhfCAx/7FuZB4j7oDwx X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(346002)(39860400002)(396003)(36840700001)(40470700004)(46966006)(356005)(82740400003)(31696002)(478600001)(86362001)(81166007)(26005)(426003)(2616005)(16526019)(186003)(54906003)(83380400001)(31686004)(41300700001)(47076005)(53546011)(336012)(16576012)(316002)(40480700001)(82310400005)(8676002)(40460700003)(8936002)(7116003)(44832011)(5660300002)(110136005)(70586007)(70206006)(4326008)(36860700001)(36756003)(2906002)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2022 08:13:27.2239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a491d16-27f1-4f5c-4842-08da68956496 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6449 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 7/17/22 17:23, Marek Vasut wrote: > On 7/17/22 05:00, Angus Ainslie wrote: >> On 2022-07-16 11:37, Marek Vasut wrote: >>> On 7/16/22 15:02, Angus Ainslie wrote: >>>> Hi Michal, >>>> >>>> I recently rebased my librem5 tree onto the latest u-boot-imx branch >>>> and the dwc3 host mode stopped working. >>>> >>>> I bisected it down to this commit: >>>> >>>> 142d50fbce7c364a74f5e8204dba491b9f066e6c usb: dwc3: Add support for >>>> usb3-phy PHY configuration >>>> >>>> Reverting that commit allows usb host mode to work on the librem5 again. >>>> >>>> Should this initialization go into an SOC specific glue_configure >>>> function ? >>>> >>>> Is the imx8mq.dtsi missing something that will keep usb host working >>>> with this patch ? >>>> >>>> Does this break usb host on other imx8mq devices ? >>> >>> Wasn't this fixed by: >>> 868d58f69c ("usb: dwc3: Fix non-usb3 configurations") >>> ? >> >> I've got that in my tree and it still fails to probe the USB2 hub and >> USB 2 storage. > > I assume you do have CONFIG_PHY_IMX8MQ_USB enabled ? > > What does generic_phy_get_by_name() return for you in > drivers/usb/dwc3/dwc3-generic.c ? As Marek said there was one patch which fixes origin patch which didn't handle all the error cases properly. We need to know return value from generic_phy_get_by_name(), also if you still have usb3-phy in DT (as is in imx8mq.dtsi) with phy DT status enabled and enabled phy driver (CONFIG_PHY_IMX8MQ_USB). Thanks, Michal