Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8048627rwp; Wed, 19 Jul 2023 04:38:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFUdtFUKoU/kXli36RfGOTe5O0LehT19p98qHYKupzJXflPpyBw23PAsZKt6737weF/9TiG X-Received: by 2002:a17:90a:9cf:b0:262:b229:7e45 with SMTP id 73-20020a17090a09cf00b00262b2297e45mr1481831pjo.11.1689766699342; Wed, 19 Jul 2023 04:38:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689766699; cv=pass; d=google.com; s=arc-20160816; b=0yq+fGR0eliPh6XT7wzDuF09XXeAkUdXIKwfN+zanwhm3ORdUGZPVuOuKfBInboLRD fASCWIwyOpHYLJwIHqwFsaOmqXra0Kr9DeVB1F7qSE/R9z+S0j1ACQrkgx4ONjMnA7lB F7QcHrdToiYuXuPjV0y+Xp/4y0x4vOFhO71W67MsktAgQ0+s+/CJgTl+iF+v+M2nu7pg qwHTxKqEVW5YCePaIE/vA4dM5jx1frxN9nCfwJM6oD56qHxdWOueZGEmp98ZLpPCk8Pc NEWD0iSmHD8kTc6nrgX7wFqAGVLMjw4QZDbFmq7MTk9EuPN5jUuGnf5OvuJWsRq3O/8i aulg== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=IEkVtEVwrtrT2lcgjb1fce1rxKGqjbHCy9U6zCKxdEc=; fh=N8CUqPO6WIE+R+uL12AshxppQKNePRxtCw7m3q+r7Ic=; b=LvpmFaPBE7s/kMhrAaeaBOtDZZ8VNZYkciQA1wZAzoKjTBsMQZe0PA/QKyQGkPxsJE DrOHvbF9DrXUZevcwcLHviwNmdzINJS0KjKP6TWeYYA2Eww4/kO+WK4liA4oqNX/6J1l sLKT2Ceq88bZF0ISQzTtLtItAuReX09ArTZn1s1J9stVehzG6xv/PElvuLkVHpYBd0I8 pAqBLmp5GAanSJq/kvC8u+su+ddJNIPln2yc6sysLN9gCHjJ6s5ab2FemjYqK5l04fCy nLMlSPHnJVX+ekStCPzZRS4vcEK8awB/w6DYrsKs601NrB76rhEI4GdYmOxk/V2UoDB0 x3gw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=GwCeTa4o; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a6566c5000000b0055c0477e26dsi3173401pgw.475.2023.07.19.04.38.05; Wed, 19 Jul 2023 04:38:19 -0700 (PDT) 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=@nxp.com header.s=selector2 header.b=GwCeTa4o; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbjGSLXb (ORCPT + 99 others); Wed, 19 Jul 2023 07:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjGSLXa (ORCPT ); Wed, 19 Jul 2023 07:23:30 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2042.outbound.protection.outlook.com [40.107.8.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D045E52; Wed, 19 Jul 2023 04:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ov3FTNRdOCIFaBn5y5sIz+BfE3X/UYOIEyfvTsLOiMb9oU/rj73legJPN2HnOReRB+TR9aRrt+OvUKJWQN/OPLsP05F0nWM3mhhvJ2aMX+sKagwCjLSKQnqkJovdSzfPw0HQ8u8fnC5jwpyonpzqStsLjxoirxTvgCfloxCsyHlz/wD74UuEnLH48N5HBNdrUTnTnvOILja0wjCNoRWJHIr9DINi5Pnh+5YHjEzHFYCueb+9ZxE4aXD0G0ApL3qaDFJscKBC0nvvXgRfnrITZ7xYkvJO24pBWAnXJJcfiqw2Y7htDEG4XL/BifjTySVWu7QUmjpUZmJpN4cWzWPwsA== 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=IEkVtEVwrtrT2lcgjb1fce1rxKGqjbHCy9U6zCKxdEc=; b=cQDO0VovTFrEvGZusLQQQQx1cJtExVxLQGP7z9fVRs8TWGcM/tZsQtaEncCC4/cBKNOsGNNKsWADbWGT+OzkhN29+24pYFoGDls5UVJdVL6EI/FU8NNGU5R8KKyLsPki4CAUv3Ftq26BZuuQclnDpl3kzMtY8qImam6y34Y7A3KsID40v2zoE1uw0l8ldDKZT3L5b+nB+fV+76bMs9/SeqzNIwH2wrB3RoP0pA1loI0LW2j4s6qlqejSnpgBXcZCMaKwFB5wMFmypZCWbdQG/NAcrd7hQU6/Y3Ss3QySpZFS8wpmr5ciTn1cF5S+jMmnyuzXgJQZe5T96puU8Tku+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IEkVtEVwrtrT2lcgjb1fce1rxKGqjbHCy9U6zCKxdEc=; b=GwCeTa4oHJgHDAvPuLEP/zGlS3bAu8SOjh6GtGQmjPMf62pJV7noAus9tS9EbxPgjGr9Q8vkTc/1oZYimuM1EBghpZos4XIhKTJ9yqjY2/whVwZZAflvBKTMuXDJ+Q/O77FhfuNxRuy5+mFlLWMxgiJmPCy1emVXt0zzwwQhVmU= Received: from DB7PR04MB4505.eurprd04.prod.outlook.com (2603:10a6:5:39::26) by AM8PR04MB8035.eurprd04.prod.outlook.com (2603:10a6:20b:248::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Wed, 19 Jul 2023 11:23:26 +0000 Received: from DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::473a:28:1d98:10ab]) by DB7PR04MB4505.eurprd04.prod.outlook.com ([fe80::473a:28:1d98:10ab%5]) with mapi id 15.20.6609.022; Wed, 19 Jul 2023 11:23:26 +0000 From: Xu Yang To: Luca Ceresoli CC: Francesco Dolcini , Jun Li , "devicetree@vger.kernel.org" , "festevam@gmail.com" , "gregkh@linuxfoundation.org" , "kernel@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "robh+dt@kernel.org" , "s.hauer@pengutronix.de" , "shawnguo@kernel.org" , Krzysztof Kozlowski , Francesco Dolcini Subject: RE: [EXT] Re: [PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm Thread-Topic: [EXT] Re: [PATCH v2 2/3] usb: chipidea: imx: support disabling runtime-pm Thread-Index: AQHZkukSER6EMlEOvUGUKvCWQIHv2K+swg6AgBG0WYCAAQQm4IAARWMAgAF+cOA= Date: Wed, 19 Jul 2023 11:23:26 +0000 Message-ID: References: <20230504162312.1506763-1-luca.ceresoli@bootlin.com> <20230505120618.2f4cf22c@booty> <20230508151756.785ec07e@booty> <20230529121825.71e9b6d6@booty> <20230717184537.6d6ed607@booty> <20230718142504.075d0186@booty> In-Reply-To: <20230718142504.075d0186@booty> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB7PR04MB4505:EE_|AM8PR04MB8035:EE_ x-ms-office365-filtering-correlation-id: 9e906301-4191-4273-cf92-08db884a9229 x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8DlQTzMxkv5Pw5yzfUFTAmUKVJaHN02VcEZfbX2e+bAHUUANipIfDbBBiABurOEymccl51eJQRLbSHyC3EbEkyAt4/z715BcS28qrQKhkZ8czWqtd8ErbbPmxtBvDoJhV59wRQ5n/VtXX0SPU8jMpnFvhIM4+339n9pcIWMA7vfYrddF+jB4gPhaq2x2GzJhEXG8gWT9afX5bBKQvp9Iu7TpDce0RylyRtqDfZ86h4aUgPhQrVQG6bySSiUkXqXVCQebw4QKwBGX+jNvRWyMlZ9AzmnTbTF+azpVNdafJWhklV8oM/MJPoRDhpE1wA7QNw7Ln/3DdLTy7KxwCfSu6pkjHeFvicdeAGzZUj4lHrE2/xkMXPjTY7T78WY/3oWzLNdUtEltfu1hCExUCGm/5V6njTy6I9LMLU89LDASJ3z9dLwA0hP8JKUE1uoelW1jloAzKmkbHHVlLFfKJuxAQ/6Yf/1jSodgFDuDWfrkfEAzIHmpA2L/VKmc5WmNbh2Fl36Ji8iRzmJe0t+4rm/04gjw3b8MrtYRJI2GCf5LJ/XZ3ofyHqCVKrsKLw4k9bxOFDC3ygxa2uFwlrnisi45rPA+15ReaKJKeXSdlI7YRogR61jqQCWx5j5FyiPlPGgf x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4505.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(366004)(346002)(396003)(39860400002)(136003)(451199021)(2906002)(38070700005)(86362001)(71200400001)(26005)(6506007)(186003)(83380400001)(38100700002)(122000001)(55016003)(478600001)(7696005)(33656002)(9686003)(54906003)(316002)(41300700001)(66556008)(66476007)(66446008)(64756008)(4326008)(6916009)(7416002)(52536014)(8936002)(8676002)(5660300002)(66946007)(76116006);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2BSVlLvAjF6LTiTwG87TocOtCB8DOj44LfFcY1E8lKt6Gl/DGk3IHUv4a0qr?= =?us-ascii?Q?nQ4uvADNkpMAqyjO1xeMCuIIXfxCdPzj8R5jIqxpo0wamXkLkMjLyf5AWCMp?= =?us-ascii?Q?+GHQSvSvNnckN9t+ezm7gkuMSdrDH+DYJ3l7igb2neAPzN/B6wGYqussiWKc?= =?us-ascii?Q?Xr0ndPssWDN3+sDE1qd3Z8ZmImsErhBPqIGSY4sPmwJhUCslOOxdE6d2qL/K?= =?us-ascii?Q?JP/UYH48TL0O9bq9vODQGMVFtEcn/lM998GgAj1xMj5aXCPoVfzJKqpaPw27?= =?us-ascii?Q?mpUECZ2q/g2wsTYB1SrM6FyeWJlfOxC9hMt6bf12HYufXjU5K8WQ3fPK1Hiu?= =?us-ascii?Q?H+rwx7ptP0IJR5F/bhywkZCeTrLiz1n0ciaV7/9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?BCZV7z5WOWzpC1gbL89AuzdylQqKeu9L02HN/MYshGx8Uf1UPY98j2hXu1yw?= =?us-ascii?Q?EsL8jJF+tCrA03th6aGeDHe9U+pJiVbbngETQKNgmizBQkv/mmuJkctoitcF?= =?us-ascii?Q?xE2hO2Sj/UJaj0thRuQ5jNhCyJ2RiDHnv7gbvSkdrvZh9SZKMJK/VLG2qM5b?= =?us-ascii?Q?WQ0Tv23bEXBFFKkyYmB/tZl1Sw0SyHIVQzAWTUtGVP2rDMkaPktHoxYdGZh6?= =?us-ascii?Q?bmgj5oVygXv3omtx7yta/zLf53ihXr0ZNQb02/vwycYCmD4NDtsjycsQ5FAb?= =?us-ascii?Q?2LU/L+H2ZfuMJCSgEqg=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4505.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e906301-4191-4273-cf92-08db884a9229 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2023 11:23:26.3776 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: gOgFVWFsdauVJjiWaJwtgy4BXURn+zUH0umLpUhIBvvwwfUhgA6+HlFO2j0P5pm42w2kjupti8jwX8ZJZlNgBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB8035 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Luca, > -----Original Message----- >=20 > Hello Xu, >=20 > On Tue, 18 Jul 2023 08:31:48 +0000 > Xu Yang wrote: >=20 > > > -----Original Message----- > > > > > > Ciao Francesco, > > > > > > On Thu, 6 Jul 2023 12:23:43 +0200 > > > Francesco Dolcini wrote: > > > > > > > Hello Luca, > > > > > > > > On Tue, May 30, 2023 at 11:22:51AM +0000, Jun Li wrote: > > > > > Yes, your understanding is correct, talked with Xu(in CC), he wil= l take this > > > > > soon. > > > > > > > > A series was posted > > > > > > > > I had no time to try or look at it yet. > > > > > > Thanks for keeping me up to date on this topic, which is still totall= y > > > relevant to me. > > > > > > I looked at the series, but it does not seem to be addressing the > > > problem with USB host not detecting new devices when VBUS is not > > > directly connected, e.g. in the Colibri imx6ull SoM. > > > > > > Xu, do you confirm the series at the link is _not_ solving the proble= m > > > being discussed here? > > > > Have you tried this patchset? The upstream driver couldn't get correct > > USB role from HW_USBPHY_CTRL register when the ID pin is float. This is > > what this patchset is trying to fix. With this patch, condition > > "(!vbus_is_on && !mxs_phy_is_otg_host(mxs_phy)" will always be false wh= en > > controller acts as host role, then __mxs_phy_disconnect_line(phy, true) > > will never be called. So I think it doesn't matter whether VBUS is conn= ected > > or not when act as host mode. If you still have issue after apply this = patchset, > > please let me know. >=20 > I tested this patchset on top of v6.5-rc2 and I confirm USB detection > is still broken on the Colibri iMX6ULL. With or without the patches > the behavior is the same: USB devices are detected only during boot, > and anything connected after boot are never detected. Thanks for your feedback. As you said this issue will disappear with below = change, right? diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index e1a2b2ea098b..ec5ee790455e 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -178,7 +178,6 @@ static const struct mxs_phy_data imx6sx_phy_data =3D { }; static const struct mxs_phy_data imx6ul_phy_data =3D { - .flags =3D MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS, }; static const struct mxs_phy_data imx7ulp_phy_data =3D { So I guess something in __mxs_phy_disconnect_line(mxs_phy, true) is causing= this behavior. Could you please help to find which line to comment to make this issue disa= ppear? Thanks, Xu Yang >=20 > For the archives, I'm replying also to the patch series. >=20 > Luca >=20