From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from SN4PR0501CU005.outbound.protection.outlook.com (mail-southcentralusazon11011035.outbound.protection.outlook.com [40.93.194.35]) (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 B685E3AE6F5 for ; Wed, 8 Apr 2026 09:06:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.194.35 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775639188; cv=fail; b=SJwZK0gqgL/b70tdJhMPnu+IyqIlpcRagtz3w89f4tT2ekvxftQvpNM/WapnpjPCPejHu9E9UyuxdtdURJqFsZnYcT0tqJVXwRfHC5ZXrvA7InKDURjbOnDegjiRnJiZx4MnNYB86Xuv6IPKpI77REdcMRk7N+s4DubfUhm+J5M= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775639188; c=relaxed/simple; bh=LR36otQtYSytNYnDm6ck/fpvdvWcnd3AaAVQ8vq9x5A=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=el053AIytsX4ZVtlZh8xOrlEhNUHt5oMMkrKBCSjB2EHWtxhKnc+EZxVZRFElSYuZBpc5YgSaxwR3/PFoOZS8JqvygLxBVHw+Kt2HYe90+uetuWxBmDYuLOpT+jZdvJdq9E1a7nwVAgVzpguvIVoHz1ARGpAG37/wAksnnzz5C8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=RLDnl6rS; arc=fail smtp.client-ip=40.93.194.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="RLDnl6rS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pnkgFajqKSoBAR3RgLCDZnQoD4VWdp9o+ZkOhY2mgHXC342NApoAGR9mledALdqlfV87lIfZHCYEkUDRBX2bfN8K03XzZS/a9HzeZLhEma9K6Rqqhv2MqYQs3U4680m4Etsb39fbaZNvuYN64HPZZJLbA0zLk6daZstKlvAT9tnLF7eT6pfESyXzmDufFRDywuSdfx7MtqIVb7AQLI+PwvMKUa+ReGPZI4viK3mixUzl287b8kjWbIjzifRiEnTTkh6S8AombxbGG9Q0dKH1KxY4bqlcEguY/oDZwenUclID/ujl4DeAptjGwexrrRBT522tZT9OFg8kRcsgWasNcQ== 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=i0sLqCoXetvzywPNOWYrnMIBL4+pV2DjbvHrMeLjgMI=; b=ROMsXby9z11xqzA4EPMDK4c7rXijcL6PlyPMtRwz8w3z60l5qhlea2IjiP22PtQGFHhDRWuBJ+ZxPqBS5QnYpZTgSjW9b2/nRAZmlySb3PaOnrRrp8btGp/vrtufkLbFSFeeRG1oH2M5IPL2uXO2vd3K8KbNisfXPWH6xBSllol7G1bYS2sJ+DqthKimuVdexI5z88cQIeYxNqEOOtktHKnh7ERosZ7Bjp1C4oJHGV8lo0W1ozJYRIsqtQRDeJDwjd6ix4iF5oysQkzrZxM56f7QD+1d33niMaEpmFhqy/7BC7yBhCP8b9zVu3gtLM1Og9p6hbVLI7kcP7XrCQxOLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i0sLqCoXetvzywPNOWYrnMIBL4+pV2DjbvHrMeLjgMI=; b=RLDnl6rSNgbtxA0nMnP4JmpJb3OzbvO1x8fjTvAr6GY7VWxC1voNoFHmGS27A0LCzqXom38q6UkJcpHTD1jllPpA1hDq2jGjh6ThmhjUmihE/zQtKx9urGi2bRXkxIFCB6VaQnfVv9LNj2lW1uYJbjhYzEgttHQzbqCdtBcm/DU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from LV5PR12MB9828.namprd12.prod.outlook.com (2603:10b6:408:304::19) by CYYPR12MB8654.namprd12.prod.outlook.com (2603:10b6:930:c9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.38; Wed, 8 Apr 2026 09:06:17 +0000 Received: from LV5PR12MB9828.namprd12.prod.outlook.com ([fe80::f132:7e75:fd38:8685]) by LV5PR12MB9828.namprd12.prod.outlook.com ([fe80::f132:7e75:fd38:8685%5]) with mapi id 15.20.9769.017; Wed, 8 Apr 2026 09:06:17 +0000 Message-ID: Date: Wed, 8 Apr 2026 14:36:11 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] i3c: dw-i3c-master: Fix IBI count register selection for versalnet To: Alexandre Belloni , Jeremy Kerr Cc: "Datta, Shubhrajyoti" , "linux-kernel@vger.kernel.org" , "git (AMD-Xilinx)" , Frank Li , Joel Stanley , "linux-i3c@lists.infradead.org" References: <20260401084430.436059-1-shubhrajyoti.datta@amd.com> <5cb83afcd5340a108fd5a7346494ccf73752cc27.camel@codeconstruct.com.au> <20260403162442668f12b7@mail.local> Content-Language: en-US From: "Datta, Shubhrajyoti" In-Reply-To: <20260403162442668f12b7@mail.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PN3PR01CA0187.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:be::10) To LV5PR12MB9828.namprd12.prod.outlook.com (2603:10b6:408:304::19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV5PR12MB9828:EE_|CYYPR12MB8654:EE_ X-MS-Office365-Filtering-Correlation-Id: cbc58a13-6dd6-40d4-54d3-08de954e17a4 X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: 5TbqCTV0/lmK6FEnP+f7Ux7WXHZOr8xwlhlsOdnKD8UlpOYnmQ/aqjdpSMmvYIsDD5upTyWevPTS0mXqAa/Iq+BfVwN3CGRNUdpK1UuR9haKinE/4ZjycF4u4G+HkXp3s4pmvRAdmu8ALwCbOf4L42+agH6Pa4glaIWq8V0zbetQhQeHryBx2lB0A5LZX8ZshLBagAniUb5ABRn8f/SQk5dZ3/vWY7C+GVOjV/OXNqMgb4/wB9xn5HZLo0WhCAoXxlUZdWoh63pNGKlvUFPh202omho/Vi9+4niXgJ95DSxPvGJC52uFAS56x3GGDzPPX1Anra1HzBODMUjI6L9enD8eDa1N2raQ199IcPY08havTNa5cY7VdIK/aCBDjHxl6Hu6Lp1XfGntOPfoqP2qK43SftEH5J4Qty0QeC2AjFHv7cIkr/bTde068swEM5ub4FQd/ihncWQ56J02jVt2zrvVofHEhYjV+whRAQR7h/CiAFaAWgtAsygjyOK9VKdmVW/0Z+09H9deOJ90HjKeVLmya2y69uOmHCBdOP7CKU0CyNLIaYZ7z50U3Dyz8ZrJNI8Dc78eUWR+lEKFDPQdLXQfmHyFff75z0lLpGwe5c3uoyHsP/04zYWDEy9BlQJ6r9dGy8rUDlUUFIyvS8/f5MNSiWV6h6UrLxH5o0J1uGOipBU3grhsiHaP+hxH7cSo X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV5PR12MB9828.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Wlo4TVFMRVp4WDAvdk5keUNpaE5yNklacHlvU2lkMjl1cnd5UEg0eTZJdkFW?= =?utf-8?B?U0NkcFFiY096MGQ4TXhnN3phRTBCOG9BTUtaQ3FOemtHZzJiZStpbmRsRUtt?= =?utf-8?B?d2ZxSmFYcHFmdDd5MEJXYXdxejM5Y2l5Mnd5eTJqRUZnand3bDNyU0lpL0JN?= =?utf-8?B?WmMrUE9PRktWS1JYY0RwR0JEUEd6Sm4wazl0RUxzZUpocUxmYjFVZ2p1bytN?= =?utf-8?B?Tkc4dVluOFJIQXB5WTFwamU5cXE5dnJBdWdEM0tuODdVeGNaTVBtZ1NJbkxX?= =?utf-8?B?aXF6ZXNVRERWSTNkd25ndGtqK08wTjNOMVZQN1J4MEpUd2NmT1pBMEJNR1BY?= =?utf-8?B?N1J3Y0VCWCtjZnVmRVdqak0yaG53VUxYM25HbmlMVUxUZFovM0VRK1hOQXdS?= =?utf-8?B?RFVIa0VmWVYrRFA0NG5IMVBleWE1TnNqVXRUMUZTWWxHVUxRUHFub0F4bDdK?= =?utf-8?B?NU9wWnEyWEo2Q0VDcURIcWRNYVZsa0xQT2lxWnBYY2lidVV6U0wrS1cxRHNp?= =?utf-8?B?QXdMNDVsZDBDTVV6K1RMY0VGVHpWNUhaNTd5dUpm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Org: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbc58a13-6dd6-40d4-54d3-08de954e17a4 X-MS-Exchange-CrossTenant-AuthSource: LV5PR12MB9828.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2026 09:06:17.2452 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TknwbZKBhSZ7GL9LhAgZQ3CXvXGjp5o/KgZaCzVdlJwgqa/8Ju+UTefFPlucgmjXmaGBQAGp44KUF3u5KUuO+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8654 On 4/3/2026 9:54 PM, Alexandre Belloni wrote: > Hello, > > On 02/04/2026 16:32:30+0800, Jeremy Kerr wrote: >> Hi Shubhrajyoti, >> >>>> How are you binding the driver to this device? Are you using a unique OF >>>> compatible string, or something ACPI-based? >>>> >>>> ... and if that can be specific to this hardware instance, would that be an >>>> effective mechanism to select the IBI read method instead? >>> Hi Jeremy, >>> >>> VersalNet currently uses the generic "snps,dw-i3c-master-1.00a" >>> compatible string — there is no unique compatible string for this >>> hardware instance. The DTS entry looks like: >>> >>> compatible = "snps,dw-i3c-master-1.00a"; >> You should *always* have a unique compatible string for each device >> instance, if there can be any variation in behaviours from that generic >> one (which you certainly do have here). >> >> You can still fall-back on a generic one, but using that as your only >> compatible value means you can't do device-specific behaviours in your >> driver, as you have just found. >> >>> We could introduce a VersalNet-specific compatible with a generic fallback: >>> >>> compatible = "xlnx,versalnet-dw-i3c-master", "snps,dw-i3c-master-1.00a"; >> Yes, you want that anyway. >> > I agree you need a VersalNet-specific compatible string. > >>> and pass a quirk flag via of_device_id.data to select the IBI read method. >> Exactly, and there is already the struct dw_i3c_drvdata to help with >> this. >> >>> However, the probe-time detection avoids having to enumerate all affected >>> variants — the IC_HAS_IBI_DATA=0 configuration is a synthesizable >>> option in the IP and may appear in other SoCs using the same core. >>> >>> Do you have a preference? If the DTS change is acceptable, I can go >>> with the compatible + match-data approach >> That would certainly be my recommendation. >> >> If it's a synthesisable option, it may even be worth adding as a flag to >> the binding definition (along with the same for other options that might >> be present). This would mean you don't need a-priori knowledge of the >> mapping of compatible strings to their synthesis options. >> >> I don't have any access to documentation on those options though, so >> can't be of much help with doing that. >> >>> However I thought that detecting it will be helpful for backward compatible. >> Given it doesn't work at the moment, there shouldn't be any backwards >> compat concerns, I think? > I guess the proposed solution works as we can probe the HW to know how > it was synthesised. It's good to be able to avoid having device tree > properties for things we can discover. I see three possible approaches here: 1. SoC‑specific |compatible|(e.g. VersalNet detection) Use a dedicated compatible string to identify VersalNet and adjust the behavior accordingly. 2. Dynamic runtime detection (current approach) The current patch attempts to infer the absence of IBI payload data dynamically, without relying on DT information. 3. Explicit DT property (|has-no-ibi-data|) Introduce a boolean device‑tree property to explicitly describe the hardware capability that no IBI payload data is provided, and use that to drive the behavior. Could you please advise which approach would be preferred? Also, if option (2) is considered acceptable and there are no further comments, can this patch be considered for merging? > > > -- > Alexandre Belloni, co-owner and COO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com