Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10508063rwl; Mon, 2 Jan 2023 03:58:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXuIQG3FvdVIuzMIiQCCcZr0+PK/QxXJJREhKT7AKMDpz7XDRzz0cC3iI4OviElhuYLMGKdm X-Received: by 2002:a17:907:cb84:b0:836:e8a6:f6f5 with SMTP id un4-20020a170907cb8400b00836e8a6f6f5mr35574368ejc.66.1672660684424; Mon, 02 Jan 2023 03:58:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672660684; cv=pass; d=google.com; s=arc-20160816; b=ASn7Ku3Fzv61tKKS8Gu7Gbg15FSM4T8aXyKMjUm4G7pRhJNhzXlCRYO/fyxVX4xb0B ZAmGFgPsrE5Ce54UpX8TcmBwHJ47CvV+EDVi9fqfGny83EHtT3zjrDUHEvOrbst2nmbc fqyhfxmuEV1XzELt/zR2ysBf6mzKtZVoq4eEUg03DZVUl8B24PV4z5vV5xyEstzvW5FC O/M9lPxrzYrwn2qRbgL9lz/TomOw7q9uNthlL3/6tyg8PK9Y6hJMpt061oLrEmBosJS2 LFVWFz/tTpGFaBufaWwajsQiv94EFeL4cHBE7GSoNvkRhYeFw9xNmWwgxfXQsBjU4G9R +7nA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=UEYuZz3zEFvmN1kh0ZLAFgs6sq7oeV+6QqPLV7VJrS0=; b=KJ2P28kzKscq4+XiaNgJHGAQlHSbWkYJQwgikGDQ/uWkkNE2OfiMb6l1Vhu2Z3zJy3 dsPqK6j5m7dIwmwEYtv2I71yQeEYqDo1uF6jgwW3E4rniLpx/5oWcpw6YKFmOVddUWy+ oKNIjxhagdJc1IAobwzSoZ5h/BzIiS4N+1KXqYHzwBKqsSDY9sS3HuNTecqBoFEqoizs jCbEWZGYsycMGYdZtE0q6tpg5sO5uZvTjh3qwILC0AHEZ8fAJT8IxrCCFVV/U2hL/Z7C jPb3LoY+3gPE0I3aGPVnHwJSoQ8GSzv+gjsKiuDOnERfkIPs2uzD+8eywZ42l+dj1qNN cpuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@theobroma-systems.com header.s=selector1 header.b=TX2Mb06w; arc=pass (i=1 spf=pass spfdomain=theobroma-systems.com dkim=pass dkdomain=theobroma-systems.com dmarc=pass fromdomain=theobroma-systems.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=theobroma-systems.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs30-20020a1709073e9e00b007c080a3f372si27477587ejc.363.2023.01.02.03.57.50; Mon, 02 Jan 2023 03:58:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@theobroma-systems.com header.s=selector1 header.b=TX2Mb06w; arc=pass (i=1 spf=pass spfdomain=theobroma-systems.com dkim=pass dkdomain=theobroma-systems.com dmarc=pass fromdomain=theobroma-systems.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=theobroma-systems.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232420AbjABLsU (ORCPT + 60 others); Mon, 2 Jan 2023 06:48:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232103AbjABLsN (ORCPT ); Mon, 2 Jan 2023 06:48:13 -0500 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2062.outbound.protection.outlook.com [40.107.22.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B093FD64; Mon, 2 Jan 2023 03:48:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m72Ir9kca8J/qJ9ANbTpi58XpGmx6w0ig5MkdiDA4pV63GgjcGdenxvfWCkd4/dM0h7dOjmZEzjJ+Ia0Mg3hne3x+s0vn3KQK6X7h7wmkc1FudJnsO+k9CljJD3Lor4pw00jUVygFUiJHMHa95IFUFhjHEdx/1fXpbShmQNaR5KlzC0IpNaIcZbtItva5KlHAfOX1mPKoGhJXuKgtkrAvncXM031HXyrdO8EQYeO3sGZ4q2pWzwVJMxc2SpN9bVTsdHPeAh8kmreIqKT3ObvCGSuaDUAqb8CcNaoX+5/wSeJ51S2bnWwnX7I8PUfbW6YZr6dkI/YaXyBlBrnTkhtnQ== 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=UEYuZz3zEFvmN1kh0ZLAFgs6sq7oeV+6QqPLV7VJrS0=; b=lEiBWAKoDZEOEMH/Ra6ZsOuwxhCVvVXZmm1A2QnvYvlf93U79ZORpjOufSOtivmfMevMk2KIODLlKZWDPWH+68AGwcdT+KdD39WNc+PmZIQNrjMLO9JEivsc651SYYw8k67dZWW0CNczabUqGg9ovdL/9qVc/KrJQQDtBcl2TPTevU5qobUIHUHmmk4c9zqt6C1q6mo4LZEmkltLgUfGFaXvOe83nc+PXTspbKJA7PSNihbwQZDUvJncc0XncpF6YBGtftnH7HZTsb963SCAXUuxaT3jFli6IumKe5ZQNPok1h3pmPhX1OPL5+SSPKLVLd5+qJyC8Qs1+5QEOGWfOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=theobroma-systems.com; dmarc=pass action=none header.from=theobroma-systems.com; dkim=pass header.d=theobroma-systems.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=theobroma-systems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UEYuZz3zEFvmN1kh0ZLAFgs6sq7oeV+6QqPLV7VJrS0=; b=TX2Mb06wR5gPasVo1QTvbAy0pWHPSE7JOMMa/1ulRnTtNVyAhckQub65OJnYkf9xDjTdpbk8rJjmfIy92cn24QnC9L+12dg3LJ5B+TRXjkcZG76RXya8w+RxRzFPSl5suFzyJXbQh2avpSUzF+uFwQtY6jygo/GG8B3jNJmSak4iNVgR0u6cHht/4nhy3ie9poISLQ67lGEsjY3xKtL6NuPEnKk6jKoYqykZENj1rryT0C6kPIAtK99ZomOZMZQfj9bOobz+JyOz+ber5fbxzYfiFZiTmUBt/EdyvITTJLcxBnDzT2fX0P1PDTdpNN3GPqPpnbscuIXMGZZuiqWrRg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=theobroma-systems.com; Received: from DU2PR04MB8536.eurprd04.prod.outlook.com (2603:10a6:10:2d7::10) by AS4PR04MB9690.eurprd04.prod.outlook.com (2603:10a6:20b:4fd::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Mon, 2 Jan 2023 11:48:09 +0000 Received: from DU2PR04MB8536.eurprd04.prod.outlook.com ([fe80::9ebd:cd48:9396:76f6]) by DU2PR04MB8536.eurprd04.prod.outlook.com ([fe80::9ebd:cd48:9396:76f6%6]) with mapi id 15.20.5944.019; Mon, 2 Jan 2023 11:48:09 +0000 Message-ID: <69dd964c-c015-7ddf-4df4-4f2cb7b157c0@theobroma-systems.com> Date: Mon, 2 Jan 2023 12:48:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 2/2] usb: dwc2: prevent core PHY initialization on Rockchip Content-Language: en-US To: Minas Harutyunyan , Quentin Schulz , Greg Kroah-Hartman Cc: "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Bin Yang References: <20221206-dwc2-gadget-dual-role-v2-0-0de821615dd3@theobroma-systems.com> <20221206-dwc2-gadget-dual-role-v2-2-0de821615dd3@theobroma-systems.com> From: Quentin Schulz In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: VI1PR09CA0078.eurprd09.prod.outlook.com (2603:10a6:802:29::22) To DU2PR04MB8536.eurprd04.prod.outlook.com (2603:10a6:10:2d7::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8536:EE_|AS4PR04MB9690:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b743d20-b825-478d-a385-08daecb73843 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iyXFjoTjrIH5dZnjwPiTYKhKlxxZfx3DRH1bcoOcIYUWS8acuy0fcBZ/4AdWfPlR0nneSgLZhQIXHeHaon92X5INo+6v598dQkJj3hc95bc0FmS7d7OImjFc+GwZ9G+fGSyyAi6WQ12kBhIFGsWEUm70joYYzzRybmg9qgVGAsDnlNt0OCpSwj2axlMKdeVKwGA0GAILwxr+H6BMuHcjm0mBWhzFHy8nqNbku/JIoe9ZrIXmHJGe0/4RXj18vRNCN/+UdhvLgwaguDH8NJph27E5uhGACowzIomw+GlCuPIBu2yF25dt1lxYM5XVK76/3k5D8ia5928yhhTRcxeumjsO93PmhLMhsEikszC3ZUSXJzOXqVosaMpH/45k8LcnSf+fPeLWSS1+IE8RX6fBBeVh2aEetnOw1h0FqfqRbFYbOWmFSzTjcEcsrdXI6kzWIqXX+Ze1xe49rFm9Y4ZEcRtHUg1sZstNDmf4rOvYXstWYWzNsHfNsITW7LcE+OZjnjom5xVjAHJYfyaj3b7zg1fBhlXIvF3XxyDv/Ro22uOLJAl/jnjXafq4QGiBAPr2Y+UK200xnjz5oFkLDgimjLGPhF3r17GWqd6eFcZjZx1FSLr8WPvgEsXb+B14JXhAerrPuysNEYyoW0hmyVy2DOToWWGZ+Y1F2e/uJr9wML2nexyU87NOTcMXGm1hP6iQZ4gY7cX/k+Wb4thyig0K/CfSic+9fRYzfYojfRePGJ7Ld/vWKvAWhfmNtieKp8Z/D1AVMoT2pAJnh2zUJiKPhA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8536.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(376002)(136003)(366004)(39840400004)(396003)(451199015)(83380400001)(2616005)(31696002)(86362001)(36756003)(38100700002)(2906002)(44832011)(110136005)(54906003)(316002)(41300700001)(66476007)(66556008)(66946007)(4326008)(8676002)(5660300002)(8936002)(186003)(53546011)(6486002)(6512007)(478600001)(31686004)(6506007)(22166006)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M3Z6cFp5MUFucHJYVFZMYU9wQ3BrVnJUeXRBdkY3RkdiMWxLbHJkZk16YVhZ?= =?utf-8?B?dGhzL1dWbUxCSUJJSXhwVkZHb1FSZmNla1d2TW11Vjd0L2t2SGN3ZjFXQkhK?= =?utf-8?B?eUF6cHFqY1ZZR2JqSk0ramRpNVdoOVdpblhvdk9STEtSWTR3eXFzaGpwWVJS?= =?utf-8?B?U3NqdWtUODRUOFNp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?= =?utf-8?B?eUdlWFhYQVlZQ2NiUHBmZW5VdW9wZU1lU3JHK0x6bW8rWUV4V0VxakF2OVdR?= =?utf-8?B?ellaY2VsSkJzSmJ5U1o0bk9SejdoVlRteTBtZktNblNtejNxZXgrOHF3Zlh5?= =?utf-8?B?UGk2bmpmTC9UY3dDNStBd3lMQmZ2ZW1nT0ZhakUxZTYreVZrUkFiWDF1cHYy?= =?utf-8?B?d3FVYldkRGZ4VVBzNFBaNTcxNnloeDlFeFNCRFRaNG9QdGJ0VDhEb0Nuc0VK?= =?utf-8?B?TS9ldFpWQi9COFgyc3JwOUlyV0x3PT0=?= X-OriginatorOrg: theobroma-systems.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b743d20-b825-478d-a385-08daecb73843 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8536.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2023 11:48:09.4879 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 10Nsh81Xal3L51wj0EWZpa/9sky89NeDvdMnrVbF1CrP1Msej7AASJzlAYT/ht5DhlHG2bcVM8LW4ewbHJK97+AqYVAmosH26mPTfIi2adt/QhYD0S0ZoArHPDbOpfE1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9690 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Minas, On 12/20/22 07:02, Minas Harutyunyan wrote: > Hi Quentin, > > On 12/16/2022 8:29 PM, Quentin Schulz wrote: >> From: Quentin Schulz >> Sent: Friday, December 16, 2022 8:29 PM >> To: Minas Harutyunyan ; Greg Kroah-Hartman >> >> Cc: Quentin Schulz ; linux-usb@vger.kernel.org; >> linux-kernel@vger.kernel.org; Bin Yang ; Quentin >> Schulz >> Subject: [PATCH v2 2/2] usb: dwc2: prevent core PHY initialization on >> Rockchip >> >> From: Quentin Schulz >> >> In Rockchip vendor kernel, the core PHY initialization is disabled with the >> following justification: >> >> The usb phys need to be controlled dynamically on some Rockchip SoCs. >> So set the new HCD flag which prevents USB core from trying to manage our >> phys. >> >> This is required to get USB gadget working in dual-role mode on Ringneck >> PX30 SoM on a Haikou Devkit. >> >> Cc: Bin Yang >> Signed-off-by: Quentin Schulz >> --- >> drivers/usb/dwc2/params.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index >> 9ed9fd956940..9095437b3236 100644 >> --- a/drivers/usb/dwc2/params.c >> +++ b/drivers/usb/dwc2/params.c >> @@ -117,6 +117,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg) >> p->lpm_clock_gating = false; >> p->besl = false; >> p->hird_threshold_en = false; >> + p->hcd_skip_phy_initialization = 1; > > I'm not familiar with all "rk" platforms, but are you sure that > p->hcd_skip_phy_initialization = 1 required for all of them? > No I am not. This is however applied to all devices (even non-Rockchip ones) in Rockchip vendor kernel. I could check on an RK3368 since we have a module available for that, but I don't have access to any other Rockchip platform. From a quick grep, the following seems to be susceptible to this change: rk3128 rv1108 rk3288 rk3036 rk3228-evb rk3229 rk3066a rk3188 rk3328 px30 rk3308 rk3368 Cheers, Quentin