From nobody Sun Oct 5 16:21:01 2025 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2077.outbound.protection.outlook.com [40.107.101.77]) (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 23358233736; Fri, 1 Aug 2025 09:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042331; cv=fail; b=iLZ1o1JacQO4gM3IDQpDdHQSdq4Of9CptCNykJuoXSaDmfP8+dRNz4VWQV7Agvj9orUPAG8w4Rt2lmKngmFrdkwAmOMxyTn0OROd+zuK9j3jX8wvfv3SFS7pZVxy3YkfVDj0jkHEDRDa5O1+QoZPNqQoGMpZtmtn82wbkFO7HAk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042331; c=relaxed/simple; bh=P6+FrUF0wPMAGZ7lsf93IQGZElF6pz63HjrxsDWTwuY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JpzI/yK+3kF2u7Ro84IEWUZUr+1468L4giKkjwkYs78sfVw5Wq2xj0uJwOJaFWE8ndxNPUpQZmwUUskDbSqUWZj7aKJASetabVOe6YpBnSUZOJ11CihXiQwcwvPL5s9klWSO9J+nsNSnSmOLBQ9NgUfjJA0EutbJYpzotngnSnk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=ADXERme9; arc=fail smtp.client-ip=40.107.101.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="ADXERme9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mmCeME1NgQAWpz/3oGrDxTK/MoQfZ0SAatdaeV0nQMhHvUm297Brb6hkjWMnAy5vxdnVOm13hUkcGvjBAfzB170db5zwaMXFVnmk0hmrWMvD97U31oRkr7volfL66ZrIQPZxWtPMVWmHd6psM58tMGXzTuArJP+cgw+F1I8Vxh/MrwDmXdt79d4N86EnBRGm4NyTJlmp7FuHs68/fXLyScL05fdIGdzl+VZGWpZ42TRhaEgzQvHiuovazodajfeFMeE5c3LTJGYYflKRDRoaeXnAc//tYKqRMwNvgroZI7DttkyMWv4piTIEfX/y7n9TBJv/z6t/f0rsz/j4KjX2uA== 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=VlQrHTW9tElMT8Y20EROfc39nq1el5LkWEiOOfgm1lw=; b=kfWCKcGOKy7vnVW/SySC9WO/0WVjJZOHKQFQNkBwqdq8+7mxBswT8gWrFP6pp4HZazZYp5yNk8hM+o/nik6H6Dd6YdeNmNfLnaYhlyWdgovF5dnglhG/FOs0wMmY9scxo/bymfm3DenqWqrSMzPYs7LuS1Ef1pZpkqqPmND7FDgYyWUF+Fn5fTt/nSOozrxV8Vw+emDTnQfJOZAAiKomKR0fz9W9f7n5dzWEEKWII9Lu78VbJ2GGFaVh9b5ctIj6SqKg2xrnmLPfyduqNb9RZtkfkomph+gHor7PFmYBGU3aym4LfRcMfwHv+BDg9d+NVO1ZgfwkxykVO0M0QDCmgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VlQrHTW9tElMT8Y20EROfc39nq1el5LkWEiOOfgm1lw=; b=ADXERme9GieQfUGWzilfiqw9QEI5GxvJVHkd7pLtks4z/QvCyZgWbRr2iwp0gv/Z2nrAp6LYChH+CWgkeLdd+eMNaITx4+95ENkIHHA7frXB7q7E9NyxrYGLT4W2PS1julH8ZeXfA0dlLvZxSk9QAtRF8lRy0uR+Rps3qQ+gr7XgoWJXs77esYBBaTfMrNg2MERAC1/Ip/skNAM9n9+Iv3MbW65yrqS/U2mahOLaJ/64YGf8nSv1HjIae5Nf+x1h0TLOvEWdEKbrxEqLmuDeXcDkrFmGlHg2yNuWrsF4XgIM0kSD7kihb3gvMyUdFTlz8VAre13j0WDDnDCGvyICfQ== Received: from SN6PR04CA0095.namprd04.prod.outlook.com (2603:10b6:805:f2::36) by DM4PR12MB5915.namprd12.prod.outlook.com (2603:10b6:8:68::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8989.14; Fri, 1 Aug 2025 09:58:46 +0000 Received: from SN1PEPF00026369.namprd02.prod.outlook.com (2603:10b6:805:f2:cafe::fb) by SN6PR04CA0095.outlook.office365.com (2603:10b6:805:f2::36) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8989.16 via Frontend Transport; Fri, 1 Aug 2025 09:58:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SN1PEPF00026369.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9009.8 via Frontend Transport; Fri, 1 Aug 2025 09:58:45 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:20 -0700 Received: from 553356c-lcelt.nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:04 -0700 From: Haotien Hsu To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , "Jonathan Hunter" , Mathias Nyman , "Brad Griffis" , Sumit Gupta , "Vedant Deshpande" , Akhil R , Jinjie Ruan , , , , CC: Haotien Hsu , Henry Lin , "Jui Chang Kuo" , Wayne Chang , WK Tsai Subject: [PATCH 1/4] dt-bindings: usb: Add wake-up support for Tegra234 XUSB host controller Date: Fri, 1 Aug 2025 17:57:45 +0800 Message-ID: <20250801095748.385437-2-haotienh@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250801095748.385437-1-haotienh@nvidia.com> References: <20250801095748.385437-1-haotienh@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00026369:EE_|DM4PR12MB5915:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d0635cd-ad52-49bc-953c-08ddd0e20167 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|1800799024|7416014|376014|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?pQMpKMIgu1d6lvgTfR0W4r1xNctpBOsE+ww0oZiTpy/0ZDFz1ijTWqRFmGLV?= =?us-ascii?Q?xYpSkfUCQw74S1jMAF8cyg309mVuvWKFeDvI3syO0sdRoTNF+arIjKGpw13i?= =?us-ascii?Q?DN00d/VBpSlgPtmljTXPue2VqpDPY2hfZXP65sF2H8t7UuhxlQmtuXV+Vpom?= =?us-ascii?Q?Qje82Yq7qp5PfEDg9r9K7g9C000UtNw+s5osVYNoe0ezZ4fbAwPbbfM/Aop5?= =?us-ascii?Q?EONC9rh7OQGcksX5WkUH1ajkSTIVKtw4G8j5ZHGs4m+iAPhLpE77/+MgWKmn?= =?us-ascii?Q?/Tx3Tqpy8L02jate6muUPG84Lcd3bRKNeawg6XRerNKWPSVzL32/fbnYrSvF?= =?us-ascii?Q?cooEBu550l4DcTrLA2tlKD+b3/Offaw2VHiYHZ5GI8s7GVpho6d9H/nNkTKW?= =?us-ascii?Q?whe/6jhakyFheK36Z05vL85Q1/MTo8DW6nszyqfQzs+4FGycxS2RFDl9GzI+?= =?us-ascii?Q?XFI9FPIVijE1ywjFx3fDCfJsUOsnirAjq7ESg22iUZntUn/1onZCT+U9opVd?= =?us-ascii?Q?uuJvy4VJdQUFjUAxqZtxsyXYQgmeNb68WRG8z17sxteTbH63QUiPdMXO4hyR?= =?us-ascii?Q?6fXZ2Slmm1ueU1RpdHk36CUdC868xDQ6rBwSvCGDoCH2XnUh+eDxo5nk8Ulj?= =?us-ascii?Q?T0tXB5Iv/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ascii?Q?=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(1800799024)(7416014)(376014)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2025 09:58:45.8522 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d0635cd-ad52-49bc-953c-08ddd0e20167 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00026369.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5915 Content-Type: text/plain; charset="utf-8" Populate USB wake events for Tegra234 XUSB host controller. These wake-up events are optional to maintain backward compatibility and because the USB controller does not require them for normal operation. Signed-off-by: Haotien Hsu Acked-by: Conor Dooley --- .../bindings/usb/nvidia,tegra234-xusb.yaml | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yam= l b/Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yaml index db761dcbf72a..6365c6647cd7 100644 --- a/Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yaml +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra234-xusb.yaml @@ -32,9 +32,32 @@ properties: - const: bar2 =20 interrupts: + minItems: 2 items: - description: xHCI host interrupt - description: mailbox interrupt + - description: USB wake event 0 + - description: USB wake event 1 + - description: USB wake event 2 + - description: USB wake event 3 + - description: USB wake event 4 + - description: USB wake event 5 + - description: USB wake event 6 + description: | + The first two interrupts are required for the USB host controller. T= he remaining USB wake + event interrupts are optional. Each USB wake event is independent; i= t is not necessary to use + all of these events on a platform. The USB host controller can funct= ion even if no wake-up + events are defined. The USB wake event interrupts are handled by the= Tegra PMC; hence, the + interrupt controller for these is the PMC and the interrupt IDs corr= espond to the PMC wake + event IDs. A complete list of wake event IDs is provided below, and = this information is also + present in the Tegra TRM document. + PMC wake-up 76 for USB3 port 0 wakeup + PMC wake-up 77 for USB3 port 1 wakeup + PMC wake-up 78 for USB3 port 2 and port 3 wakeup + PMC wake-up 79 for USB2 port 0 wakeup + PMC wake-up 80 for USB2 port 1 wakeup + PMC wake-up 81 for USB2 port 2 wakeup + PMC wake-up 82 for USB2 port 3 wakeup =20 clocks: items: @@ -127,8 +150,9 @@ examples: <0x03650000 0x10000>; reg-names =3D "hcd", "fpci", "bar2"; =20 - interrupts =3D , - ; + interrupts-extended =3D <&gic GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 76 IRQ_TYPE_LEVEL_HIGH>; =20 clocks =3D <&bpmp TEGRA234_CLK_XUSB_CORE_HOST>, <&bpmp TEGRA234_CLK_XUSB_FALCON>, --=20 2.34.1 From nobody Sun Oct 5 16:21:01 2025 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2069.outbound.protection.outlook.com [40.107.96.69]) (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 2240C22A4EE; Fri, 1 Aug 2025 09:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.96.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042329; cv=fail; b=Yi1+BfFn4akFv9tYIYJ5YLAioe6KUnA5veJX3nA4F8zik3DcBB4/lVlyCPTgLWTEC4GhrpA4jlKR7+Kwrlm+pwJGKP6AwRDbrp/3ClfX6PrzqOvwci9ci31or9TDU6c2CRGxqv2A+UlgPQ/ryJxJWkrkf3t6X/o9Euyl1eNs5ks= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042329; c=relaxed/simple; bh=Dq3mjWYyRtbpr9QwgJ2dWBqIXTb+morBDUDnhhQ5kcY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JNnQw72vgCvrgvVeOJMw9lSdvR7BjXuGAkR5Ez6zzlkD913xNqcAzm3HuVQMKTEGs7T8YXCRzGBXGHjqYhMTUIPn5/nuTpl39Dx+DWEvLi0GbvsQdN0SN3LZJiy5FzQSJF2EQx6363D60bDZQThi45UrWHj0Aoknv8vkgvCtqj4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=A27ibfUW; arc=fail smtp.client-ip=40.107.96.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="A27ibfUW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ihRBfDoP8lfmSlUGha51esHJkiosaE0tjh5m8VaP8kBgzUijdpvUirK4X1b9+NK4l2/aAI1Lu+hLldDF6SJmFePFaYGgMfkeq4qttkuUMIs8ZH1U0o0acC1W5CTLFcEN3jp6hdSrtMNp97ovWTH/p9jzGlbUIhGN7Axna449GECDA07GtEHF0OK9D/eMxfg5fL2fxy4METefcOY46xW1OmS05wmzTWoN1oIYxHP4nVF/48/cMGjVnKK789ZMsqJukiaE5PTe3nJR+3wHG5OOSzOqQpQHN7uA8q1cX+x+H1laaj6fzeIzQyDMXKEhH5XvYIKpGtHOzsFREVC0vb0yoQ== 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=/T4OdjKxwd6xwPR5lRgElodoU4Iw6f85yNJBbWLzE0Q=; b=iafMDzr1x/6h4+zpqpBXFQMw0lggEE7J6pTFa2SX9uq2LXx75Aro3WrD78OqUpIUZTxCkUqW0ZVFhqrVfkpM45d+WI7m+EHDp3on2+pe9sUirFfRiME9sE7U7NX3Hq3kKjREjF9+qy7gFFXYZw+HarsGJEakMq2jqnONkrSkwBBDIQMDG2f5IX1HP6Hm8LaLYxYUuIY8w6AtmLEtXF9OpUrnfm5FNFrjFCX8O+hoBe0A/PI7jIc1lvi0zMeSAobRyiQygJbbY+aTZk4FO7FJ0jOUMT9EwM16ix9PGeFqxb3A9kAGR0WGeY217DKm166GRuxtMnVEDDCgrVCA0rtx7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/T4OdjKxwd6xwPR5lRgElodoU4Iw6f85yNJBbWLzE0Q=; b=A27ibfUWpoxbZt9EXCwgHaovblGXe0bm0GG1/rRXtuG1Eja3Cf57GnQN/iksBg7+Ux4oX90p02l7DOjubVXeG6pGRlJQqCF9A7up/qKPJrtH4xu0nPjJSrAsPf16qXVPTfcvujh3KVUl1qaksSHns0+uND8HslpXauoIy07rU5LmEz4helaCE0s6NeiNr5w+nTfN0L/6xSB1WgOmYMCc09THuq/mR8jqg9F04JQH32EyYDi4iNFW2GzsVWCcF43tL4jkMLRRp56ROpqnVN9k2MoXDRgK97fOQ/F7kSxnnJveU+m855S6kbHHKXJG4ChXGjQm/KEsFNsHo59W2RnwkA== Received: from BYAPR02CA0037.namprd02.prod.outlook.com (2603:10b6:a03:54::14) by CY5PR12MB6322.namprd12.prod.outlook.com (2603:10b6:930:21::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8964.26; Fri, 1 Aug 2025 09:58:44 +0000 Received: from SJ1PEPF000023D9.namprd21.prod.outlook.com (2603:10b6:a03:54:cafe::8a) by BYAPR02CA0037.outlook.office365.com (2603:10b6:a03:54::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8989.16 via Frontend Transport; Fri, 1 Aug 2025 09:58:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SJ1PEPF000023D9.mail.protection.outlook.com (10.167.244.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9031.0 via Frontend Transport; Fri, 1 Aug 2025 09:58:44 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:13 -0700 Received: from 553356c-lcelt.nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:08 -0700 From: Haotien Hsu To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , "Jonathan Hunter" , Mathias Nyman , "Brad Griffis" , Sumit Gupta , "Vedant Deshpande" , Akhil R , Jinjie Ruan , , , , CC: Haotien Hsu , Henry Lin , "Jui Chang Kuo" , Wayne Chang , WK Tsai Subject: [PATCH 2/4] arm64: tegra: Add interrupts for Tegra234 USB wake events Date: Fri, 1 Aug 2025 17:57:46 +0800 Message-ID: <20250801095748.385437-3-haotienh@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250801095748.385437-1-haotienh@nvidia.com> References: <20250801095748.385437-1-haotienh@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000023D9:EE_|CY5PR12MB6322:EE_ X-MS-Office365-Filtering-Correlation-Id: 084fdc9a-c81b-4c06-6324-08ddd0e20067 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|82310400026|36860700013|1800799024|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?kdtXM1FiUg3vETBNm3cV/j3j+7BC1TyYza2BGGfEoPFEEiER5bn942H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8AmOyUGaVgNk3QztOx5?= =?us-ascii?Q?zxzT07OxNkigf/Dd3s4HH6k+DAL0YPLTXTCT5HvxRteTSJIKXO39ZFrrFJ+E?= =?us-ascii?Q?m/Hyxh7UsXEAop0XcvauMr/hvzGTVWJWYgZ/6DFyd5D4OHn3vqC+ZGW3eJ2Y?= =?us-ascii?Q?9fpY3Zl8e27CFTa/XUnXAo0d+cppjJ00hblbaHcRSGpxqnfXeLiL6b+gaKX4?= =?us-ascii?Q?9GDmrwB/8im2e8HS+4qj1PiX5IE9ZV4cAnPkT5td2RNU6GgCJyZ3ALzIKfAR?= =?us-ascii?Q?X9kMrFwoalXQQWqcuQbwbLGOspVu/VztqYlB47M/WapzmrrnGfAxk7Oa5KXs?= =?us-ascii?Q?UH4D4XqdfCMQSjjiK5YZzy1jwKco/R967d+Q1TuTITM9+DwoLUsYNRoRG5K6?= =?us-ascii?Q?TgcSS+dCfrMtL7Fz3qmiV7uOdDkZNlVTUCMmcjQdRpPv3D+8oQBqpqLgQ0pV?= =?us-ascii?Q?Hl+5q/nDuKaQD6FLo5tv9Vs1MIjX0srYqSH3inAP4skaZIn5ADIkBoHdloRs?= =?us-ascii?Q?7kRfo6u1vhhIfMMvYnQdJJzYiBS3nWUIEHiOCy0FeWZRN87lizmebLin+2mj?= =?us-ascii?Q?UB+tHAxmTUl+0K9WS/xaFJlD9e85dlsquKKpkDvmJDQUy84zSJqO91LrPQ?= =?us-ascii?Q?=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(7416014)(82310400026)(36860700013)(1800799024)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2025 09:58:44.2638 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 084fdc9a-c81b-4c06-6324-08ddd0e20067 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000023D9.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6322 Content-Type: text/plain; charset="utf-8" Add interrupts for Tegra234 USB wake events to support the USB wake-up function. Signed-off-by: Haotien Hsu --- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts= /nvidia/tegra234.dtsi index 2601b43b2d8c..9cf573fed6cb 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -3254,8 +3254,15 @@ usb@3610000 { <0x0 0x03650000 0x0 0x10000>; reg-names =3D "hcd", "fpci", "bar2"; =20 - interrupts =3D , - ; + interrupts-extended =3D <&gic GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>, + <&gic GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 76 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 77 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 78 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 79 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 80 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 81 IRQ_TYPE_LEVEL_HIGH>, + <&pmc 82 IRQ_TYPE_LEVEL_HIGH>; =20 clocks =3D <&bpmp TEGRA234_CLK_XUSB_CORE_HOST>, <&bpmp TEGRA234_CLK_XUSB_FALCON>, --=20 2.34.1 From nobody Sun Oct 5 16:21:01 2025 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2081.outbound.protection.outlook.com [40.107.236.81]) (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 CB81223D293; Fri, 1 Aug 2025 09:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042337; cv=fail; b=B99185DWNiRlnVKUJgrlODUzXYA2Q6EOcy/hBQ8E/GPYzxBI4MDA1ZPFuJI8cUrCjCLU1rcz7uFI3JbMEtkHKopg5zCgEZC5ZIKtQt3Qlo1gr/zkNilSNyAvNQ8ynLyTOsl5tjRC+/xybPRaA/88oxy+wTn5uA6ToK2gpmCitWM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042337; c=relaxed/simple; bh=4CdQuTqsVBtx4745UnkOFZFuBY0XX92rYEzJFa5PCqY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YB2+k0k9X54wir/J5Zeh+NP/AaIR75GvgWb3DgbGEaLn37NziYe21jPKyy8g9btJsOVW3YJZT4qD1RvQzX8j1/dLrykr20R7YYeRBROe6YbN+KHFKKECPr/5YyRx0B7wH8ExQIsYoWVx5qff3ndTxTB4UEjkjG7Nrfd/2toJ4dI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=MYFx2WWy; arc=fail smtp.client-ip=40.107.236.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="MYFx2WWy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wg2PsDrKrxn3B7JAJOXlcPDQdmhNe1IVzffrYx4rfM3mT1xyWd66peK5HZopl9bX1RuSatlALnyMjEnOsmOv1GRCZ+6XPFS9VzuqeiMr86uwDtS7UKGMFg8sLyQmKlaprc+NRYlWSAI+sp0Td6ZnJ0t9MWFb3V4oTYgk9uYdFbfufziZHX+VNtr1K8xxWd72pnni2va77bLNTBhEUjHQsLIceMvF0dbzMP3ws9uWZ/ZvCoEm4lIesViWrthuW6cALXAevruBW7yrPTUcm+xdDy0rqhd5HhRQh5Ze/KEOLiGKjFDNPTjas8WZNofnvbO3b15hE0i6e1c56IE88gsz4A== 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=77NV8T61jyenSu0hqLaYARZQb33PSS1XgE4nh/1Humw=; b=Ij2jfNleOy7l2Taf1DgFEU1yx5CGrJ+D6IxIjM9ym6Ak2LvmHCb+K8Cp1GU136FdqRuN/WGKxYJdREQ7DgGHfMX6s2kW4kUICr0Fi+NYe/BjjMymJFfp4pKmgU31x3fCRv35X0jMCorxBPH13LWeqoMB+Dec5by8RN3YYkoLjQRVC7tC4mJQnfhBPv7J74VjSBGrRc5jvS73QCa4SKVO+68pRPuU2dB5QLEvQtA1LPVgd7pTYbN6BehC5fp2BkkXSBfLxP1ft2oQ5a0nCdBsXCILmgo86xGKgWLU2Hu1dQK0pOb1dmxLgbtw7LeE7D1TdyXy3jS1YRazXmvDvg9rmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=linuxfoundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=77NV8T61jyenSu0hqLaYARZQb33PSS1XgE4nh/1Humw=; b=MYFx2WWyEapjctHro5JX6q5xd0KvghBbkSUPydtjrhmoQL+75oUYdhJ0+Nj8CjziA+RaQUBGfgwuHYdJZHrDAIsH73vFs2cW9mh0VLKsj2hzsnZVBbZiopcvByxZ726dFcErvgVYHUiL2T6pCuK7WIFUAspDHwlAKhsxS4SQj38cCXArlfzPaion7VIiCkOM1tmZX+cTFb2DS6puVi9N0my5o+pFSGSTcP6Ai1zRL87/ylqbe8hcKFVt1gguYNlexj9ffqWG+elvD4SICrp1F7U9MnMKJ6sNmadWjx5ESMqEVJqXGP6RW0kAtseedSbZfX/Tc/x67lGTSYglPkTvzA== Received: from MN2PR04CA0017.namprd04.prod.outlook.com (2603:10b6:208:d4::30) by SJ5PPF28EF61683.namprd12.prod.outlook.com (2603:10b6:a0f:fc02::98e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8989.14; Fri, 1 Aug 2025 09:58:52 +0000 Received: from BL02EPF00029928.namprd02.prod.outlook.com (2603:10b6:208:d4:cafe::3c) by MN2PR04CA0017.outlook.office365.com (2603:10b6:208:d4::30) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8989.13 via Frontend Transport; Fri, 1 Aug 2025 09:58:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF00029928.mail.protection.outlook.com (10.167.249.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9009.8 via Frontend Transport; Fri, 1 Aug 2025 09:58:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:16 -0700 Received: from 553356c-lcelt.nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:11 -0700 From: Haotien Hsu To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , "Jonathan Hunter" , Mathias Nyman , "Brad Griffis" , Sumit Gupta , "Vedant Deshpande" , Akhil R , Jinjie Ruan , , , , CC: Haotien Hsu , Henry Lin , "Jui Chang Kuo" , Wayne Chang , WK Tsai Subject: [PATCH 3/4] soc/tegra: pmc: Add USB wake events for Tegra234 Date: Fri, 1 Aug 2025 17:57:47 +0800 Message-ID: <20250801095748.385437-4-haotienh@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250801095748.385437-1-haotienh@nvidia.com> References: <20250801095748.385437-1-haotienh@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00029928:EE_|SJ5PPF28EF61683:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ef55d1f-168c-48f9-fd99-08ddd0e204cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|82310400026|376014|36860700013|1800799024|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?N9X2WE6hl6EgMM3BbIzQhh1+ezzdNb0yOhrAcCJktM9D3h1xUgJ5ZkUnxcNX?= =?us-ascii?Q?XDUMWItjIz8hIJt4uZkCA83vQa2xzZFd2iBPjG1BwCIFEuil3eQRHBgbP8pU?= =?us-ascii?Q?8j+pAKLoXm2FGIMpWpmPwPEdrTBpY/11XzG4QBIvJLild6D5hUkAgV4pZ8lz?= =?us-ascii?Q?X37fNE0Vdcyvyu3M6kGmm/7oC3yUb/bcl6/n58XKIg8+pYWYdytx6F+ykwG/?= =?us-ascii?Q?aRv+xKkkoIlxnbVNTzeUTTNqmgW45Nf0yqf8RQFCstBc/Oz8lRPvVhkeonXV?= =?us-ascii?Q?tZ+is7Mx9lNWlgAAix5fEq+KWlGmrdHf49GDfGZfi5QLFZDRtItseVPOZmbD?= =?us-ascii?Q?QkGcKqsg+oRAPQbib7ejuk+xlJ6fzh7rCoOMLO1Nx0M4hH+gi+cowmlFz0LU?= =?us-ascii?Q?rUCzS59GoSqb0PmOsoXb3CPvoqeD0F9SxsLbhvfq4wAVVtSf3mICdLZF0TBx?= =?us-ascii?Q?/Ad7t/pqHXO9TAZeq7n5KGtAua9gH7ctvy+/x29aLyCKEWA1Qxe1DqFUbze8?= =?us-ascii?Q?FePsULdLJw6Psgq6Y35c2iTPULDjCsZlll9+z+yDJ3VEjHgsLcGHUvwz2X8L?= =?us-ascii?Q?5TZcUlAeWFXK7Y+g/x/AA3K8r8pxsW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Q?53pkEs0mmlSzVJpn+0pdJaiadE+O7fEo7+K9ASC9X9/xqw9UpEYNFvH5yg?= =?us-ascii?Q?=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(7416014)(82310400026)(376014)(36860700013)(1800799024)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2025 09:58:50.7919 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6ef55d1f-168c-48f9-fd99-08ddd0e204cc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00029928.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ5PPF28EF61683 Content-Type: text/plain; charset="utf-8" Add USB wake events for Tegra234 so that system can be woken up from suspend when USB devices hot-plug/unplug event is detected. Signed-off-by: Haotien Hsu --- drivers/soc/tegra/pmc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 51b9d852bb6a..bf3a46e24aa3 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -4209,6 +4209,13 @@ static const struct tegra_wake_event tegra234_wake_e= vents[] =3D { TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)), TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)), TEGRA_WAKE_IRQ("rtc", 73, 10), + TEGRA_WAKE_IRQ("usb3-port-0", 76, 167), + TEGRA_WAKE_IRQ("usb3-port-1", 77, 167), + TEGRA_WAKE_IRQ("usb3-port-2-3", 78, 167), + TEGRA_WAKE_IRQ("usb2-port-0", 79, 167), + TEGRA_WAKE_IRQ("usb2-port-1", 80, 167), + TEGRA_WAKE_IRQ("usb2-port-2", 81, 167), + TEGRA_WAKE_IRQ("usb2-port-3", 82, 167), TEGRA_WAKE_IRQ("sw-wake", SW_WAKE_ID, 179), }; =20 --=20 2.34.1 From nobody Sun Oct 5 16:21:01 2025 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2077.outbound.protection.outlook.com [40.107.95.77]) (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 9032022F74E; Fri, 1 Aug 2025 09:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042331; cv=fail; b=Sb1SSidlWwlpK0tq6TK1b5gNedUG5LUBY5E2cEo66EzCmmiIaT1irOVHY+uZocHwLZ2BHIo5ijypZkzOQioYNEdCiYrglx5/wOhKaCUtNijJIyn75C63O/YA/hNA7DMI5q09ns9IFbjAUNvn3cj6IeBhF9FsEALh1FCZyqrcsdg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754042331; c=relaxed/simple; bh=yWLzvCNIUDoKkk5PeBN8GJ9PGMjG6AlzrQdOf/BDsFo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FrhH5X3ouhOfnRSY+bo1VMfQH/Bi4x7JpgEqLVQb3FcrUhCuzwVwIvZ5n36l42cNAMQzpCpcKyo/VMjhIbolHIju6I0MNV0tSkvzBvYRLne13f15yzKdkZ59objSzj9BY/Vf8OPk5sxBEkjFdPkKStujLjoeflF57hS2bgDwIkU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=Kw7CHSJG; arc=fail smtp.client-ip=40.107.95.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Kw7CHSJG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sHb2X/Jms4dGwzdGFvQ3RhbQOOnNesGu884NxQG1AJLCi4gf3ERCi6bjQa6OEngr8kZWEPWd17HelMVEAsV1SmAyDeSbqEVHsrBXJrjJSIosT/Y8o5rfwoVPbpLTss0hds8Io5bcnw0eiPCNszLuVzcPNd85g5L1+cUH1/jn7F5Ul24kfV3kwFjnJAHIo5UsYgtPRHx7WCUpzuXEKDy0jke234t3kQla21A0LoAKq3bFtgAFqUIA8REANmvcQrA2qxNpUXHFsY8/wrRMo8IHKYj3xVllG/TkhY6moIunVYZ0zL6ryTrmHevbD3GIFNpOj+j46zuEbTwVtslNEf9qCA== 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=jn5KG1Yh8U4PQ934q87me6doKtdPLkPe9m5dcis719Q=; b=buGAQNTiIHcSazD+O2lO/wQBdwS/U+33t8RdN6Pd5vR0DQdAQGBTYq3sQJwaIQZmqGNqiuDlxUZZKvYY12sIn7G4xhtP4525p9/NluCHDTTjrCkJ8eo3aJOYIZU94d6SPv6nkAvvi9ecsVE304yPw+IdWXJ51Q4FiBTVZqs4NMIRAHmyv3gir1S2A2Cd+2s42d7tGZ1VjKJXhecmRUKHGW24ZXCzXSa6dWH2DJROxZQvdWfmQfFEd2xoX1/YEZvblmKJ3G0CVhxSBMHt9JaIoWSAFTDfFsKhElPOV1xN3PrAdan8Ai8QlXweLNkeOp5HI05xsCTING93jLOEyl7S5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=linuxfoundation.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jn5KG1Yh8U4PQ934q87me6doKtdPLkPe9m5dcis719Q=; b=Kw7CHSJGGXkv06RMTKPZP/IzGAXMC20JPRmtXpYqHu2PDH2AeGWU/1vPBZK0uW5Oa89q2D+xWpLxwpJfsVwvp0/J+8zEqclt040DwpZ9+aqLXJXICJIyqXUBBkTU0CuvXw4VoSNCIicfhhiSXTHubEumSJv4MeL/ewcCBoStJasL39IG1hxxlYtdI/8wp1MhNaJLApT0h/2EnpZ0oEv1eyeUeAcQbKQCio5Ga7OGCl2WduMq6IrUcsj84kjVXuxV1CShws0GMDr4VB/qMfcBfhRhsdNposqXbwuWGSJQo8su8OwEXGugYsd8Gz3uXeCF/sx58Y21pttLXm9r0Ottzw== Received: from BYAPR04CA0028.namprd04.prod.outlook.com (2603:10b6:a03:40::41) by IA0PR12MB8932.namprd12.prod.outlook.com (2603:10b6:208:492::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8989.11; Fri, 1 Aug 2025 09:58:47 +0000 Received: from SJ1PEPF000023DA.namprd21.prod.outlook.com (2603:10b6:a03:40:cafe::f) by BYAPR04CA0028.outlook.office365.com (2603:10b6:a03:40::41) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8989.16 via Frontend Transport; Fri, 1 Aug 2025 09:58:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SJ1PEPF000023DA.mail.protection.outlook.com (10.167.244.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9009.0 via Frontend Transport; Fri, 1 Aug 2025 09:58:46 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:20 -0700 Received: from 553356c-lcelt.nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Fri, 1 Aug 2025 02:58:15 -0700 From: Haotien Hsu To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , "Jonathan Hunter" , Mathias Nyman , "Brad Griffis" , Sumit Gupta , "Vedant Deshpande" , Akhil R , Jinjie Ruan , , , , CC: Haotien Hsu , Henry Lin , "Jui Chang Kuo" , Wayne Chang , WK Tsai Subject: [PATCH 4/4] usb: xhci: tegra: Support USB wakeup function for Tegra234 Date: Fri, 1 Aug 2025 17:57:48 +0800 Message-ID: <20250801095748.385437-5-haotienh@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250801095748.385437-1-haotienh@nvidia.com> References: <20250801095748.385437-1-haotienh@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF000023DA:EE_|IA0PR12MB8932:EE_ X-MS-Office365-Filtering-Correlation-Id: eee6cb86-6b6a-45fa-853b-08ddd0e2017d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|36860700013|82310400026|1800799024|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?xQlhvMNb5FzV7QvvXjg1HPj7eHfbWytA7H3sgsje7otjy7RkZAXMnkioMXx+?= =?us-ascii?Q?2lErCu8xbEQ5W9VePUyWtOcEKM8mVyh3Dda5xR/qcFZScFruND5E2dALYxPV?= =?us-ascii?Q?gNhdMHx2KqQ2kexQVsLx3eFHEQCZeCS0HuHE4L0ELRbvz7CAof1c+/8rhwER?= =?us-ascii?Q?0kwMcSs1WU6gwcfSYSx4Nfbc1IORjJWd0d+86xY6recD3bq/5ZMogi+yUT6I?= =?us-ascii?Q?VI3U8cKqTAUyf7uR226jDPuiu2xnVhs5IT4K337YNwLfwfrMyj8F61psjx9v?= =?us-ascii?Q?GPfr4klt5CJ9Lm4bA1S4ub35rSnyAsXlHUFO+bfNxftWASXf98uVFff2U5b+?= =?us-ascii?Q?z4bTlWy8Nb50zCzvzOGwv5j+ntSJGhBoz0pDB71i0Un3m5B7Jrbx6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op9hsjusR+w+yTEQT7lED?= =?us-ascii?Q?7xZarP/zSCqeEldpruGvrnOur56w1Z5XlVKMEgbH1U+O1RLCiUlvtMyo3VKH?= =?us-ascii?Q?lBpx4hVWbCgTb5JD1R5f83z/R7pfbwgBPwh2LOdLeEDRmJ/e9Yve9V/uOxH1?= =?us-ascii?Q?BwIAo8ZCBvwYfkEcjDsYHZi4QYHSk9NKegZO5PZPgQKdjeOoXeqlMx/1JUL0?= =?us-ascii?Q?gj1XE1zb4JrtzBDvZeOTUBuM4S/wKuGKvL5x8NYzsutzhcBdulVPDvLBzA?= =?us-ascii?Q?=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(7416014)(36860700013)(82310400026)(1800799024)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2025 09:58:46.0856 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eee6cb86-6b6a-45fa-853b-08ddd0e2017d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF000023DA.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8932 Content-Type: text/plain; charset="utf-8" When the system is suspended, USB hot-plugging/unplugging can trigger wake events of the Tegra USB host controller. Enable support for USB wake-up events by parsing device-tree to see if the interrupts for the wake-up events are present and if so configure those interrupts. Note that if wake-up events are not present, still allow the USB host controller to probe as normal. Signed-off-by: Haotien Hsu --- drivers/usb/host/xhci-tegra.c | 83 ++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index b5c362c2051d..0a3ac770ab4f 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -155,6 +155,8 @@ #define FW_IOCTL_TYPE_SHIFT 24 #define FW_IOCTL_CFGTBL_READ 17 =20 +#define WAKE_IRQ_START_INDEX 2 + struct tegra_xusb_fw_header { __le32 boot_loadaddr_in_imem; __le32 boot_codedfi_offset; @@ -228,6 +230,7 @@ struct tegra_xusb_soc { unsigned int num_supplies; const struct tegra_xusb_phy_type *phy_types; unsigned int num_types; + unsigned int max_num_wakes; const struct tegra_xusb_context_soc *context; =20 struct { @@ -263,6 +266,7 @@ struct tegra_xusb { int xhci_irq; int mbox_irq; int padctl_irq; + int *wake_irqs; =20 void __iomem *ipfs_base; void __iomem *fpci_base; @@ -313,6 +317,7 @@ struct tegra_xusb { bool suspended; struct tegra_xusb_context context; u8 lp0_utmi_pad_mask; + int num_wakes; }; =20 static struct hc_driver __read_mostly tegra_xhci_hc_driver; @@ -1534,6 +1539,58 @@ static void tegra_xusb_deinit_usb_phy(struct tegra_x= usb *tegra) otg_set_host(tegra->usbphy[i]->otg, NULL); } =20 +static int tegra_xusb_setup_wakeup(struct platform_device *pdev, struct te= gra_xusb *tegra) +{ + unsigned int i; + + if (tegra->soc->max_num_wakes =3D=3D 0) + return 0; + + tegra->wake_irqs =3D devm_kcalloc(tegra->dev, + tegra->soc->max_num_wakes, + sizeof(*tegra->wake_irqs), GFP_KERNEL); + if (!tegra->wake_irqs) + return -ENOMEM; + + /* + * USB wake events are independent of each other, so it is not necessary = for a platform + * to utilize all wake-up events supported for a given device. The USB ho= st can operate + * even if wake-up events are not defined or fail to be configured. There= fore, we only + * return critical errors, such as -ENOMEM. + */ + for (i =3D 0; i < tegra->soc->max_num_wakes; i++) { + struct irq_data *data; + + tegra->wake_irqs[i] =3D platform_get_irq(pdev, i + WAKE_IRQ_START_INDEX); + if (tegra->wake_irqs[i] < 0) + break; + + data =3D irq_get_irq_data(tegra->wake_irqs[i]); + if (!data) { + dev_warn(tegra->dev, "get wake event %d irq data fail\n", i); + irq_dispose_mapping(tegra->wake_irqs[i]); + break; + } + + irq_set_irq_type(tegra->wake_irqs[i], irqd_get_trigger_type(data)); + } + + tegra->num_wakes =3D i; + dev_dbg(tegra->dev, "setup %d wake events\n", tegra->num_wakes); + + return 0; +} + +static void tegra_xusb_dispose_wake(struct tegra_xusb *tegra) +{ + unsigned int i; + + for (i =3D 0; i < tegra->num_wakes; i++) + irq_dispose_mapping(tegra->wake_irqs[i]); + + tegra->num_wakes =3D 0; +} + static int tegra_xusb_probe(struct platform_device *pdev) { struct tegra_xusb *tegra; @@ -1584,9 +1641,15 @@ static int tegra_xusb_probe(struct platform_device *= pdev) if (tegra->mbox_irq < 0) return tegra->mbox_irq; =20 + err =3D tegra_xusb_setup_wakeup(pdev, tegra); + if (err) + return err; + tegra->padctl =3D tegra_xusb_padctl_get(&pdev->dev); - if (IS_ERR(tegra->padctl)) - return PTR_ERR(tegra->padctl); + if (IS_ERR(tegra->padctl)) { + err =3D PTR_ERR(tegra->padctl); + goto dispose_wake; + } =20 np =3D of_parse_phandle(pdev->dev.of_node, "nvidia,xusb-padctl", 0); if (!np) { @@ -1910,6 +1973,8 @@ static int tegra_xusb_probe(struct platform_device *p= dev) put_padctl: of_node_put(np); tegra_xusb_padctl_put(tegra->padctl); +dispose_wake: + tegra_xusb_dispose_wake(tegra); return err; } =20 @@ -1926,6 +1991,7 @@ static void tegra_xusb_remove(struct platform_device = *pdev) { struct tegra_xusb *tegra =3D platform_get_drvdata(pdev); struct xhci_hcd *xhci =3D hcd_to_xhci(tegra->hcd); + unsigned int i; =20 tegra_xusb_deinit_usb_phy(tegra); =20 @@ -1942,6 +2008,8 @@ static void tegra_xusb_remove(struct platform_device = *pdev) if (tegra->padctl_irq) pm_runtime_disable(&pdev->dev); =20 + tegra_xusb_dispose_wake(tegra); + pm_runtime_put(&pdev->dev); =20 tegra_xusb_disable(tegra); @@ -2352,8 +2420,13 @@ static __maybe_unused int tegra_xusb_suspend(struct = device *dev) pm_runtime_disable(dev); =20 if (device_may_wakeup(dev)) { + unsigned int i; + if (enable_irq_wake(tegra->padctl_irq)) dev_err(dev, "failed to enable padctl wakes\n"); + + for (i =3D 0; i < tegra->num_wakes; i++) + enable_irq_wake(tegra->wake_irqs[i]); } } =20 @@ -2381,8 +2454,13 @@ static __maybe_unused int tegra_xusb_resume(struct d= evice *dev) } =20 if (device_may_wakeup(dev)) { + unsigned int i; + if (disable_irq_wake(tegra->padctl_irq)) dev_err(dev, "failed to disable padctl wakes\n"); + + for (i =3D 0; i < tegra->num_wakes; i++) + disable_irq_wake(tegra->wake_irqs[i]); } tegra->suspended =3D false; mutex_unlock(&tegra->lock); @@ -2633,6 +2711,7 @@ static const struct tegra_xusb_soc tegra234_soc =3D { .num_supplies =3D ARRAY_SIZE(tegra194_supply_names), .phy_types =3D tegra194_phy_types, .num_types =3D ARRAY_SIZE(tegra194_phy_types), + .max_num_wakes =3D 7, .context =3D &tegra186_xusb_context, .ports =3D { .usb3 =3D { .offset =3D 0, .count =3D 4, }, --=20 2.34.1