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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E44FDC433FE for ; Fri, 29 Apr 2022 03:16:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=krNf3yXhqbCe+5bUMk9++JxBv6KnZ8NU8z6BM+glqB4=; b=eHHCNQqD17U0In SZSm8pw4s51I+cOEfol5zsLheM67uoaIHCq6+WTqC/aIaOLJGpI9ETYLXzQ9yJ/XcKaZ1G7V27kls LmbLE/F0RBtij6q0firU+AuSH17G0FD6HPdt3xXTbDeGPYmsLollzn3cAtRAl/tToI+RBiunEBsfU 9R5lFyuv/958O72fLDpc9jGMVre+Sa+sKQysZQ4N+PLD95Av01G0lh8Uu+xGd4j0ezkjq/rtNRPu6 +6181lFLFkNjMlbEYwQmcjlDHzAdRJo/FDT8zC/mhxcO2T7Z3r59aERxMcS8isPZJVB1ckrkp1YEn UeRTRpPaJzj8Q7pAQ3vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkH5m-009N3s-My; Fri, 29 Apr 2022 03:14:50 +0000 Received: from mail-db8eur05on20630.outbound.protection.outlook.com ([2a01:111:f400:7e1a::630] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkH5i-009N3J-KO for linux-arm-kernel@lists.infradead.org; Fri, 29 Apr 2022 03:14:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kkN6SsxABDpyPgIMkwWJJ4nvsn99vxpz865fJs2gbDvnYdZc+GyWZPagdghOtuez7tUlIfTztR6I6SBNub88upu0nCDP+nNo9YRCMiMe45xNWhuyjMvPRZwPHDMX78XMBq0oywzL93OW08gjzxDXsdMngTrZdLqyxg3ink1BMQh78mnn2GnaGWUPVR5fbdGTPmmqdCNnMOwNXbO+/IJWiLamfu4+43nItgoezAMWXqdN3UighbkyYEY70Ycb+lNQ8oYLsRbvMrjB5Nk4t8Szd7k7UjwNcctxSLBngp73tTh4UaxEmmMoceDgNd9uJxSO2dV2xgPIV+pgE6pwk0qGOg== 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=vhHGoeF4uBwyM1V1gHGZKRBYGkekdKyOMDREkKgD0tg=; b=Sd4MqPQW8AWSz0rNsB+nZUkMSpqUXUvhj/k/KosT4bx0oA06bljGDHSjSdhxTsKko97iF6eUoBv4/jviPdK0bENlWADn9XxOjavyBmxbDDgiyZvCC1qamHw3HsK1IbqPGjB2VJj1aWr8gOVcBbdFLfnHql/8TdJIlXXyGMyF03aT5vGh8BRdnSWjLDc35rzlrGrju9nGe905g8ICAYZQ5S7nXIok/J/Zv43qaXVE/GUgmg7tWfdOn6ZiddOnpwxBAxJPX+DhiRrWqgdXAfYDVILZ5XO25RQuFOVQc9PgBqgQaeG5DLNJHHE4o2jDgnKUUXWcJbCgUe0YTsSNDepU5w== 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=vhHGoeF4uBwyM1V1gHGZKRBYGkekdKyOMDREkKgD0tg=; b=GYNcoCNCb6fYfF0d2Cp4f7A4WLlT1Bj4EYSWl2RngJxhe+6GIe/Z09vk7AAYNQjqBFBtT7JKYouyhpmnIqQcUX3RRwmYpSEiBTAVROyt0pXTG2qkLQ2FiiaRomdwq3F78ApzM4ZkIzLOI3V9WreXhggq/PkTt6CMC27u9WkzZ90= Received: from PA4PR04MB9640.eurprd04.prod.outlook.com (2603:10a6:102:261::21) by DB7PR04MB4316.eurprd04.prod.outlook.com (2603:10a6:5:22::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.25; Fri, 29 Apr 2022 03:14:41 +0000 Received: from PA4PR04MB9640.eurprd04.prod.outlook.com ([fe80::597b:6d36:1222:b37a]) by PA4PR04MB9640.eurprd04.prod.outlook.com ([fe80::597b:6d36:1222:b37a%7]) with mapi id 15.20.5186.021; Fri, 29 Apr 2022 03:14:41 +0000 From: Jun Li To: Frieder Schrempf , Jacky Bai , Lucas Stach , Fabio Estevam CC: Peter Chen , Peng Fan , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx , "marek.vasut@gmail.com" , "tharvey@gateworks.com" , Adam Ford , Breno Matheus Lima , Xu Yang Subject: RE: i.MX8MM USB autosuspend broken with power domain support Thread-Topic: i.MX8MM USB autosuspend broken with power domain support Thread-Index: AQHYT0PDHz9JnDz18Eue4E2GPC6+nKzt6lgAgAAGQYCAAA1jcIACQnWAgAAyfRCAFLtlgIABFqAA Date: Fri, 29 Apr 2022 03:14:41 +0000 Message-ID: References: <09fd0c60b87f68f54baa01fcf612725eda342d71.camel@pengutronix.de> In-Reply-To: Accept-Language: zh-CN, 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-office365-filtering-correlation-id: 083621a8-3baf-491a-18ee-08da298e66b9 x-ms-traffictypediagnostic: DB7PR04MB4316:EE_ x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YrhFzZw3chwwe4K9QINWd6LGqC3N6Hxwnu245ckYhzyEw5WHjbnmxO9KL4p91O/mzonnRP11YqdORTPUqt5Qt28QaCN7yv+8y0fObhz9SoMCCIc6Xrw2n6pbY45aINLf0LsN64jWPS3gmxcg/A4PpJtzI8BE4+5zFMUSiKabL2OUGK0QvWTL07M7Ox9d5nceBK5I3hA89rdj9THPcbt/HvhXRe5yD1ASTsJN9D+oGX1Nzybl6/VVgi6WGNbbQVOZDROXhx68LAPVKBnho5+ysLVmnzymn3KLmYMVM3JuQ/euOAwjpJubgWPuheASgRSuIiGDhN24qJgoIsaLUHrlb0bbIvQqP+2xLDBPhR3FHL3Ff/LffnmkBcGrXzHcbjC6KOSANsuWJAlVggEv3/YleJH3i/mzySqF768gRVzHn3biKX75kMedBQ2PLLw1nd2YD17jt5LTuTKm4RGc33f6UTJD/I3LxYsUL2joyJSMS6hslFb+EDmOTMnZfGhdvvd+zKvKUT89kJ2D3XP4VFNi+vNJa2KnoeiUOeCuuIMnqdMjCDJL93IUFABHlaPHFUvWiaIVJKyZG0aGU+0prr2h92Z3XFf1wGM7XKUgUOU2PctRjili5tnuraXTXCdImwXInxe4IgyKoJi3TuNMg45mnawTN2rwwZs4zAveHzzBrZXROZzogmZT3hHbDGlMNuTYQHzWcYxrmScuH2fjANCTnX1s1H2Mz5TsF5JpnlMiPOvONp2emJm3tfedR2mI5GYAzU8Mlk9CXBHidU1z5QMR84SNVUFuR4yGpyuSz4DINn4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR04MB9640.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(2906002)(54906003)(44832011)(71200400001)(316002)(66556008)(38100700002)(8936002)(33656002)(53546011)(66476007)(966005)(66446008)(45080400002)(66946007)(26005)(38070700005)(186003)(9686003)(64756008)(6506007)(7696005)(76116006)(508600001)(110136005)(4326008)(8676002)(52536014)(5660300002)(86362001)(55016003)(83380400001)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/KM46IgaZySEIQPXuKWCCHH8FnFggcroaBOfWvhuid1vQ33HKEqmckGduAu8?= =?us-ascii?Q?JLa8Yfp6mMEJ0m4TZhsae6PSk/O4l3T2Q7JZUGORdBRAxJ46Ajh0xBrNLpLk?= =?us-ascii?Q?q4swvMMdBRoeVraW6QMkyajnkHowBTFmgCC6Q1/RFo3Dzlf/REmh53in3i/y?= =?us-ascii?Q?HeUS94jfLES9jNcHVCG3FT9SvIRsjNAlPNM02nvEfxJT7l3hqhegmUSgtpVA?= =?us-ascii?Q?aNhrw+q2XynQu4yyk+k4WjkCsX04ctsU9u+XdwcsKF5GqGuV2+Xn57YWPBh3?= =?us-ascii?Q?HozqoOp7ocssxKSyeBdtR3FIv6iQW1BRvdy0dl7yZxY9H/n6VS8gFmsLAFdQ?= =?us-ascii?Q?2yY0lnQJuVD2/mUcubwRzt9YVsvgemQCmm59OKhWQD4Jf6uj0T0zK3UHpBvi?= =?us-ascii?Q?j/xX6kmGUW7+VKkuE4zV7ZmNGtOl5lOS9gUzWS0dcbbb8XKADq1WbQ6EWFfN?= =?us-ascii?Q?OBvWqj2YxzCa5JUBGUA0WJ47eUd7n6JFZqJAafwK1UaWAzkHa+ANFT+QN3UB?= =?us-ascii?Q?QkOVSWAmDi3vhr5nVWLNSdiawdfhZc2vT4ZpvBbhy+gQx84o8wH3b8USvw7o?= =?us-ascii?Q?5AHBoZ/cULq84HTj+RHwy+UErPuU3tAdlF6yfMECGeVkGRfK3lvd+jtlEye3?= =?us-ascii?Q?7qBKXIV83UdgQqPV6WiFSuTqaVwuOR+p60X07zise+f0BISLSid03G9xXwCa?= =?us-ascii?Q?0bj5/mDtlq4Fr9nl67uVnd7dmSPCD7EbCmqB1nAxtxlaGwCloQxlWDJwUa49?= =?us-ascii?Q?AUYUyXNCrkOe/AWA152VaBRTZhBBkm9p7QUAPh8luHIc6NO4GlYQxD84Oj5F?= =?us-ascii?Q?u7Ts0R+eABl2r0qVNYFDlz7ltdj5x+kJHRx1MUqE8nt0/nceUlg4GZX3b65g?= =?us-ascii?Q?ElKhaPfZHR8dzR7OqE1XCYqAhNRcC5NJf0CFF7NHUavRcLdFfmRevNHmELxx?= =?us-ascii?Q?E2a6f/U4bTbAEYbXC36SXASBr1vyOmmDM8a3FMcKxEPwjbXs5ODyC6NVxsvR?= =?us-ascii?Q?Cy2hoKQ+faQu4jnL3XFqitp3u1gwyjrv35eVOftMgHpwy68FXZHK6sr81jBJ?= =?us-ascii?Q?Jw81e6Armo1macdxPzxLeFTDRliExGoCmnuW3V+yZ4rq+k8iR76vfFpSmXk7?= =?us-ascii?Q?tN/BQ+a91VDTxc/UgAjjSLGdVV9CCHr+2A2CoCfAJ33s9zCEd5pijKeL57Gp?= =?us-ascii?Q?6RtKqRcVhWpLlDCBclbZGqLA+wmTGiyj6leRCUkSwzvNOKz0MW3defILjiD9?= =?us-ascii?Q?ul+tTZZxqjMCHq50MwPOwYrNItdCzzA2ARSDUO4QRgIzA8Smpze+TuhNq/I8?= =?us-ascii?Q?Kw7k6lWy9p54kx01gWWIMdfqmvWci/sfzfHDHx0S3MUPzIxqUnoFKF7ljVxv?= =?us-ascii?Q?2BNMQV9FJVu20HDh3Kwh4Xqruq74yAYSzAGTNi4L8IIleNkHHnC7Rw8iKI2U?= =?us-ascii?Q?u75AeWC0YiOf+lcykDlo7mR3FJFXG6bhLu02mdtKjtUqMkl0VFPnavjZ231i?= =?us-ascii?Q?BG2DaCPjWxgRul6uv9tFQYWFjvCqrrRNIS775kBxGM0zfDJ9D3EvHK3EKzhu?= =?us-ascii?Q?cc4uddokij4Mod0JOEA6pQXJxXDA2sLlJS8tMApGumE25KYjX007KQ2LeZnm?= =?us-ascii?Q?yhXxpht3KSbQx0DPD7L4Eg4dKgmx7U6Dw3zJ9sxWAPOzkn7iysLbKcu1t3Lg?= =?us-ascii?Q?ufZkgubjpznsl2V+DmzuoOPJjKuhzIqpTapI5U5p+TC32xRG?= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9640.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 083621a8-3baf-491a-18ee-08da298e66b9 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Apr 2022 03:14:41.1223 (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: aqFm+3wPEdzwNsjTCE4V4eveSdhyGJRYMBIRd6y24qE7eVXiI8fzBeBFVl1EzqLg X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4316 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_201447_089735_653135C7 X-CRM114-Status: GOOD ( 32.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > -----Original Message----- > From: Frieder Schrempf > Sent: Thursday, April 28, 2022 5:58 PM > To: Jun Li ; Jacky Bai ; Lucas Stach > ; Fabio Estevam > Cc: Peter Chen ; Peng Fan ; > linux-arm-kernel@lists.infradead.org; dl-linux-imx ; > marek.vasut@gmail.com; tharvey@gateworks.com; Adam Ford > ; Breno Matheus Lima ; Xu Yang > > Subject: Re: i.MX8MM USB autosuspend broken with power domain support > > Am 15.04.22 um 10:12 schrieb Jun Li: > > > > > >> -----Original Message----- > >> From: Jacky Bai > >> Sent: Friday, April 15, 2022 10:21 AM > >> To: Jun Li ; Lucas Stach ; > >> Fabio Estevam ; Frieder Schrempf > >> > >> Cc: Peter Chen ; Peng Fan ; > >> linux-arm-kernel@lists.infradead.org; dl-linux-imx > >> ; marek.vasut@gmail.com; tharvey@gateworks.com; > >> Adam Ford ; Breno Matheus Lima > >> ; Xu Yang > >> Subject: RE: i.MX8MM USB autosuspend broken with power domain support > >> > >>> Subject: RE: i.MX8MM USB autosuspend broken with power domain > >>> support > >>> > >>> > >>> > >>>> -----Original Message----- > >>>> From: Lucas Stach > >>>> Sent: Wednesday, April 13, 2022 11:03 PM > >>>> To: Fabio Estevam ; Frieder Schrempf > >>>> ; Jun Li > >>>> Cc: Peter Chen ; Peng Fan > >>>> ; linux-arm-kernel@lists.infradead.org; > >>>> dl-linux-imx ; marek.vasut@gmail.com; > >>>> tharvey@gateworks.com; Adam Ford ; Breno > >>>> Matheus Lima > >>>> Subject: Re: i.MX8MM USB autosuspend broken with power domain > >>>> support > >>>> > >>>> Am Mittwoch, dem 13.04.2022 um 11:40 -0300 schrieb Fabio Estevam: > >>>>> [Adding Jun Li] > >>>>> > >>>>> On Wed, Apr 13, 2022 at 11:35 AM Frieder Schrempf > >>>>> wrote: > >>>>>> > >>>>>> Hi, > >>>>>> > >>>>>> when power domain support was added for i.MX8MM, it seems like > >>>>>> this broke the USB autosuspend feature. > >>>>>> > >>>>>> I reported this previously when testing the gpcv2 patches before > >>>>>> they were merged [1] and the issue can also be reproduced on v5.18-rc2. > >>>>>> > >>>>>> Did anyone else encounter such a problem? Can anyone help with > >>>>>> debugging or proposing a fix? > >>>>>> > >>>>>> Do the USB power domains need to stay enabled for autosuspend to > >>> work? > >>>>>> If yes how can this be achieved? > >>>>>> > >>>>>> Below is some more information on how to reproduce the issue > >>>>>> including some debug output. > >>>>>> > >>>>>> Thanks a lot and best regards > >>>>>> Frieder > >>>>>> > >>>>>> 1. Plug in USB device on host port, device is not enumerated, no > >>>>>> debug output > >>>>>> > >>>>>> 2. Disable autosuspend, device gets enumerated > >>>>>> > >>>>>> ~# echo on > /sys/bus/usb/devices/usb1/power/control > >>>>>> [ 2986.582786] imx_usb 32e40000.usb: genpd_runtime_resume() [ > >>>>>> 2986.588155] imx-pgc imx-pgc-domain.2: genpd_runtime_resume() [ > >>>>>> 2986.593876] imx-pgc imx-pgc-domain.2: resume latency exceeded, > >>>>>> 1125 > >>>> ns > >>>>>> [ 2986.600446] PM: usb-otg1: Power-on latency exceeded, new value > >>>>>> 12295000 ns > >>>>>> [ 2986.607342] imx_usb 32e40000.usb: at imx_controller_resume [ > >>>>>> 2986.612850] ci_hdrc ci_hdrc.0: genpd_runtime_resume() [ > >>>>>> 2986.617919] ci_hdrc ci_hdrc.0: at ci_controller_resume [ > >>>>>> 2986.858565] usb 1-1: new full-speed USB device number 10 using > >>>>>> ci_hdrc > >>>>>> > >>>>>> [1] > >>>> > >> > https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Feur01 > .safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Flkml&a > mp;data=04%7C01%7Cfrieder.schrempf%40kontron.de%7C09e76aed6ea746047b580 > 8da1eb7ba52%7C8c9d3c973fd941c8a2b1646f3942daf1%7C0%7C0%7C63785607170235 > 8709%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi > I6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=3STwzi1U9uAYHwa17k7cl2EfAEou6 > qi7vlHtCa%2FiG%2Bs%3D&reserved=0. > >>>> > >>> org%2Flkml%2F2021%2F5%2F19%2F883&data=04%7C01%7Cjun.li%40n > >>> xp.com%7 > >>>> C > >>>> > >>> 95df1db516454246d2ef08da1d5eb444%7C686ea1d3bc2b4c6fa92cd99c5c30 > >>> 1635%7C > >>>> 0 > >>>> %7C0%7C637854589844488598%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi > >>> MC4wLjAwMDAi > >>>> L > >>>> > >>> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Zz4 > >>> 47nG > >>>> g > >>>> 9Rr%2Bvn96v4KJelygmuqFWaScqPIFDWMBdWg%3D&reserved=0 > >>>> > >>>> Now that I think about it again, it seems putting the USB > >>>> controllers into the OTG1/2 power domains is wrong. I guess the > >>>> controllers are actually located in the HSIOMIX domain, which > >>>> probably needs to stay enabled even if there is no device > >>>> connected, so that the wakeup logic works properly. It's the USB > >>>> PHYs that should be placed in the OTG domains and which I expect > >>>> can be powered down as long as no device is connected. > >>> > >>> Per my current understanding, USB remote wakeup(wakeup host via USB > >>> data > >>> line) need PHY power on, but controller can be off, I will Check > >>> internally > >> how > >>> those power domains map to each physical part in SoC, and reproduce > >>> the > >> issue > >>> Frieder is reporting. > >>> > >> > >> On imx8mm, the USB OTG1/2 power domain are actually for PHY only, and > >> it is just handling the PHY isolation. > >> If these power domain are put into OFF mode in HW, PHY's output > >> signal will be isolated, then leads to USB enumeration can NOT work. > >> HSIOMIX PD only has ADB400 handshake. > >> Just think again, > >> the parent/child relationship between OTG1/2 and HSIOMIX is not > >> really necessary. To simplify things, we can decouple the dependency > >> between OTG1/2 and HSIOMIX, change them to sibling power domains, > >> then controller just attaches the HSIOMIX pd, and USB PHY attaches > >> OTG1/2 correspondingly. > > > > Yes, this can work. > > > > Hi Frieder, > > > > Could you please try below change? > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi > > b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > > index 1ee05677c2dd..3ff71ca122e4 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > > @@ -275,6 +275,7 @@ usbphynop1: usbphynop1 { > > clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; > > assigned-clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; > > assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_100M>; > > + power-domains = <&pgc_otg1>; > > clock-names = "main_clk"; > > }; > > > > @@ -284,6 +285,7 @@ usbphynop2: usbphynop2 { > > clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; > > assigned-clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; > > assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_100M>; > > + power-domains = <&pgc_otg2>; > > clock-names = "main_clk"; > > }; > > > > @@ -669,13 +671,11 @@ pgc_pcie: power-domain@1 { > > pgc_otg1: power-domain@2 { > > #power-domain-cells = <0>; > > reg = > ; > > - power-domains = > <&pgc_hsiomix>; > > }; > > > > pgc_otg2: power-domain@3 { > > #power-domain-cells = <0>; > > reg = > ; > > - power-domains = > <&pgc_hsiomix>; > > }; > > > > pgc_gpumix: power-domain@4 { > > @@ -1180,7 +1180,7 @@ usbotg1: usb@32e40000 { > > assigned-clock-parents = <&clk > IMX8MM_SYS_PLL2_500M>; > > phys = <&usbphynop1>; > > fsl,usbmisc = <&usbmisc1 0>; > > - power-domains = <&pgc_otg1>; > > + power-domains = <&pgc_hsiomix>; > > status = "disabled"; > > }; > > > > @@ -1200,7 +1200,7 @@ usbotg2: usb@32e50000 { > > assigned-clock-parents = <&clk > IMX8MM_SYS_PLL2_500M>; > > phys = <&usbphynop2>; > > fsl,usbmisc = <&usbmisc2 0>; > > - power-domains = <&pgc_otg2>; > > + power-domains = <&pgc_hsiomix>; > > status = "disabled"; > > }; > > > > Thanks Jacky, Jun and Lucas for the comments and suggestions and sorry for > the delay! > > If Jacky is correct, we can power down the HSIOMIX and keep the OTG1/2 domains > enabled so the PHY is still in a state where it can detect devices. So it's > the other way round than what Lucas assumed first. > > Jun's patch above does seem to fix the issue for me. The decoupling of the > OTG1/2 domains from the HSIO domain suggested by Jacky is still missing, > though. IIUC this should enable us to power down the HSIOMIX if the controller > is idle and save some power. Removing the "power-domains = <&pgc_hsiomix>" > from the pgc_otg1/2 nodes should do the trick and seems to work fine for > me, too. > > Jun, do you want to send a formal patch for this, or would you like me to > do it? OK, I will send a formal patch. Li Jun _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel