{"id":2227104,"url":"http://patchwork.ozlabs.org/api/patches/2227104/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260423085718.70762-6-akhilrajeev@nvidia.com/","project":{"id":21,"url":"http://patchwork.ozlabs.org/api/projects/21/?format=json","name":"Linux Tegra Development","link_name":"linux-tegra","list_id":"linux-tegra.vger.kernel.org","list_email":"linux-tegra@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260423085718.70762-6-akhilrajeev@nvidia.com>","list_archive_url":null,"date":"2026-04-23T08:57:04","name":"[v3,05/13] i3c: master: Add support for devices using SETAASA","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"bd61473e6538413c6be5a73a675bfeb3ba059974","submitter":{"id":81965,"url":"http://patchwork.ozlabs.org/api/people/81965/?format=json","name":"Akhil R","email":"akhilrajeev@nvidia.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-tegra/patch/20260423085718.70762-6-akhilrajeev@nvidia.com/mbox/","series":[{"id":501164,"url":"http://patchwork.ozlabs.org/api/series/501164/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-tegra/list/?series=501164","date":"2026-04-23T08:56:59","name":"Support ACPI and SETAASA device discovery","version":3,"mbox":"http://patchwork.ozlabs.org/series/501164/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2227104/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2227104/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-tegra+bounces-13859-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=l2KrNN1Z;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13859-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"l2KrNN1Z\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.48.21","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1VT21vY8z1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 19:01:42 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 3175C301FCBD\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 08:59:40 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9F2A63DFC8E;\n\tThu, 23 Apr 2026 08:59:39 +0000 (UTC)","from MW6PR02CU001.outbound.protection.outlook.com\n (mail-westus2azon11012021.outbound.protection.outlook.com [52.101.48.21])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id AC5142BE051;\n\tThu, 23 Apr 2026 08:59:37 +0000 (UTC)","from BYAPR05CA0069.namprd05.prod.outlook.com (2603:10b6:a03:74::46)\n by BL3PR12MB6379.namprd12.prod.outlook.com (2603:10b6:208:3b2::11) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.21; Thu, 23 Apr\n 2026 08:59:31 +0000","from CO1PEPF000075ED.namprd03.prod.outlook.com\n (2603:10b6:a03:74:cafe::3f) by BYAPR05CA0069.outlook.office365.com\n (2603:10b6:a03:74::46) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9846.20 via Frontend Transport; Thu,\n 23 Apr 2026 08:59:30 +0000","from mail.nvidia.com (216.228.117.160) by\n CO1PEPF000075ED.mail.protection.outlook.com (10.167.249.36) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9846.18 via Frontend Transport; Thu, 23 Apr 2026 08:59:29 +0000","from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com\n (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 23 Apr\n 2026 01:59:07 -0700","from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com\n (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 23 Apr\n 2026 01:59:06 -0700","from BUILDSERVER-IO-L4T.nvidia.com (10.127.8.9) by mail.nvidia.com\n (10.129.68.7) with Microsoft SMTP Server id 15.2.2562.20 via Frontend\n Transport; Thu, 23 Apr 2026 01:58:58 -0700"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776934779; cv=fail;\n b=BlrokGGlviDRNgNGObNbnZKb3KahTHUE/FhpXBTAQ1Bky/nQU4eHwsKALqBkmyYl9MufUyZEbqnpejsgV0DZb7WV2b4isbXCP9AdjUa7wrZp9Kl1KGSrEaBkhzTlCCDGDVGETd2GPudEZkyG/0IJimuKs2rDj5TnNvo8BcaeOi8=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=DHQUwGQzvKDidNWFiyBgICveKIHb6G58Mo5KzghSwHdC1vksgchFaTZjeqKmfo5CS1IfbfcsTvUJfpfi7Ik6bDwYxrlrW6JnyuWHpP2a12voz7aBIdd1FyXXLxL3IlXMmUXonRnPKOpA57os2T1UWDw3tWeCkXmH2bF0f00Vtxf+Hl72U4IU7I7rB/UA7qX9paK+BRyPi18l5ki9F3egJycRIl8AiwlNnsmJ/rTZd9lnpFA4c6OHf/feJq9uTMjScHtCe90T1a0LRT4lQgFGt1yrIre41G2ELkAsHcHB7L+liHOgJNbnpnu0Z8uqsQXMopChUrKY01h9wAIbb8l76g=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776934779; c=relaxed/simple;\n\tbh=fZ5XWuogKDmJ1lTD8A/rKfEtaUwiizHOaldw6wDOYMA=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=T7U3SGJMjAUT28B44X5wqEfsfBBOVp9vq0xrcpRf9wvwBOSz+xYnZv5o1ZQ/9oj/Q4ux+0cBOQdPCPjOTdRTmCIL0Kl2zPaz8EGBK3CnQYeRGtA+Szm7CwfioHqFyJSo4NhGXQIAuK504rtNjjdnO+kokaJ8rRWns/NkPS3VOU0=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=ooaVzdn3sSlCMJLzWatycfbdzAExOJc0Dox7UopvLhw=;\n b=jAgRy3WBlVHR3vnbzrf9jphCmdAA99Xsje+QF3apVzDScmg4Sc6ZPRLjE9zC3bhzFM+i5gFHkpl1p+pBXOz/Bo+ygj4Dg1ry16WP6B8ioXIZG3qpm29j5mgOmKtEzGqWpMhhdIdTHVSW0l0TjKuE2pg5rFW3C+GyId34gM8Exk+yd2MVdhRg9Utx47+2n6YMKWVghM1WxX4mqt+/0UUqN9QhMkhwzUNkzQThUv2enrugfvLyPKZNHRuUin6GZLpZC97t2q1lAhb+RedTnh1b0Zvo+ktwT8Wf8kxee2FpGV33nLN9oWkX1n9EjE/xg5id6BIK9Q27qA3udeqp9h0klQ=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=l2KrNN1Z; arc=fail smtp.client-ip=52.101.48.21","i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.160) smtp.rcpttodomain=bootlin.com smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none (0)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=ooaVzdn3sSlCMJLzWatycfbdzAExOJc0Dox7UopvLhw=;\n b=l2KrNN1ZC9XBFDEsLVpEYsL6wY92znaXcubMDM29ABT4O15WeXMD16/6+RO5XkceSCe3yelXTc78kLh9QFDrrhMwdM2eey1nqGyc9zqUUMh8N3fMCGmjdlUYEw5ryfdTz20NamqegsuQQQZ3Myt5ifLKjNQ2Rcfyi37XwQMH5pyUfmp1vaCHOTR34oPJSWuXdSBRQiZismZoC3OHLVLZoZf60LKoLpBfy4hufPVl1XT2neqBYhmbntGX8fcY8jYCgB0jYSwh5CaZVMmzItAEZUL6VuCOBNYD5arnuLbGw8lddst62UezWnyoj43/b9NH1vLCntlt6iCttOeUL0gRUg==","X-MS-Exchange-Authentication-Results":"spf=pass (sender IP is 216.228.117.160)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;","Received-SPF":"Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.160 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C","From":"Akhil R <akhilrajeev@nvidia.com>","To":"Alexandre Belloni <alexandre.belloni@bootlin.com>, Frank Li\n\t<Frank.Li@nxp.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski\n\t<krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, \"Rafael J .\n Wysocki\" <rafael@kernel.org>, Saket Dumbre <saket.dumbre@intel.com>, \"Len\n Brown\" <lenb@kernel.org>, Guenter Roeck <linux@roeck-us.net>, Philipp Zabel\n\t<p.zabel@pengutronix.de>, Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,\n\tGeert Uytterhoeven <geert@linux-m68k.org>, Dmitry Baryshkov\n\t<dmitry.baryshkov@oss.qualcomm.com>, Arnd Bergmann <arnd@arndb.de>, \"Eric\n Biggers\" <ebiggers@kernel.org>, Wolfram Sang\n\t<wsa+renesas@sang-engineering.com>, Miquel Raynal\n\t<miquel.raynal@bootlin.com>, Jon Hunter <jonathanh@nvidia.com>, \"Thierry\n Reding\" <treding@nvidia.com>, <linux-tegra@vger.kernel.org>,\n\t<linux-i3c@lists.infradead.org>, <devicetree@vger.kernel.org>,\n\t<linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,\n\t<acpica-devel@lists.linux.dev>, <linux-hwmon@vger.kernel.org>","CC":"Akhil R <akhilrajeev@nvidia.com>","Subject":"[PATCH v3 05/13] i3c: master: Add support for devices using SETAASA","Date":"Thu, 23 Apr 2026 14:27:04 +0530","Message-ID":"<20260423085718.70762-6-akhilrajeev@nvidia.com>","X-Mailer":"git-send-email 2.50.1","In-Reply-To":"<20260423085718.70762-1-akhilrajeev@nvidia.com>","References":"<20260423085718.70762-1-akhilrajeev@nvidia.com>","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-NVConfidentiality":"public","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain","X-NV-OnPremToCloud":"ExternallySecured","X-EOPAttributedMessage":"0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"CO1PEPF000075ED:EE_|BL3PR12MB6379:EE_","X-MS-Office365-Filtering-Correlation-Id":"7a5f75fb-972d-4f76-789c-08dea116a150","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|376014|7416014|36860700016|82310400026|1800799024|22082099003|56012099003|18002099003|921020|13003099007;","X-Microsoft-Antispam-Message-Info":"\n\tE/z/eK1dtHKPjU5QxDGe1nEYau1o6lhP3Ge3OvYF1hadK4rP9DJnUMMqz3dvxNifZXlVXHVA/jhFm+iOS9vOjeVtJB3r08HX/+psb/W1yXpvBPzZpMx99TY2VRXWgfbJ1vBUfGiKhrkOCzumIihjXeIlPZWNMfd3yOau2v5zWCjTZsoXCP8BX3DKCvLpBxzEiOUEXARupUfVO1g35bsFCZdNMvXLgK/Nv2YkCCFutVWfvYdWY0KBkoabEaSHR0LpDnRd0ncck4c0vbxLrsfs/qks1L9iWTQM9YkN47GdB6yEyjJceFSSGwNX0oj3cA4IiExE1AfHRBtsJYsfy33pgtHbPqZDick4+W4cu5gimbdq7jWMcWJl00I+KP/SgwxOBju4Waz91bJoFnwniIgj07WBOX0YfzKb9a67YDn2BXpAhjVtTIwEQkawhuxP5AIFY3lZF2qm3+/PQ0BfzV7Wf3PEP+yOtHv1hxX9vFR0cDQtsVl0yJbFOFVAwy+a+L/9M5rXSwyFzbkBNXMThcMpvefkeUKVW1xMhwTNZzvEKO88aYybv9xJuZoWMdTra2QIS8OT1B2ZBfSxSom4bjfXxY2PKU+lHA8QjU1cbKIJkNediI3uwnpZeOulCHNIom0tYJPAbodppiDsdgZdbCRUAreAZzDxt2grCTgwfWFoOsRx+y2e55IkdQhsOVLlQkTRkUHRapWQk+4fOaursIb6G3P21lE+7eCYSBEt3Zj7OtQ1hvK+V1i5aMiUoBYUHQG1X4cVGDmmKTayo6DbWfKSLHUqqQYjx5WS2eD/WzkT9I6wskc8mWtLuEOGamJMEbuUHd1izkGA/R2p5DrFoM5soA==","X-Forefront-Antispam-Report":"\n\tCIP: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)(36860700016)(82310400026)(1800799024)(22082099003)(56012099003)(18002099003)(921020)(13003099007);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"\n\tV9S2VzXdAxs41heCM9h8nusJuPCIw0v1N9bLGQHffcFnO60OmIl4zLykktzwEdqaTCDi1761oj4m4DCJ8FNwBppl0xX92KFKQ1MBIKzSGT30i2t2acqHEDB3upu/cz1DEMV014Vg9xHBNWGD9JLlA79vWPPWQeAOl118AlhtBa692HwTYQmQNBm8rJzcamBv8WnCxwwl4mN1Kmjy0i2CZe/2qP+Ye9fu4AU8qfCMXfBNt7UQQMS2qJiS8efxEbIgoLK8mnidzGCx2I1qpd212BsW6mhIArB43seoIUEkjAFSj6+xCfQZjoMj+Yt48p+U2xrPS85Vuz9XY8f4monqxyKusYdNVO2LCH2O/Kg3NxzdDdRyXQQqWKEWtQZ/DALmLtAdFDhnkQx14qzuIRQC8MypyuuaWiuSMuoFZRJQ+i1/wupBptxbnKNi2oWEM0Pw","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"23 Apr 2026 08:59:29.9545\n (UTC)","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n 7a5f75fb-972d-4f76-789c-08dea116a150","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp":"\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com]","X-MS-Exchange-CrossTenant-AuthSource":"\n\tCO1PEPF000075ED.namprd03.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Anonymous","X-MS-Exchange-CrossTenant-FromEntityHeader":"HybridOnPrem","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"BL3PR12MB6379"},"content":"Add support for devices using SETAASA, such as SPD5118 and SPD5108\nattached to DDR5 memory modules that do not support ENTDAA. Follow the\nguidelines proposed by the MIPI Discovery and Configuration\nSpecification [1] for discovering such devices.\n\nSETAASA (Set All Addresses to Static Address) differs from standard I3C\naddress assignment that uses ENTDAA or SETDASA to assign dynamic\naddresses. Devices using SETAASA assign their pre-defined static addresses\nas their dynamic addresses during DAA, and it is not mandatory for these\ndevices to implement standard CCC commands like GETPID, GETDCR, or GETBCR.\nFor such devices, it is generally recommended to issue SETHID (specified\nby JEDEC JESD300) as a prerequisite for SETAASA to stop HID bit flipping.\n\n[1] https://www.mipi.org/mipi-disco-for-i3c-download\n\nSigned-off-by: Akhil R <akhilrajeev@nvidia.com>\n---\n drivers/i3c/master.c       | 70 +++++++++++++++++++++++++++++++++++++-\n include/linux/i3c/ccc.h    |  1 +\n include/linux/i3c/master.h | 15 ++++++++\n 3 files changed, 85 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c\nindex ffec97157d48..de72317c9a5c 100644\n--- a/drivers/i3c/master.c\n+++ b/drivers/i3c/master.c\n@@ -5,6 +5,7 @@\n  * Author: Boris Brezillon <boris.brezillon@bootlin.com>\n  */\n \n+#include <dt-bindings/i3c/i3c.h>\n #include <linux/acpi.h>\n #include <linux/atomic.h>\n #include <linux/bug.h>\n@@ -1051,6 +1052,47 @@ static int i3c_master_rstdaa_locked(struct i3c_master_controller *master,\n \treturn ret;\n }\n \n+/**\n+ * i3c_master_setaasa_locked() - start a SETAASA procedure (Set All Addresses to Static Address)\n+ * @master: I3C master object\n+ *\n+ * Send a SETAASA CCC command to set all attached I3C devices' dynamic addresses to\n+ * their static address.\n+ *\n+ * This function must be called with the bus lock held in write mode.\n+ *\n+ * First, the SETHID CCC command is sent, followed by the SETAASA CCC.\n+ *\n+ * Return: 0 in case of success, a positive I3C error code if the error is\n+ * one of the official Mx error codes, and a negative error code otherwise.\n+ */\n+static int i3c_master_setaasa_locked(struct i3c_master_controller *master)\n+{\n+\tstruct i3c_ccc_cmd_dest dest;\n+\tstruct i3c_ccc_cmd cmd;\n+\tint ret;\n+\n+\t/*\n+\t * Send SETHID CCC command. Though it is a standard CCC command specified\n+\t * in JESD300-5, we are not defining a separate macro to be explicit that\n+\t * the value falls under the vendor specific range.\n+\t */\n+\ti3c_ccc_cmd_dest_init(&dest, I3C_BROADCAST_ADDR, 0);\n+\ti3c_ccc_cmd_init(&cmd, false, I3C_CCC_VENDOR(0, true), &dest, 1);\n+\tret = i3c_master_send_ccc_cmd_locked(master, &cmd);\n+\ti3c_ccc_cmd_dest_cleanup(&dest);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\t/* Send SETAASA CCC command */\n+\ti3c_ccc_cmd_dest_init(&dest, I3C_BROADCAST_ADDR, 0);\n+\ti3c_ccc_cmd_init(&cmd, false, I3C_CCC_SETAASA, &dest, 1);\n+\tret = i3c_master_send_ccc_cmd_locked(master, &cmd);\n+\ti3c_ccc_cmd_dest_cleanup(&dest);\n+\n+\treturn ret;\n+}\n+\n /**\n  * i3c_master_entdaa_locked() - start a DAA (Dynamic Address Assignment)\n  *\t\t\t\tprocedure\n@@ -1739,6 +1781,18 @@ static int i3c_master_early_i3c_dev_add(struct i3c_master_controller *master,\n \tif (ret)\n \t\tgoto err_free_dev;\n \n+\t/*\n+\t * For devices using SETAASA instead of ENTDAA, the address is statically\n+\t * assigned. Update the dynamic address to the provided static address.\n+\t * Reattaching the I3C device is not useful. It is also not mandatory\n+\t * for such devices to implement CCC commands like GETPID, GETDCR etc.\n+\t * Hence, we can return here.\n+\t */\n+\tif (i3cdev->boardinfo->static_addr_method & I3C_ADDR_METHOD_SETAASA) {\n+\t\ti3cdev->info.dyn_addr = i3cdev->boardinfo->static_addr;\n+\t\treturn 0;\n+\t}\n+\n \tret = i3c_master_setdasa_locked(master, i3cdev->info.static_addr,\n \t\t\t\t\ti3cdev->boardinfo->init_dyn_addr);\n \tif (ret)\n@@ -2145,6 +2199,12 @@ static int i3c_master_bus_init(struct i3c_master_controller *master)\n \tif (ret)\n \t\tgoto err_bus_cleanup;\n \n+\tif (master->addr_method & I3C_ADDR_METHOD_SETAASA) {\n+\t\tret = i3c_master_setaasa_locked(master);\n+\t\tif (ret)\n+\t\t\tgoto err_bus_cleanup;\n+\t}\n+\n \t/*\n \t * Reserve init_dyn_addr first, and then try to pre-assign dynamic\n \t * address and retrieve device information if needed.\n@@ -2507,7 +2567,7 @@ i3c_master_add_i3c_boardinfo(struct i3c_master_controller *master,\n \tstruct i3c_dev_boardinfo *boardinfo;\n \tstruct device *dev = &master->dev;\n \tenum i3c_addr_slot_status addrstatus;\n-\tu32 init_dyn_addr = 0;\n+\tu32 init_dyn_addr = 0, static_addr_method = 0;\n \n \tboardinfo = devm_kzalloc(dev, sizeof(*boardinfo), GFP_KERNEL);\n \tif (!boardinfo)\n@@ -2535,6 +2595,13 @@ i3c_master_add_i3c_boardinfo(struct i3c_master_controller *master,\n \t\t\treturn -EINVAL;\n \t}\n \n+\tif (!fwnode_property_read_u32(fwnode, \"mipi-i3c-static-method\", &static_addr_method))\n+\t\tboardinfo->static_addr_method = static_addr_method &\n+\t\t\t\t\t(I3C_ADDR_METHOD_SETDASA | I3C_ADDR_METHOD_SETAASA);\n+\n+\t/* Update the address methods required for device discovery */\n+\tmaster->addr_method |= boardinfo->static_addr_method;\n+\n \tboardinfo->pid = ((u64)reg[1] << 32) | reg[2];\n \n \tif ((boardinfo->pid & GENMASK_ULL(63, 48)) ||\n@@ -3162,6 +3229,7 @@ int i3c_master_register(struct i3c_master_controller *master,\n \tmaster->dev.release = i3c_masterdev_release;\n \tmaster->ops = ops;\n \tmaster->secondary = secondary;\n+\tmaster->addr_method = I3C_ADDR_METHOD_SETDASA;\n \tINIT_LIST_HEAD(&master->boardinfo.i2c);\n \tINIT_LIST_HEAD(&master->boardinfo.i3c);\n \ndiff --git a/include/linux/i3c/ccc.h b/include/linux/i3c/ccc.h\nindex ad59a4ae60d1..a145d766ab6f 100644\n--- a/include/linux/i3c/ccc.h\n+++ b/include/linux/i3c/ccc.h\n@@ -32,6 +32,7 @@\n #define I3C_CCC_DEFSLVS\t\t\tI3C_CCC_ID(0x8, true)\n #define I3C_CCC_ENTTM\t\t\tI3C_CCC_ID(0xb, true)\n #define I3C_CCC_ENTHDR(x)\t\tI3C_CCC_ID(0x20 + (x), true)\n+#define I3C_CCC_SETAASA\t\t\tI3C_CCC_ID(0x29, true)\n \n /* Unicast-only commands */\n #define I3C_CCC_SETDASA\t\t\tI3C_CCC_ID(0x7, false)\ndiff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h\nindex 6b03a3ce574c..5a6d217fa5eb 100644\n--- a/include/linux/i3c/master.h\n+++ b/include/linux/i3c/master.h\n@@ -174,6 +174,14 @@ struct i3c_device_ibi_info {\n  *\t\t assigned a dynamic address by the master. Will be used during\n  *\t\t bus initialization to assign it a specific dynamic address\n  *\t\t before starting DAA (Dynamic Address Assignment)\n+ * @static_addr_method: Bitmap describing which methods of Dynamic Address\n+ *\t\t Assignment from a Static Address are supported by this I3C Target.\n+ *\t\t A value of 1 in a bit position indicates that the Bus Controller\n+ *\t\t supports that method, and a value of 0 indicates that the Bus\n+ *\t\t Controller does not support that method.\n+ *\t\t Bit 0: SETDASA\n+ *\t\t Bit 1: SETAASA\n+ *\t\t All other bits are reserved.\n  * @pid: I3C Provisioned ID exposed by the device. This is a unique identifier\n  *\t that may be used to attach boardinfo to i3c_dev_desc when the device\n  *\t does not have a static address\n@@ -189,6 +197,7 @@ struct i3c_dev_boardinfo {\n \tstruct list_head node;\n \tu8 init_dyn_addr;\n \tu8 static_addr;\n+\tu8 static_addr_method;\n \tu64 pid;\n \tstruct fwnode_handle *fwnode;\n };\n@@ -516,6 +525,11 @@ struct i3c_master_controller_ops {\n  * @boardinfo.i2c: list of I2C boardinfo objects\n  * @boardinfo: board-level information attached to devices connected on the bus\n  * @bus: I3C bus exposed by this master\n+ * @addr_method: Bitmap describing which methods of Address Assignment required\n+ *\t\t to be run for discovering all the devices on the bus.\n+ *\t\t Bit 0: SETDASA\n+ *\t\t Bit 1: SETAASA\n+ *\t\t All other bits are reserved.\n  * @wq: workqueue which can be used by master\n  *\tdrivers if they need to postpone operations that need to take place\n  *\tin a thread context. Typical examples are Hot Join processing which\n@@ -543,6 +557,7 @@ struct i3c_master_controller {\n \t\tstruct list_head i2c;\n \t} boardinfo;\n \tstruct i3c_bus bus;\n+\tu8 addr_method;\n \tstruct workqueue_struct *wq;\n \tunsigned int dev_nack_retry_count;\n };\n","prefixes":["v3","05/13"]}