From patchwork Fri Jul 26 11:32:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13742655 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013047.outbound.protection.outlook.com [52.101.67.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E65517838B for ; Fri, 26 Jul 2024 11:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993517; cv=fail; b=HDZMq2SwtwVzdojbyUuDs+4u5ZHHhVFjM0vKMSbGcfnYjzrK0tJMBiv9wuZPBETrdYv5xecV/LTxVV1EtVcXiptKUgndwIcBTiOwHgGFXTT9g6S7PB+A6k/NozXAhWO2QkAXZoQys0QCvDLCe8pXuJU+HD4PVT4n/S11hODps1A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993517; c=relaxed/simple; bh=6cftCuRez24ImXuUnE/ntOMuBhW40Wg3Fil8ag2XHnc=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=LD0yA4pc5lsvBLbwmSk/kk2WTPB7eftEAd8I4VpiIVhj3GyFsRwk77RoEz4c1MaZbNw8ciJcFcV1TPOOgkSvQGvdSWWIxJATxYCNNyw4W4x2p20A37znLsqn5Qv4B9KXZdKfiHNqdpOxc8GqrnZkUl76hRxt95qlOOLSEvKxry8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=mmWM4/Jt; arc=fail smtp.client-ip=52.101.67.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="mmWM4/Jt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UffjPyiMi+quWJOYEZCU7wNRYKtIEg2T0X7SfrNIPAkVXc1qAKGsa0g2nnsAdv5fNliDWOnpTyK0fcA8OLX3bEdqUanjypxLgE/YubUZYNgd9rb9WnMA9wzgLxWzfe2yTCFZBhKFO3/y3iK10IjQAxK9+URT/WlS82qGQLHcue7Gw23+WZkoWFChyXM1QAFOW73msw8G3uBdIMMvh0ke+215Gji/TM02qoq1D/xkVu+aDG3tTzipENOyR5dGY2JE56ST2e1BdDsgTHcqIIrqGV+W081wHsIH/veWo2v/AdTosaGulpruJQ/16x+sJ4N5adJfQZJVfsMVccaNpKLW3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=oDtgLengr5PECs/ga4Qc79rxX1BqZHPO9lPHqLrfj5o=; b=Kr9CPBkbzVlzyFLbLRQOR50pzBQl1gs8+oylE2eVEfmPGWCtP5dvp2xPLPrAIOwJfyOCUo75F0ypN4IP47utKELGFt4cW8jggp4jQFDky9dd9eM0PaHSZ0g3qlkpJ5WfRrQ+KRwEfH8pqEpD/LaFLec1ZwXq2wQRzQQMn+J8Q/tnNr6sKNjhdUmU35npBLhHf4MUs9cbgPGzBu3hMdeoNG8xe546ZMgaxSFMGhOgDrp+eqo+5eN8Js7JK8RCHHlcNoaNGvjSxZ4iY29rqRyQul/FjguGnxvlUlJK+xfyjvtWoaJgCroSaTmY+3FyZU0xzfx6XVZW5IN+9In7YMwJag== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oDtgLengr5PECs/ga4Qc79rxX1BqZHPO9lPHqLrfj5o=; b=mmWM4/Jtekca+IJNYTGvX+EmMXJZggOIeK9BAbe6ytZj+9K6lNT2hjqbpqM2DV0ygxaM6Pd0fhxWaxywSTr3PwFYOFxp1xa1C49xi2pxGLt5+V8MlCXR50Xq+FQBV1t8RANoyz1V83Llz+lNiKElUSCb96/96fCU/loWtE57NzMQsEEmKrVy3IGfxzj23/LyhIMY8BQ2oUBgCQ8hkjtORErm4rvIMXx4FtBxil6juIb15AaH3RYcmwNWeMRE8cxjqGovHaBEuRz7+D7ZZAYVl+JrZJkcZ4/uwWPQKxqyNPWJ5+QR3PljLpFkPglp2y/v+ZrmW7khH0WeHEm0+szs/A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7875.eurprd04.prod.outlook.com (2603:10a6:20b:236::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Fri, 26 Jul 2024 11:31:51 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7784.016; Fri, 26 Jul 2024 11:31:51 +0000 From: Xu Yang To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, gregkh@linuxfoundation.org, peter.chen@kernel.org, herve.codina@bootlin.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, jun.li@nxp.com Subject: [PATCH v2 1/6] usb: phy: mxs: enable regulator phy-3p0 to improve signal qualilty Date: Fri, 26 Jul 2024 19:32:02 +0800 Message-Id: <20240726113207.3393247-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7875:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b21e910-ddc7-4020-0291-08dcad668b00 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|366016|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: 8CIGGg4wDZq7FEBHBcK+mWy+rspYmfDFlghX3KGRxYd284B72lhlmE2OyIFIiVrBsnS5kD7fvkb+VOMlh4tnYTSTTFtrUFdxxZY2CTvYSpFVj5mv4xgbeUaMuR5B6jcDNyPWebLrAgc50fJb6YDpEQuJb+Ao8oMiHa/DImo8mkJ6WewYJnQlk8YX4e/bjDlkM9zBBekoeSu3TDxsf7uKPGmHFFee1eOPUR63DGLPjew6mViXGQuB5QaOISJpOpOD14YxWeqmjxK1mEOSE/D6DR3gANzhs/zddfP9IxNSuZ0jYFSZmSSUJwislHpay0YvtO4hs764DxhZh4r/SoWUKi6MknUMLpyk81LYH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dEWwukDCCR9JYdKf5b4Cv/g= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(366016)(7416014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IFoXSR/KFRddT52XToalTmAmf6GRLjwEujF3q2rxjzskKkcBsQFg6/RYZlmHromdFRQ50mfJOgY4szZADUlXTcYoTAbPCoawDe4R9N85gZtNoet9nGWMcbG0ZoDwm82Lp6Wpwr59ymmifWoAy8UM513c5OdBrLrsGwN0B/kG2zvq1G+oY+pUWMed0E0dIjDGvdE3d8Sv+yAcdJ9NBicUtbjKegNYuvtAcZvsdRVgXB01tA+KSowKbD3Y2qlhdEo6wBxU2ZWuiInpjtL7m8NGvqqe3UM420zhm89m/gK1AL4GF2Rnkq5skVGsBs0YPaMx7Gth7M3B9PPbhuPT7rHanR4OJ1GPUXivs9xLg/Pj2w+NJ0azVgHO9KEvBbKYfk7ZWY3tilLRqGLQWNL6elxJof4JpKLouvTi6rq/YSNh7cfOmzsgPz283csGk5LVILHeRDB58E+KoUxudfXw+Jna6b5prPxtjKKNDvOunWev3xO0VGvF5YKhCygbeFhvEpqfN5kv2eKIxUxkw+b+h0JeiBP6HI7k3Voqw1hP5lUc3ryMtBI3XKnnCtqtnMrIDC+nZVY+r4l5ubhE2M3cYkFT0h/tQz7j0nhCObh6fD/euQGqErpp8368WDUkt8EEz2K6em3xYRJHfYQg7mI8R2ndioD8G+gjT/11xeeDTwuby4AtyJXUFbMpZm7W89gB0T+7uwjVxNZEzkc0cThLG03PmsYRvC25avwN3DTOj0xkFrA9WU1+xpd1CZsAqV331ci49PFy4NKoV3FQeMlz8v0+W8J//vmLeIpHi0QfzUS8OW0v7OA5a+5AeyT2WtHv/YUbWpcS7nfZXxsU/1KfPNpaOf/oaurPUaWmXH3bUzpXA7ArTlVPLInV6NwNftHTVJecss4M/cqX87y/0Y7+b19Q7EjP9s1lI7ejFblR9srUeW+e88tqdjW6TlYO3Dng6Lj7rZkkBm505A2kTac84FzEjgwf47H/4iPwXp4o4gsfJOu1mJYY7gPH92UkQRkhUxSK77N1VHEFHU3z+FcnVSe1JfOJ4Zzo4KoDGxeq663bcBJqA5buZITbkMOi7YwMa3CGZb5g9AXlA40Tti6H2mn+cIkUaa9fcE/O/kojI/WftxNQBoNvjvqcgA0hsQcBne6Cje22nhvGpMk0o//PN9xiW+h+GdNISMtj14XhdLA4vtJHbAeHBkRz8Jy9VStzLm5+GYenq/y8S9m2DAqdlow/IUgcjXxsaN8ZLi0LmPgS6bdw1tvN6OKu6j5eYBW0E75l+zBCs/HMGsp5rIoXsxzF6Xb7AETVjCAsbLwFA9ynOoSgQcXtBMpb1MLsYd3vJC0VkPXojv77oa06znPxc12NiGI4QXxhv8YA6artVeNtsf1urHJnWS4Hl79F2Jeu4g+hRDziMObIrlWCQ7UjRky3E60G+JMk+9o6RvIPZFMfA2iFE6VjTT3Oa4h4MHb/fNTEe51+emLwFQ/hrSDkBpGx6hAJBBK+oKx+qkzbZm4hQSF2Z6CngmsbI532N0Ib1D9EF7UbGhMO0X4y1kpHi5Br346sI5mN9PEtGJI9rgZQbRXcQ8TCFvl4IJoMuBSMmvZd X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b21e910-ddc7-4020-0291-08dcad668b00 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 11:31:51.5145 (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: 2wthNgj5LQux5WaU8Q+6C0+SUl/KHxWIkU3Qjmb8XmRzWsPAdZP/+dpphrTLpC3kKvn1fyHPU2IqlY3Ll1hgJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7875 Enable regulator 'phy-3p0' to pass eye diagram test since it improve signal qualilty. Signed-off-by: Xu Yang Reviewed-by: Peter Chen --- Changes in v2: - rewrite commit message - use dev_err_probe() as suggested by Frank Li --- drivers/usb/phy/phy-mxs-usb.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 920a32cd094d..d9d29f0b37de 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -18,6 +18,7 @@ #include #include #include +#include #define DRIVER_NAME "mxs_phy" @@ -204,6 +205,7 @@ struct mxs_phy { int port_id; u32 tx_reg_set; u32 tx_reg_mask; + struct regulator *phy_3p0; }; static inline bool is_imx6q_phy(struct mxs_phy *mxs_phy) @@ -288,6 +290,16 @@ static int mxs_phy_hw_init(struct mxs_phy *mxs_phy) if (ret) goto disable_pll; + if (mxs_phy->phy_3p0) { + ret = regulator_enable(mxs_phy->phy_3p0); + if (ret) { + dev_err(mxs_phy->phy.dev, + "Failed to enable 3p0 regulator, ret=%d\n", + ret); + return ret; + } + } + /* Power up the PHY */ writel(0, base + HW_USBPHY_PWD); @@ -448,6 +460,9 @@ static void mxs_phy_shutdown(struct usb_phy *phy) if (is_imx7ulp_phy(mxs_phy)) mxs_phy_pll_enable(phy->io_priv, false); + if (mxs_phy->phy_3p0) + regulator_disable(mxs_phy->phy_3p0); + clk_disable_unprepare(mxs_phy->clk); } @@ -789,6 +804,17 @@ static int mxs_phy_probe(struct platform_device *pdev) mxs_phy->clk = clk; mxs_phy->data = of_device_get_match_data(&pdev->dev); + mxs_phy->phy_3p0 = devm_regulator_get(&pdev->dev, "phy-3p0"); + if (PTR_ERR(mxs_phy->phy_3p0) == -ENODEV) + /* not exist */ + mxs_phy->phy_3p0 = NULL; + else if (IS_ERR(mxs_phy->phy_3p0)) + return dev_err_probe(&pdev->dev, PTR_ERR(mxs_phy->phy_3p0), + "Getting regulator error\n"); + + if (mxs_phy->phy_3p0) + regulator_set_voltage(mxs_phy->phy_3p0, 3200000, 3200000); + platform_set_drvdata(pdev, mxs_phy); device_set_wakeup_capable(&pdev->dev, true); From patchwork Fri Jul 26 11:32:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13742656 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011052.outbound.protection.outlook.com [52.101.65.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50DAE17A59A for ; Fri, 26 Jul 2024 11:32:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993522; cv=fail; b=pU4Eeok2aZjzfiotz/b1K9OFoCLZzlElPKDX1MW+PD9ISTF7UbKiaEgz7WqxBVwtg+z3VIywKIoR4AJSwFIS+o2gVnHp30hQfRtCDe5NnFxAcTDb8+nMTDHwtM2z4qXoap6ZWnhQLzclbAyxZsHmm/IucjcOAA/YBuuo1XEi2OQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993522; c=relaxed/simple; bh=gIUhgs4AMHVuSZYgp+TUGvPuNHABTsr4VFyBSl3ps+g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bTUM/J82l6UaNJj3CI6styvHvibBDVSdoPChANZafv6EdBfiC4smjknI0DzPnqDYnTRhXIFO+qhOHN5rnNAZRKZ4A8GJrBdUNAudzIVkFM5BOgOBb+vY3c2BEVjWlT00FCZa/4oaZiAq1pL3x8+9GxMTyIZFX1d5Eo1q9Ugdof4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=k59mmxVf; arc=fail smtp.client-ip=52.101.65.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="k59mmxVf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jstDzqRtk1Q8J8OOimjeEadH1nAtSBeJYHGXotsZnEjMS0khoU7FHZn1zb/9QLvOOKDvpdtL+QFk2CXpblsi2LmBj7BS9y2W/UKQNaGQ1MeEjqgxTG5ecSw967rTsWZ3BVQi9r0liS0cOYVgL/g+77TPqZsZQbVPeo53R7dsrVtqX/NSKJlL1VcdOK2XelwaO81JV+u2sqzrPrQA1iXePZ69thwrb5PMvabj4TmTykjy2irND90FNEAorctey5LN2XgwrGt1UgCWiExrRczHgiOt1P+P0Rcge/be+ZvwGzI3o5HJdM5fcdp6eyfz7zUaQ3poPYR4ZKMn2x2pNueh5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=082CBnKqQey2usj2e1lYqAFijkTNNrz6CRtE3R6EVEA=; b=UtuOYFCGLtSIHv/jI3a2vatGn3Mqy2bVXTL/xzT+r0deVhaVA2FZzH7obE3hNmemsEVsYqFpcbqkC8BjjEihX9pz2V/AMqiwHFA06audJLL8gXOs+Nlm2OY4paUWzp0a6MRIFbUp8dKf2KFSi929q6qjZrkF635pMrds37bBJ7HYfwUMCG7wqCEK6utkGfa/3YjYQz5uu1Q0J+KQE6e9iS64DrNZGqDYTbMdQsnZ6HlIMO1DxT3SbnUHwuyNussSM+ya46COtnOn/pKMEGoqJK7cN+mDyh3BNQShsMrf6a2fg8Wfnavz4kdQf51YdlJ5gaV4Bh3PjJgfZKOgKR6oUw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=082CBnKqQey2usj2e1lYqAFijkTNNrz6CRtE3R6EVEA=; b=k59mmxVfLjtDQSsjHVlPkesDTvTcFOFHORCGDEfFJZa9xajIf8j3PFP7JAzWllujFAY9U0CGqn5z5Mj8cE0x2TmRmAFKk9br4t+2b+qvPFvwytZbszX5uaCWbwSEOXUD9fmfHm6f7Ho8whrSTWzMmcCKAGBYaeZPBOKPMP3x0HEDP9Yq0sGb2m8rvi/AmkXCAIR2Z0liJXqaZ2rB5+FUWNmSLfN0CFM23+3KdMRwW+svVGP2DQ0WMNyKS/Q8GIyaV2vIUbBlam9w/Gh32YYvIP4y373F5kIT1p9OE2VubJ8Z62q5JkZa4rf7WMfchcjhWUiDP2rC20ts4MvrR4AFXQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7875.eurprd04.prod.outlook.com (2603:10a6:20b:236::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Fri, 26 Jul 2024 11:31:56 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7784.016; Fri, 26 Jul 2024 11:31:56 +0000 From: Xu Yang To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, gregkh@linuxfoundation.org, peter.chen@kernel.org, herve.codina@bootlin.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, jun.li@nxp.com Subject: [PATCH v2 2/6] usb: phy: mxs: keep USBPHY2's clk always on Date: Fri, 26 Jul 2024 19:32:03 +0800 Message-Id: <20240726113207.3393247-2-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240726113207.3393247-1-xu.yang_2@nxp.com> References: <20240726113207.3393247-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7875:EE_ X-MS-Office365-Filtering-Correlation-Id: 5966199e-628d-4282-1d00-08dcad668e4f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|366016|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message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RrbDOOCXlFyWdsodrKIOoRSI9gByrFgk5H8WTWXRxsYBqO4eC3FqRd4y61KOCqqlVmfNcrSGdKgpvYLuG05e7TZNxVSFvBV/4GBWgiR2vnNCiA6QJZvNHWtu0v1jzKb+hDcEVlzuD/bwD1tauwV8hGcu430R7YyK02TZyw8Nl0gYmhRS3fTHwDkpkOHAO6Tp0Bz9wtMXh+452cGoRbZ6VPD5H6/VB4t5MXua0kki1vIMBlQeYd3hYeekiP2sB2GeRWHD4KvaBMY2IG2/oUg0JjU9lu4KxT6hhObI3Dmy6j4KzUQ+jyiyesHVCXePuuOqiSTA/5r1R9mqyPmro+HKnMfKonKndPLKKGehL7HxHESnzD9YgXA8gdGVVM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(366016)(7416014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uQ+U5UugBJrEh9MdAh6qKZbftP+7+7mEIl/Sv5UxuJaSBGGa5DPu5fYzccfVra3bH5iXMySGl2RrMqd/8BCRW92pKZo5kM5hyPNwrMYmqxKj7s4Yuc3VboE/xjXHWGtrWOA6YCWMz55e/rZTYztCNaQGHH6t4VUpLPCE5whs1VWodINi1Kg7RJP8Cev7wVlUqdd1/z3J31KWPij/tN6O448wqYN9ochH7bn9n//TeGGS87jyBSqy3aJjzS2qF+ZPBt3cMdImvVgZMvOBOl3831YrxD9+Z1TjaJQF0cOiFIQN2Lc4bqu+TO8qI/hq0dSpUg4dAOi1p7fxHyuDcRrtnSZQO6Q0wvr9lxAObH3aI9dI3lmVgB1kXwTMbTyInC+KNU2fE5vYQ2mmqmpbn/TwF4qPdhJWvVsCGtOKL7qhBQH7EXSJC4i0tkOZUOm95AND/Fkv5U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ElO5AV+fZZzqiaQPS6fyQpo9JXpoMKDqdW05AfCyr6rrBjlBvdz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5966199e-628d-4282-1d00-08dcad668e4f X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 11:31:56.8755 (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: /EfCex7wd4fDVy6sASvCibj4xVNdAUMSZ+jOGU6gPcrQ+AS6M1MCbcWEDDbDyX41cC3oinn+PfhAdU6CEwpAFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7875 IP require keep USBPHY2's clk always on, so USBPHY2 (PLL7) power can be controlled by suspend signal. USB remote wakeup needs resume signal be sent out as soon as possible to match USB requirements. Signed-off-by: Xu Yang Reviewed-by: Peter Chen --- Changes in v2: - modify commit message - remove hardware_control_phy2_clk --- drivers/usb/phy/phy-mxs-usb.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index d9d29f0b37de..e172af75f602 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -150,6 +150,15 @@ #define MXS_PHY_TX_D_CAL_MIN 79 #define MXS_PHY_TX_D_CAL_MAX 119 +/* + * At imx6q/6sl/6sx, the PHY2's clock is controlled by hardware directly, + * eg, according to PHY's suspend status. In these PHYs, we only need to + * open the clock at the initialization and close it at its shutdown routine. + * These PHYs can send resume signal without software interfere if not + * gate clock. + */ +#define MXS_PHY_HARDWARE_CONTROL_PHY2_CLK BIT(4) + struct mxs_phy_data { unsigned int flags; }; @@ -161,12 +170,14 @@ static const struct mxs_phy_data imx23_phy_data = { static const struct mxs_phy_data imx6q_phy_data = { .flags = MXS_PHY_SENDING_SOF_TOO_FAST | MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS | - MXS_PHY_NEED_IP_FIX, + MXS_PHY_NEED_IP_FIX | + MXS_PHY_HARDWARE_CONTROL_PHY2_CLK, }; static const struct mxs_phy_data imx6sl_phy_data = { .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS | - MXS_PHY_NEED_IP_FIX, + MXS_PHY_NEED_IP_FIX | + MXS_PHY_HARDWARE_CONTROL_PHY2_CLK, }; static const struct mxs_phy_data vf610_phy_data = { @@ -175,7 +186,8 @@ static const struct mxs_phy_data vf610_phy_data = { }; static const struct mxs_phy_data imx6sx_phy_data = { - .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS, + .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS | + MXS_PHY_HARDWARE_CONTROL_PHY2_CLK, }; static const struct mxs_phy_data imx6ul_phy_data = { @@ -518,12 +530,19 @@ static int mxs_phy_suspend(struct usb_phy *x, int suspend) } writel(BM_USBPHY_CTRL_CLKGATE, x->io_priv + HW_USBPHY_CTRL_SET); - clk_disable_unprepare(mxs_phy->clk); + if (!(mxs_phy->port_id == 1 && + (mxs_phy->data->flags & + MXS_PHY_HARDWARE_CONTROL_PHY2_CLK))) + clk_disable_unprepare(mxs_phy->clk); } else { mxs_phy_clock_switch_delay(); - ret = clk_prepare_enable(mxs_phy->clk); - if (ret) - return ret; + if (!(mxs_phy->port_id == 1 && + (mxs_phy->data->flags & + MXS_PHY_HARDWARE_CONTROL_PHY2_CLK))) { + ret = clk_prepare_enable(mxs_phy->clk); + if (ret) + return ret; + } writel(BM_USBPHY_CTRL_CLKGATE, x->io_priv + HW_USBPHY_CTRL_CLR); writel(0, x->io_priv + HW_USBPHY_PWD); From patchwork Fri Jul 26 11:32:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13742657 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011051.outbound.protection.outlook.com [52.101.65.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BECE1EF01 for ; Fri, 26 Jul 2024 11:32:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993527; cv=fail; b=oeRjP80qLUAxwGIzKOXrqnwgzobLlxUzBswy4Zg+oxcCZF57fUBTpFKA3PZT3mzJCc1ZyAFkZz3fWascbEBiubKiDSnmrEw6YAXhzJDeP4UghzQHgPbt4s98xB5gmup86xKPxxLhBOvyiOKxs2dUKwW64gbXG05RVgn/1dAD7mI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993527; c=relaxed/simple; bh=v6bH6zpaOqf9krOWJGnf8GWxm/Fj7TIQsL8qUXXocss=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dn2dNQr3u0mAvf5z3mq00GXind9bulBvNaD3yxDVJndpneFQ7G3FrpFSZ2eTXvmpyqtv2liUd5OWVR7uHopGb2tKPAwAH33Ib2HQxJYzgIRLUMz7eO3nscwyLpHWzw6Art3Ha8gCKcXw6DiF9nblefkD/BGk0v09zsBRpC/flBI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=nFA5z6m5; arc=fail smtp.client-ip=52.101.65.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="nFA5z6m5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dNDSUSJdH3Q3uzZSlSI9leNGXfN4Wrvtp/5kgEsX6yc6oSCbo2LsY8Dw6C+f9FWcVnMgjzxs4amgeO/92fXvb/C1meQDnDz03D4OSiAPYBiFmcAYfJbGNlpkUZjyMD/ODGE/nOuqWH06nD+9PclR0MGBtEgoVSgTUpqCz/ypI+FPXEiNguHKUk7JiI5O7YGebeA4F+7e7b7L8vwn3GkvmsxCECuIQjP+JdoAUDrPd7NPH5W3e5FWny/rMKHRpcpJXT27fCv7XM2BRy9W645AF1rhUVk5Jt5ecNPedUKVxkB3EjUhpEEy+wvAjV3UJk4DtGr33Wt9siGp+RWrsUs7dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=rra4s39gFb+VkIVbwXvzqYFhpwsivmGX0yiyvL8M4EE=; b=o+NGc6GPPqPR9Ikh2XWl1zM6jFYTkIsjdcOWqNFxnQjRXKXY+/1HhOLMD6qPcMMHbWGz7UsnKYLVpuC11fLjPqiI84OJ38wVqxlRpd7gRyvkr8O43LFNaR8OyqJv1k5pdXRFBE60caVpXnmyGKjxzXYtrvNUeKp9mFs/hII6iKJIctcgEtyq5+zl7eQR0zSzIkk0bzacFqj7RfsJPJXGVtuhJCBeV9QN3HK/Z0bU/H7RnBs50Zy/0TH19/paTKOmwNnRz4NQbP5I4d42CQj+ZDw08HFwToPG9YYHNSV5z1NskGJMuL5gbDkFkXM1lye0bPzvj4un05J7n2cAmMGRmw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rra4s39gFb+VkIVbwXvzqYFhpwsivmGX0yiyvL8M4EE=; b=nFA5z6m5h2V3Npd036rrSWXWJT/v4Yeq+ynl0wBlkHL/wMClyWGaGgUsYZs4b/Lwyia8fU1J8orC44ZMnJYDVJLeglJcbLCinljWM/oDKYjMD1XxBT6s5jhE3E1NSLQSJNKJfX5LfHMvT5tr+BwYFLiJ4REwV/zel8QdfJlG/CCxw+6st6yTMWD4ekF3dJ/UNmdJK3a+vawTowU5acodtJwvKBrN8Hrrkb3fdDcX/YIEKA1AHGrLeK4iB17DFC8aJP4BtzpEa7GRdPpMfVVmltF00IVvtVRmHFXqEf+J+96mij7HhksdmexCYHmIx7IFNw/Nlcpopdl0JPIobapiyw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7875.eurprd04.prod.outlook.com (2603:10a6:20b:236::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Fri, 26 Jul 2024 11:32:02 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7784.016; Fri, 26 Jul 2024 11:32:02 +0000 From: Xu Yang To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, gregkh@linuxfoundation.org, peter.chen@kernel.org, herve.codina@bootlin.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, jun.li@nxp.com Subject: [PATCH v2 3/6] dt-bindings: phy: mxs-usb-phy: add nxp,sim property Date: Fri, 26 Jul 2024 19:32:04 +0800 Message-Id: <20240726113207.3393247-3-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240726113207.3393247-1-xu.yang_2@nxp.com> References: <20240726113207.3393247-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7875:EE_ X-MS-Office365-Filtering-Correlation-Id: bcf93a57-6e31-410f-2aa6-08dcad66917e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|366016|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: 8Q8dHGO86jHdDUIQTjN2si9n69ME3CvgPZ/3LVcqmrRgN5lMPbkGa2Np53SI+yfiw0kXuFsWhLr+Kcb0QjAycOfdvgiTfODE2VbW2dHlz9RNIB5DO2SiSCYB/Fqq0AIcFCV6X086dxfcmjNPJ/6db6xyCo7sqK0WZoMxH+rcqFZ8auUKuMyXnRJlEpe4WD2ZeRnoS4EdE0f6qtxR9C/kwCoupaHUOO/qpGS9Xpceh64hbYHxJzuB918SgGDzAGHnpAlc2GJBpBM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c3I5dBYSFT1FYoUJxZJeXJdePFDmrIpSrjT3/LmLa8I1frGvho9aS2I4Pr0vIrX6CPCmzZECys2oCSdakxtkL1iQkVL/1c90QuTwjXXz5w= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(366016)(7416014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H1g7bSBuWxSUWC+05s+O3XggpPKaRKAeEJPFBmUcxYNioTRhCNF4fVIbGyeyqwxC1jX2fqJTsjbIrIKWlfP85EjftvsUbxUwn8TGU5d2LIiXoh7gMqy7R09wka/tSSWylEKWf5uKuTkUEqzrlgkF9G/NbxPR0ZX0KAJ606D+YJ/BePPOjxEGa2ICr0rEPHxj2lueY5K2dpL5hAyv7XiLZpzY4mLxS7m+o9ei6fDXpl9i0ns3ydPsq9MwHpzsUrWJiVkRAESMMNkhmGdlz9zu6SvNUB0B328e5LnQVYwOAmAGapbLXxlGOj1dn0lL7UQNRQPrtZaCl/2HB6CsSNuWEOpnvG7oqt4wv7H3dRT3HyDUD/V3JR+VTP0c++lYwpVA5Vl8lJZ1rLz4GCA5WDxWqvtR1p2DIxaH6QceyZA72+p/tfk5Nc8QhODU2UjrP5cdH1X2/TAUe1Pnpp9oN/9MMzU5Kdq5V73dmaarVy/MREhtOnGYt7ldCoz7Jdx083c5OnOZtN9RZM10x6rzFSU2J1WkKdu4mrPYg2mtgzRjf0ZHC1VMYVnZdUPWW4DuWpzaLw6/SQ8ePD8+GGKPsFBI/rN7jGrTkzxDtHtHjdyfGVaoboWbJTd0IXashpyLeQTbiocRA7uehH+frR+sscLpdYMkigFcnOu0MlAsCwmAvQXmua6F588csGwucpFv0u7ks6KjOlZ867Nf6gblusJegl1cDJlUAanACLtW5ceeaWoWyxREFwxk/BxomWZod3hlWIFKBjWYjGcVgwpv9B9AWAYiHq1feqnX4R2dJORbCTE71Cqr3/kqaI3UnL9OGq/JvCI23DjtBfO/EnbWRVicAMtBS7/Pti3/f6ERT7lXQqshFfcUEzfpwiok0f4c3jxGnDdr4N00e+rSbZ2rm0j4wI+ccE9F/B1SaMRQaZPTMD/19sDXJiKPCeG0TR41m7nK1FX0NcLRrQWXnKOKKlhZdXqOP/DStA6tSGJ/9bmHZqvaxyVgT8dnuwTd0gxUZ9LczdOfAq/4gpDQjLuJKk97jYKIdlW1SCPf6E14m5ZZ2QEI7XndYsaMJXXX2aUWwjOIt9Hvw1yMQGASoG5UW+sodNUGEeSnHX9CP/s/b45JFMh2i8rCmrlgfUzG1XxgreV+La91P9lLfKdNvie/cIMPDzGFosEuzUNuSiU0H+78+fPmgx8EtbJMmI5lc/i6MuOGKJo874oxa6uQ3zjEhwSNvZJRXkS8CZ9tQMCqFeFshKlpe+f3kZPIhAoO4AorevTtBjbMnEUEN/A+lUrlbl4b88tY720aBTq5klPYE/GH/90LJNIX7RmDgTaEIAggLNQrqbJxt6S4Zkb59wef0UHOWtRIqotb2ELoLJpQXvURm11Pd5sh1fiTzgLEyTIHJ3KUBduzsImHD27ZLvs05TLk9UHZVxJ81+BlWJnJJ5pZJG04l0Vtqp9qX/WorHL9YgrLJ4dG6IBKy2es4DK5IS5PEPnpOjuJer/DaG96YfXI3gUfNdVb/vMNLUNA5mNkB2jZ9+d5cXJKOQWLGOtlnaGPYnXCOXWvfPr60SCVa+Et4eJQR6jRwrEC6PUcMZ8LFgvT X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bcf93a57-6e31-410f-2aa6-08dcad66917e X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 11:32:02.2066 (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: 3A1k+FbGtGuQNUunMt+oqT1S6GRWkUUBxb3Z0bcQ7czN6vvEOcDaabtCC6sch5UjW3DpFYSuRJ6N44piTL0GGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7875 i.MX7ULP need properly set System Integration Module(SIM) module to make usb wakeup work well. This will add a "nxp,sim" property. Signed-off-by: Xu Yang Reviewed-by: Krzysztof Kozlowski --- Changes in v2: - add else branch suggested by Rob --- .../devicetree/bindings/phy/fsl,mxs-usbphy.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml index f4b1ca2fb562..ce665a2779b7 100644 --- a/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml +++ b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml @@ -87,6 +87,12 @@ properties: maximum: 119 default: 100 + nxp,sim: + description: + The system integration module (SIM) provides system control and chip + configuration registers. + $ref: /schemas/types.yaml#/definitions/phandle + required: - compatible - reg @@ -110,6 +116,17 @@ allOf: required: - fsl,anatop + - if: + properties: + compatible: + const: fsl,imx7ulp-usbphy + then: + required: + - nxp,sim + else: + properties: + nxp,sim: false + additionalProperties: false examples: From patchwork Fri Jul 26 11:32:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13742658 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013024.outbound.protection.outlook.com [52.101.67.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02E6917A580 for ; Fri, 26 Jul 2024 11:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.24 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993531; cv=fail; b=Li/COsfNcs2Cmey+JaDFO09pH/iVKSR/JkYA7fh+LYSl1R7w5Erm+xUAwx4otaFrqxQU6yCgaIzT9K3RzHzPGmNyjHSa0bI7nIudVoiqEBhvBlX4Rq5rPlDJ6VExdoiKhkRucOwWB4J7X+0dhRtZWGRpPixyp6nZriMopJv+UG4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993531; c=relaxed/simple; bh=mx8S5Y+sovolL8BCcjq3tlzQkPCTxz055aVq/z14pNs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=oHo9eXn9OA9dUTDdjHopTIPelkNu2TJkClxdhBvrCvt3Lie0yIM+vkRSo2Gqo+OIldQOHI4SiqWE+tomQc4Ydd4uLMPFLyxzhoUxUY3kIkk0IXulVC+nrjEjObKM2KuDATaRdAMp6plYBN9AXImc4IPs00YRFjuNfokg5s8bK5A= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=N26crSOa; arc=fail smtp.client-ip=52.101.67.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="N26crSOa" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EJEn5bafGQLiaQ7Xmw6NHuilmQ3HsGh1CW5e2yqQ8f1PG3Zujt5FwyBkJ+H8M6hNs+v5hICedgm3U+8RzS/sDJvuna4EdpZD4v/nDdsgSQvuKMXDtwcIKr2l1y1LlmQckmeOZfLiqzNy1uYi1KYCwhbPVH+n+nTc2LZgT6txvzC5O2DF4zCiSleX8dT7FWE8DcVe3/tyFi/aJYXqnFrAs6CwneT3zNsb160pA2SqlvAEcpmW6u8IPI8C0CyK+9OJ3cux9xBxcbrXg1eWeronnY9JWf8JqC8sbSpmrRkVEemxTmhrkSrrHEWndPkccHppOpIhv3CTlTQ1ybUGG+q1wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wGcrTMWZl87AnWcW8f2fAeml0prGEvCgvMx018WqKUQ=; b=xvAMoAHZCOozrXB2j92XckKv3Xs4s7N/hvClbLwGcm0yOCmz2HSYHL1ELtgkPpA1zqHEZv+qYq94cpaEvjIKlRQKtOF29baFg5rasWO87wFMuf3mq2ipVUEy/R9mUO4MSD5Jm8NnEwz+v3YL4vwu/YXGwV7TtIE1GD7QoDsJcC/7Xbos2SBU+bNp5tKkSjnxim8xUYU4ujaVbVIgD6Kh/Y1mYfIF3w3E9If4HkxfcDrAc071dTvc7XBxOtt531dv3MdDRWVsbMnmBvcQkNMmYKH9zm0fnYoCWh1YE0Unn+aNzN2E7o5kO7ROwJfhnHfvpukPJWDPfgiuZVwITa9pDw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wGcrTMWZl87AnWcW8f2fAeml0prGEvCgvMx018WqKUQ=; b=N26crSOa+x3DOk6OKY3EAx57G3S0hMvLEK9EneqgF4k+/HgsdjSKpzj5er/gLkUhx8mxQc5Lnvx+sdWno4AmxSNXCLDwWIcqIbtoF5IFfLrYbowyPSLw5g1+dUkErIklEkXOJWewxjJQaDMO3nPljej99x2p0gPYmt/QzB2y9usHqRwqVr0WbJB21hJkkMwWZco9FCrIFa3l5lEEfJ1ZPRDWF79C60xmeWA7hs0hhALoNEXYyD/0hcNVEja5HVaCyMbafvAWpkp4ir4rIvnRfen+nOezbebUT15wM7lVDMLgY/0AbRzT1DNT1H26LGRliYRKvWnC4Z1xTCmmgOeLUg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7875.eurprd04.prod.outlook.com (2603:10a6:20b:236::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Fri, 26 Jul 2024 11:32:07 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7784.016; Fri, 26 Jul 2024 11:32:07 +0000 From: Xu Yang To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, gregkh@linuxfoundation.org, peter.chen@kernel.org, herve.codina@bootlin.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, jun.li@nxp.com Subject: [PATCH v2 4/6] usb: phy: mxs: add wakeup enable for imx7ulp Date: Fri, 26 Jul 2024 19:32:05 +0800 Message-Id: <20240726113207.3393247-4-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240726113207.3393247-1-xu.yang_2@nxp.com> References: <20240726113207.3393247-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7875:EE_ X-MS-Office365-Filtering-Correlation-Id: ebdf9fa9-26a8-48e8-facd-08dcad6694ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|366016|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: K0I4lICzVcbEX8aoemka6eJt9eAROEG0HxsvJwwLCScd+kS/Lqq5PaoA1dcFaR2coJ6/To4ihX+uhm6gvKY4RAWTo65V5hvFg8CVctvSjesCn0a5dA+UGszbBFO/abgg/r23sc376p9enZgt8zWPhlvhFOpOlSjwQA9sHjAzBiZ1KC4bPVG+JdL1Az2Z9/Fxo6NqltE5qVZ8SAw1Iy3vJDNj8KCRjsThrgLW2bknWyl7SeKo3N14O+SrseBgOlKv5J43ju5eOeBqFvDK+F1R2nG4bt3niJkDwbrJplN4koYE0Ke4R7OF/fUtQk10Eq4cJ0xbI+gfKAOXHcvZXvpFK929SujRmpCvOLP+byAaQZnDZaS8ZFRB5pjurzGZPJO/LbtamJs0AlXh4OSFLFCy9u0b/TObjJKOgd8ARwI0ZF6wWqhTgJpB4zw3nZgPjdndrnUgyPOxmpZ5R3Kk5/QxxewxQmLj0uO49CuUjAwCGmc6f4sub18bwspidLqB2scHMqoRd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z3MDlyzQBdGk6SNNmmbLHIenn8t9KQK3iwGHKRhXo1crHWUg0B3YYN+2VIpSxNERrl1NKewOnqPtnR+T5dWGNKtAErY3fUwwOfUHZ54xm0JRVFvCzP0JHNvC/G1mMSSRgpjSD+XZhaTbEWq19gv2apsRgAzetYyZE3+CaYeNzl4poaas3jASAnkWzX8f12qb7UZj68N+R0fG5Z657Uw9sMHDFTdoqaTI1oVomXftBG+gidyQO9sFBekNAiZe19vUsZym5tK1gqrmD7qJW8Yc3TJ4eT68HIuL5fH3NEU4MlLmYSiSGqiyZSJEXryWgOSqP38eEgwGJK7bV+2MriTJfMlRd5hZAHv+/1e/dLtfMJnoJ6gOiefQihgl1w/nKMdcXlHYHv91r80uO12Ooi13ggP+SXn0Dbb9a95AaE8ShaVjKg44IZ+yoOjaiWl6IcMKw2zRtblNANRzGqWjj8S7U+vWnovYiRHUQfkY/2U5VXkm6Hpe8aSV//O4O7BYSbm9iBPSjaY7OF2+oF3tOZ8ziLbhM0vFcH1k3vMfNf7t0upx6lg9u8eBPoeI3D8XBPWTKk1DxLo+TS4mPHelpu0YZ0cj31d2pK0Fahg5ZL1bPf9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebdf9fa9-26a8-48e8-facd-08dcad6694ad X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 11:32:07.4471 (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: Sz+Lq9KJWlEhs5mRBTrGman7e0C/pA/Il8Opq+2KMo/n7/ZVej86mvs+Ewz1FdqtBDw5Qw5ZIQiFhirjoWgJJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7875 This wakeup setting can enable USB wakeup function even the controller's power is lost, and both A7 and M4 are in VLLS mode. Signed-off-by: Xu Yang Reviewed-by: Peter Chen --- Changes in v2: - no changes --- drivers/usb/phy/phy-mxs-usb.c | 41 +++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index e172af75f602..acaae22df3ba 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -118,6 +118,11 @@ #define BM_ANADIG_USB2_MISC_RX_VPIN_FS BIT(29) #define BM_ANADIG_USB2_MISC_RX_VMIN_FS BIT(28) +/* System Integration Module (SIM) Registers */ +#define SIM_GPR1 0x30 + +#define USB_PHY_VLLS_WAKEUP_EN BIT(0) + #define to_mxs_phy(p) container_of((p), struct mxs_phy, phy) /* Do disconnection between PHY and controller without vbus */ @@ -214,6 +219,7 @@ struct mxs_phy { struct clk *clk; const struct mxs_phy_data *data; struct regmap *regmap_anatop; + struct regmap *regmap_sim; int port_id; u32 tx_reg_set; u32 tx_reg_mask; @@ -772,6 +778,17 @@ static int mxs_phy_probe(struct platform_device *pdev) } } + /* Currently, only imx7ulp has SIM module */ + if (of_get_property(np, "nxp,sim", NULL)) { + mxs_phy->regmap_sim = syscon_regmap_lookup_by_phandle + (np, "nxp,sim"); + if (IS_ERR(mxs_phy->regmap_sim)) { + dev_dbg(&pdev->dev, + "failed to find regmap for sim\n"); + return PTR_ERR(mxs_phy->regmap_sim); + } + } + /* Precompute which bits of the TX register are to be updated, if any */ if (!of_property_read_u32(np, "fsl,tx-cal-45-dn-ohms", &val) && val >= MXS_PHY_TX_CAL45_MIN && val <= MXS_PHY_TX_CAL45_MAX) { @@ -849,6 +866,22 @@ static void mxs_phy_remove(struct platform_device *pdev) } #ifdef CONFIG_PM_SLEEP +static void mxs_phy_wakeup_enable(struct mxs_phy *mxs_phy, bool on) +{ + u32 mask = USB_PHY_VLLS_WAKEUP_EN; + + /* If the SoCs don't have SIM, quit */ + if (!mxs_phy->regmap_sim) + return; + + if (on) { + regmap_update_bits(mxs_phy->regmap_sim, SIM_GPR1, mask, mask); + udelay(500); + } else { + regmap_update_bits(mxs_phy->regmap_sim, SIM_GPR1, mask, 0); + } +} + static void mxs_phy_enable_ldo_in_suspend(struct mxs_phy *mxs_phy, bool on) { unsigned int reg = on ? ANADIG_ANA_MISC0_SET : ANADIG_ANA_MISC0_CLR; @@ -869,8 +902,10 @@ static int mxs_phy_system_suspend(struct device *dev) { struct mxs_phy *mxs_phy = dev_get_drvdata(dev); - if (device_may_wakeup(dev)) + if (device_may_wakeup(dev)) { mxs_phy_enable_ldo_in_suspend(mxs_phy, true); + mxs_phy_wakeup_enable(mxs_phy, true); + } return 0; } @@ -879,8 +914,10 @@ static int mxs_phy_system_resume(struct device *dev) { struct mxs_phy *mxs_phy = dev_get_drvdata(dev); - if (device_may_wakeup(dev)) + if (device_may_wakeup(dev)) { mxs_phy_enable_ldo_in_suspend(mxs_phy, false); + mxs_phy_wakeup_enable(mxs_phy, false); + } return 0; } From patchwork Fri Jul 26 11:32:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13742659 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013033.outbound.protection.outlook.com [52.101.67.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18CF317921D for ; Fri, 26 Jul 2024 11:32:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.33 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993537; cv=fail; b=tmpr3gW7CGW3BoqTxHs0oAkJUi1JuTTcI68mF17hxbov/Nv5WdffHDaWS8V2HDYHfZjQkf2i3PsH0w91xx+iezZMxOEkKfq1S3PWqCMkeb2DgSByXGc9gEa6z01SUYEUbsfcXzw8h1AgDgXbevQohI+jptX1/14ubrxzCd+klTM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993537; c=relaxed/simple; bh=/KqYinQrLMTFy1/Gb9rNLBIGwCKengdInM1ywIFOqgw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=C+FMh87rUuproD/CeOhu+aVNRZkE+DzYt4Vcqgt8WDwSagca3L3wYmy052mcmVJVMbNgOw7tXBwjV7mSzjuz8maLTEVqmqG1ng146xqara8pf3mNOYvIaJBoU/D7CLftyH81UHBP7Br4loEGcpgL3gImut/t0aNpdOpqViK2Lag= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=YRm8oPMD; arc=fail smtp.client-ip=52.101.67.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="YRm8oPMD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=g3OCTXA6gV2ZuEI97oeHg5O42w+oRIUI7HNjyNRxujPXgdVDMs2X0tGdeSEsTpEBDsMWUASLtDQR7OPzt4OH5I/IPCDFW/iwoFxRtBBNKyMjSHmMA8wx8xz1Wgi3VAn4RVDsxBnszQjrr7IgmP/bSvlgrPfep3KsKHV8XDHf8+1tFPKjoTt4x/ZmMt+q14uoAKxJBsazaDv3szX4zIIFw/w7PwKTsA/WZAImEWN2aSuD4ZbujbV5hqXWy/f90EMMfceuu6P9LfUZmcDuhQIN0L60YD3WoyIiwUF5t/4KPQR5NUSYpCIf1OL5buO5TokA3zh4R3usvKTOJbWI/rjIyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=mc8GqDn4aissjR0kH4vFaFrtaqYPqnSkoWdeaJsETiM=; b=FnlWsmbBMt0PA6F+iZ3G0RgGi/YX7ECjaCzZc4JDjhvyhYoSXl+BjcNHAzXRiVXwZ++4uxe1ZUveOnMy8aCVV9rrRFEx+oRXn91phMK6EW9B2jQsom8e0SJUnR8fSxwXO1Zwae8oSIq6qNJvXjsVg5FPJrlL/22K6g64Z/wSfKfCWMgn9F+hZW0RtaymeWm4jvJiGwdRBF+JL3FM8lP6jfqKlX4sl9LilOwzYyiOAeUCdC61tMRjyujeM9lmw2YogCcoABwCYlfu+KtIa4D9F+hL6qQzW/XsM7mrV292dcW9Fo73gqKGEKaXkkYicv+Gp6D36ZI1EpnE20r6IBA9PQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mc8GqDn4aissjR0kH4vFaFrtaqYPqnSkoWdeaJsETiM=; b=YRm8oPMDzhdCfhcm9PA0Pr682nEbRz2VUoK+Au2g+5GWwUBB7bBvEvW36zHKcIInEVehbZiNjlIh2ZHesNvbpe8hoobvsDZNZbL04NBAhMCvPamFXmomWw0BYWCqznBTgJ31LDuuX4ISMDgSu2v3qrVHLM87/++M62mdT1Hiq+kJVQFADShfHHeXfQUdtKWKjtRAvQp/WPU6TQO8DbojfEPQqd+dmcdaASBeC25b6hY7T6q5jFFWZylbR5ijrOcBNdUuux79PlHRurLw6p09VctosLnO/fV0BwHyMJVGjQG4J3mCn7IJoD+Xzo1whOLcS0o5ZrYtPnk6hZ0QWKyUKA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by AM8PR04MB7875.eurprd04.prod.outlook.com (2603:10a6:20b:236::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Fri, 26 Jul 2024 11:32:12 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7784.016; Fri, 26 Jul 2024 11:32:12 +0000 From: Xu Yang To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, gregkh@linuxfoundation.org, peter.chen@kernel.org, herve.codina@bootlin.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, jun.li@nxp.com Subject: [PATCH v2 5/6] usb: phy: mxs: enable weak 1p1 regulator for imx6ul during suspend Date: Fri, 26 Jul 2024 19:32:06 +0800 Message-Id: <20240726113207.3393247-5-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240726113207.3393247-1-xu.yang_2@nxp.com> References: <20240726113207.3393247-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|AM8PR04MB7875:EE_ X-MS-Office365-Filtering-Correlation-Id: 20b70f7c-2c6e-4070-1dc6-08dcad6697c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|366016|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: T3jb3f610K0D2x8TohSTbxaO8jx97HZDY2OCBE9FQNXeVsP0t5i7kqhdxAGLxIB3AUEELm8lQD0YdhJuqwoKw3V7/Qqhqm24GZtDXXUR9yXrCDButjCRpLcAiQHsy8GI9GesR4KLpMppK42PDyP1qQ25Yb7eydInVYO/tEIn8nsm9z6Hm8nJvu95WbP089ZJMwwHA4kIwpg5sK1nsM3MtXuCfUtscNFDwfLwwfeduBXazobRUfRhmJjt2AzvIQlIc8tND5Q0LnaNJET1UfeBxncYfM/s3uLUFpckbbXa1HJWCRnKTKZtB06LkxcSPc3z8/sUGiQcGP4k/nEsJfze4MCYkh/C5ylmBoK4hks8blKFKzj4oxJT/ehFI/EmnTFIYuZLyoz1aqIft7Hppy/8PEFUm30x5TkHZJhBZWEz1Vc/S44dzgB84IVecaA2f5MiveXOkv93+BbVEvcgcMRYttBlOvKVVe21bfE1e/2GvLNQabbiuPlDqQaU1ICPGm1D8qsXfQbVZwVgAvZ3TqX49jeYWgUaDnq+VINR07l3808NIRXDM+KxhCk2neD38vLkQVt8uyqVJWvhbGZ6/APGt3opNEIzPZE4FQDkKqXCelkyQPvVJ+01rP76iI8aSUhO3iR7IxcdJMeaRCMipXU+BKtICw2Z8LxLgo/1La/hSSF4lAOU/f/N9CpEsDSwOHfK1u754Jbmv9BAJM+T+dBCfR/B2FPGwufjIvC+7CV2l4eCAKtHvc8OZJcxflTYrJ45fW7fLxxTkvkfhZvBQgQwZj2+vES6t2GqmSeks1T2dkb1Mge+whln5tf4h296psyGHpuvZyTS4JF7sUqKx9tPujTbOmnGfj7bqZCCpP9Gk3XLGu91FjchtNM7ZKbXHcQuiHigZwflzWyBfNerxiiJ4f0OrsdLois9++3lngDg8yNBDCx4Td08Rg7mF4DTNRgZQlJPWford1xgm+QaxKtBsKp6aAlaRchPv8S/z6NSrHwhtABmhpoGfBZu1ty1aHc1+NnI2/qKysCrjnEfv+tqZ2+7uLqm31TmzWbsSAxzSeYZ5ZMA2GPZlvaM3cEMQpxmFc0D0eEjFYyovp/EXS9ppoPSZK1+S5O1VFyoZgH5rDmOduMI5Mxm5ReJhEDYaxNGBJkorlyeZ4T2JUTFYELQw0wyXPScH4MJZRMz38KCYBaihY4aJIIwSGAj7BEDJx94YvtGMWwo+uNRXTDMKBWzl62C4GpOjfayIrNtFs19rYbRLTgZHm37GD/luVh8J8c1Fm0LuezwhVCUlfcH9DK0BNatshVp4OdMP+hq8TaL0T6TCi5RZL64M605cJGJF/JTK3B1adKIzhtxY1qWx/4Ci3Om2Wv6aDd+7svMf9V+F5qZauW9iMfpG8gp+uMgiYWM2yVkNITJK9Bn0B06ybnoo9z2gURRvt9pBRdyzyo4kxA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(366016)(7416014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7j/wlND+iKHJp4P6H/HHfYoTS3A3XcbmJ2VenPBx4rzzeBpL/DujAcGr+dVEsi5Nl45l+Ss8oMxK6h2M59Y5JosxDU8X8wD7ungtwOt08RpnpTO58z/idIODXeBfZE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O+WM0f+mrtWCf9hfgzhGFIJ/VObldFtVdd8VhMhlvK54QjFLtsCB7WLqiQyKLGDUUzCwduxFsR5eIU74awmaj3xgZCDP/dEN5+iAJwdO3Zg2nTCJnL5jPn7EndsKeJE59tL+LBuxdKEfgEnEVDEOb0n0dLQExgDe/9SUA4dKIt7i5nPVgb+UD3z7YyZk+OQk5cVN5u2lGfo17amcizyaaSNiHUnADKQD02Seu/Ckh3js6BjEV9DICnHILAdj9NsOeAj4vRHuojpWDeaMLP/Xlk0H6aAOagxIE+qSS+SwwYkadMkTbekz69WYOxJgL4cCkebnmLHDg3hqBGzNZpH5R3M1EVi33mFxWU1GUyHB97rtFuMNNW0Iwsb3jF26GdVQoSeWi42hVv8/ROpD40at X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20b70f7c-2c6e-4070-1dc6-08dcad6697c4 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 11:32:12.5986 (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: 1dxP1SW1KTQKFN5Y2baL35VcL7GS4acc+GLyT6Py5+kZn6+B/tngGtjeW7mGCkACZl72A2/d0KWvYbK9Gkatsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7875 1p1 is off when the system enters suspend at i.MX6UL. It cause the PHY get wrong USB DP/DM value, then unexpected wakeup may occur if USB wakeup enabled. This will enable weak 1p1 during PHY suspend if vbus exist. So USB DP/DM is correct when system suspend. Signed-off-by: Xu Yang --- Changes in v2: - modify commit message --- drivers/usb/phy/phy-mxs-usb.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index acaae22df3ba..cc4156c1b148 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -71,6 +71,9 @@ #define BM_USBPHY_PLL_EN_USB_CLKS BIT(6) /* Anatop Registers */ +#define ANADIG_REG_1P1_SET 0x114 +#define ANADIG_REG_1P1_CLR 0x118 + #define ANADIG_ANA_MISC0 0x150 #define ANADIG_ANA_MISC0_SET 0x154 #define ANADIG_ANA_MISC0_CLR 0x158 @@ -123,6 +126,9 @@ #define USB_PHY_VLLS_WAKEUP_EN BIT(0) +#define BM_ANADIG_REG_1P1_ENABLE_WEAK_LINREG BIT(18) +#define BM_ANADIG_REG_1P1_TRACK_VDD_SOC_CAP BIT(19) + #define to_mxs_phy(p) container_of((p), struct mxs_phy, phy) /* Do disconnection between PHY and controller without vbus */ @@ -196,7 +202,8 @@ static const struct mxs_phy_data imx6sx_phy_data = { }; static const struct mxs_phy_data imx6ul_phy_data = { - .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS, + .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS | + MXS_PHY_HARDWARE_CONTROL_PHY2_CLK, }; static const struct mxs_phy_data imx7ulp_phy_data = { @@ -241,6 +248,11 @@ static inline bool is_imx7ulp_phy(struct mxs_phy *mxs_phy) return mxs_phy->data == &imx7ulp_phy_data; } +static inline bool is_imx6ul_phy(struct mxs_phy *mxs_phy) +{ + return mxs_phy->data == &imx6ul_phy_data; +} + /* * PHY needs some 32K cycles to switch from 32K clock to * bus (such as AHB/AXI, etc) clock. @@ -884,18 +896,30 @@ static void mxs_phy_wakeup_enable(struct mxs_phy *mxs_phy, bool on) static void mxs_phy_enable_ldo_in_suspend(struct mxs_phy *mxs_phy, bool on) { - unsigned int reg = on ? ANADIG_ANA_MISC0_SET : ANADIG_ANA_MISC0_CLR; + unsigned int reg; + u32 value; /* If the SoCs don't have anatop, quit */ if (!mxs_phy->regmap_anatop) return; - if (is_imx6q_phy(mxs_phy)) + if (is_imx6q_phy(mxs_phy)) { + reg = on ? ANADIG_ANA_MISC0_SET : ANADIG_ANA_MISC0_CLR; regmap_write(mxs_phy->regmap_anatop, reg, BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG); - else if (is_imx6sl_phy(mxs_phy)) + } else if (is_imx6sl_phy(mxs_phy)) { + reg = on ? ANADIG_ANA_MISC0_SET : ANADIG_ANA_MISC0_CLR; regmap_write(mxs_phy->regmap_anatop, reg, BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG_SL); + } else if (is_imx6ul_phy(mxs_phy)) { + reg = on ? ANADIG_REG_1P1_SET : ANADIG_REG_1P1_CLR; + value = BM_ANADIG_REG_1P1_ENABLE_WEAK_LINREG | + BM_ANADIG_REG_1P1_TRACK_VDD_SOC_CAP; + if (mxs_phy_get_vbus_status(mxs_phy) && on) + regmap_write(mxs_phy->regmap_anatop, reg, value); + else if (!on) + regmap_write(mxs_phy->regmap_anatop, reg, value); + } } static int mxs_phy_system_suspend(struct device *dev) From patchwork Fri Jul 26 11:32:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13742660 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011059.outbound.protection.outlook.com [52.101.70.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF3851EF01 for ; Fri, 26 Jul 2024 11:32:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993543; cv=fail; b=F0oPhVDdoTf0WnT9Gap7pbMzkOfb4u9WidgFVG2gIeWQ1KdLC9kKlQolW4NlnD+IjJPoRu+t5naJoLwC6EQ14XJtUUXyRHAMce4Fm8T207vonodwwGZyHYwdqXUQ9PEMAwbEB8LDddkHPJWfaFxpcLim6+ueGhZjbuP6aYCQChg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721993543; c=relaxed/simple; bh=nqkYbRQvxF8gyR00VpKDrj87GISzYXgFltu4UWPAUwk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=EgH5eCdTZbJl+EUGU5jQFtIOKBc/kKqCqyf0HSXSQwdXzQvjEPRpvy3Bs1zlAxzSaG7VUzcYYDYkJ0d0aXHQBxY5PJ682qIaklpmM1cbnPXqeD3NsqzwN+QM2xXdHDJu/2i7Lds6n13wpeZFocHImHZXNx3COwT67UJ7EFKdL7s= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=U7agIDPZ; arc=fail smtp.client-ip=52.101.70.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="U7agIDPZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l8Tl89bR6YlcU10gWYD6SOkD6dl60TdC96SHAGqkUuZsylDCMEz5dtQXO1EL0MWT8i6LIAPRgB0WAmZS60dVWlMIqI0kbR0AGzArqwmr1uQi2TVMASivpYWTRqP361aPkeBhnsbXqb7Zsc6D3OrB5BAC97BdZYn5fvo3oWFYjmLVSv3ouVFU+EuAnlsMETcfff2XFe47M9drYErhr9xO75ibBFqdYRswCr/3AmAUyeguykRwZb7WDoB1bA7CRrE3qrZV7UB6qeXQjithyQMwo5U3xXuSdfFMVoW3skPoCWVcfvHY4xAttGK/SN26YeQR0Swkb7FV0hqdCbx7O+L7RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=L93+HcyNFp4IfBYFlSv1XWUhtE3I1jgokJYwagoMASI=; b=cVveicep/df2KZopA8xym4X7yj16QgfNQakGKUjfbT0jmq+FFyqk/9B7ik9V9P9TPaqxYK7LgBftaA9cHN1ESnjCi46627YupVO+/IexR0yossglDag/HKK27Fgbm7o0+gOXuT9Qk0tmDYfny72E3QJZk5uUFhkA1use5wl/F1abb7q/mRW6C9x33iupGJM8omXKEH4vDRuskhiU8iIofEqOK3XbWrJVDFtc6TjUYBTxd0V2VTwjiHBv5JIMDyd2lbxdfaxY+VZyAqGMtliqqKVJ2sECKPEvdnqXSGTwpir4ez/NEl37baDFleB5rj5SrfG5YtRybnSdiNjz+VQw5Q== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L93+HcyNFp4IfBYFlSv1XWUhtE3I1jgokJYwagoMASI=; b=U7agIDPZ+JdF56J/O+z2/su+/TTlph3iaqb4kcaoLyXZ+SDKd8tSS0Nr5Xp/+9311sCs1Y2X8DRiMEzvaN/JLwmI40YLqkAicMSKHjt2uRr38pbFKBcM6RXoQFfcnr8WxwAixID9Jd1IZ69AZaJzMfE14WUTZin/gwV7H8ceY8ET11K41N4STTeQ4K/bzBRUxG5B9BHUTddxLykxkUP7Jtpoux1WrC+i8ISKLqnlFSYuRToJfF2VV3coxfqakXLUzFQLdGkaaj0oc/sAJz40L5mreWGrc70HR/pu63fjgx7i5i8cIJYqE+vbvDZrgTUSa87NQFXI0KIpPPwiPG14sw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by PA1PR04MB10889.eurprd04.prod.outlook.com (2603:10a6:102:491::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Fri, 26 Jul 2024 11:32:17 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%5]) with mapi id 15.20.7784.016; Fri, 26 Jul 2024 11:32:17 +0000 From: Xu Yang To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, gregkh@linuxfoundation.org, peter.chen@kernel.org, herve.codina@bootlin.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, jun.li@nxp.com Subject: [PATCH v2 6/6] ARM: dts: imx7ulp: add "nxp,sim" property for usbphy1 Date: Fri, 26 Jul 2024 19:32:07 +0800 Message-Id: <20240726113207.3393247-6-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240726113207.3393247-1-xu.yang_2@nxp.com> References: <20240726113207.3393247-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|PA1PR04MB10889:EE_ X-MS-Office365-Filtering-Correlation-Id: cd0e85bd-fc75-46f6-9c25-08dcad669ad8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: M2Aloj02HuwUCsPTby2uojILXAJiPgV+BvpF6P8y2DQHCV/sMp4fzr7KFrl84BVktct1IYO4rtSc3WM0d9ErUwLoIVPWVcqaKG32Si5Vlq/6g+0FioQcmPZhC6pTMIkJC6M+gwi+wjLOPPYKwhd+U+GNv+3D+R4yBWRuq8wzOr1KZ3A2w+8ZSLYNPxW8LcJEUXScudWhVSeRQ9v/AgbffWkIwaEPCz59wDhfTvE1moM25SZ76VkdzR/r1W+IwfqWjnzjhMW1XiwlfFxJLKvk9xGjkhG36s7IdiyF0fDihiC/M+dp3lRuLvl4ngpYLL7nWXAA4Ci1hk+Zpsq2qrBXztaX1wPjqVH5+TTno5t10yPsXGezvuRKkRdGydlYkyUonOmasdgyl1ZA8xdhYIqyKd0HWeHQQS8hwQKhojPa47/qR5TiWThVBfe4iYmzARL2rve+PAmoGBV7wN9m8nW1TwYQxpBlaC+p+8s/3wAScnBDmP6I2PdLw+AcGvpWd/dPOx3V0th2xjCeezEJKHLgF6rD9yjXESpEoyuPNMNGnwMD7CDMnFQWHb3JHhoG9Jpoxiwkeed4fViUyRIaXCLlqwBVgtpKfXro0/1NGHjV/KIJ+EPBtRmFjtLQ4eJkIUOTvLXly8qY24QlTcAkUzI/PDsUbGgrCOUa+Qsyj7FYJzjueQMBdz8VYTPcxTIqX0usoU7J0VzD2DqGxZlydRc/Oh5HkAHCDUINYzrFLCp0EwIBLpKLwyHMaeV/2La4sGEH59GCG5pPR/xTes2Ci8WPRLIHsal/wFM9hn2XaSEBS/pzoB47iJ5mU0Y01m+/GxNupHZb17Vr2IU0g3yU5mTHG83+wE9YiSfEdHRCDE2K/Sr4PMyA1SRnWd9drM4lnBDkO1gBIx6ShBWq71/VmBhvdFpXakgFcAmh5ycAxqI0xMCfvmuNr0PMt48HXNmeV15POtpHRRYvFf2GK3nxD2q6wEee70kRGwgVc9vSDPVYRgQ+/RnM2joSb7oAEKLYyaOfcgd9iVaRGy2lfc4HhweqvwVx0HR2VBA6/aDDARLfzy4uDCboPmObEKD81hxdTX2mzQXL4ISe3LowQXosyyZkewndELH8ZbatFE9pM+JSu1QebM8K0HH0YpmUAxxLgJaCJxigT+uIsq0GuQWxtF7OjMmfFCg5+4dUniz9Cq31RJDibvvMMVwzCGvDvnPj0z4G41q04FqFU/YOGH5zAZjAbkXecN0USnfuXfedtrc0/f/aeg2lWooNmJbTwAUJyHaVsyCy6bD9gGHvy3vUPiNraErMIrEfBlAuKu5zk2Ys3xKXzwxOtF6nMFYafA1d0DrgOQPDv7D2tewckKcJbqO4L73W+mt9Z5Nh6FpMEEnHwBfdaaoYTKFtsh2TljI020N92bbq7/iwRCOZWXOmGa7kUpOPNnrUxQERYms9h4sdSeU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wNKRMqDstJGNkPdzjVd0iF5epQ0uj6rIE1JWIzdjHuE6n75Hru9Ze/RThsHv+9IC08VoLLNVKLF5VT18fJ3m37f99elTqJ0fDoMQV8KRVSN647PZkOhlYEjmST2fJ25bXcOq9PaYCSMKtVZ2C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yv0Xa6YJ/vU1llt222jTl1xkl9Z2DGkVYFck+uaVurWHjS5Im0UaEzzFQb8zJcnNYbZfcLmCft/J/vdHWXOYdksssOSRdQZdLu+Gy2kK60XKJ/k22U066npb3X19vThq672vbE3Su8u+pA6ignRdFUWwfvsJ76LwZCmkTy3/ds4kcNhi7S+vf2mL9knHXcsKisgPFmxIhQycgO4PK8Ijt3KaXQSPyVYkLTNmbcxhfRaMyxISoreYVUl/pEOiWJCYIVkgMSZx2MKvuixWRVGcIRtrSyxLObGpOzONQUukWVbypRTOMsA8T3eFCO59Z5yTV37RCWohAqfRCHQjKu0MAh59ILeZ76XQRc03mMSE X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd0e85bd-fc75-46f6-9c25-08dcad669ad8 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 11:32:17.9205 (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: sq46o+P+zkdT7e6wDaC5GiZAV5ZkhZ5gNP1H2B/NaRr2/zOtwG3piXUuitmLtQPuDLoQLdfoLWjVOy5MIW/rwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10889 i.MX7ULP need properly set System Integration Module(SIM) module to make usb wakeup work well. This will add a "nxp,sim" property for usbphy1. Signed-off-by: Xu Yang --- Changes in v2: - no changes --- arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi index ac338320ac1d..b093f2a447ae 100644 --- a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi @@ -214,6 +214,7 @@ usbphy1: usb-phy@40350000 { interrupts = ; clocks = <&pcc2 IMX7ULP_CLK_USB_PHY>; #phy-cells = <0>; + nxp,sim = <&sim>; }; usdhc0: mmc@40370000 {