From nobody Mon Feb 9 02:58:51 2026 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2069.outbound.protection.outlook.com [40.107.237.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 DEFF116BE1B for ; Tue, 6 Aug 2024 07:59:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931155; cv=fail; b=d2V8uY0XMOQWMRSRZfQ3XkmbRH6gLaWM3z4lUADwyDmZetSOWdFR6+uO2qSVcvKt1ki9AxvDCRZrJl09SuTCKe7s0GrRjvzzqqJWNe2SG0kmhKR4zOoDNdYHMnJHrtv1zb7BiVL9q8gWVP8jKjbaQtgMC4zjK8C4brqfKqKL+lE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931155; c=relaxed/simple; bh=hOsWB36QY7uWe56AazeNBR0lhC67SaWmNMth+yBHlNc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=chZZCoA4ZNml66dKnhl8xlBPkojEX22y0fmFnqN6/hdP/qYoHD+7+DZ/GPCqJ8tAWGC03uEiRZ1W1+FeGw8c6pHYUHP/v1zU1bv+p+1vY/2g+PpZ+JoJL9sRKyn9fOAD/Lds8bGqDwCSNLEFD/gFO7uQ+6Q6i5smdvMFOJLkdCY= 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=o2ZsS1rm; arc=fail smtp.client-ip=40.107.237.69 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="o2ZsS1rm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FuhoN7eZ6S8B1QnkPkr66tHhgCibMjMvLMHsconZx59zKhynEPgnEk77Lb8+lnL4rBT1RV3aq6BSd2vkJr8YGs5xPWnfehENoeSDoQNpDEm9fJUokuQywlvSFyRnMM+jVQnj/znoEmdwsDotV/IzaUglOV8l7fhy+627juELN0M/Vp5Z6IxtdX+FrGdBaSVvGuTNSE26/4M78QfnS1e/Y8K0ZNLxnyGQfrk3c9I/AO0r8dat1PHidoDJkARvLfiZIpHKSvdQ4QQkWFce4FCPguxyHxWs1WHqT2vZ+tD0CMqPmn4Fn7d3wVW4vhVsXDHs9LdNuU7N5AcqTQsr6lOAlQ== 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=lNHgjB00ALabz0gEfsFji45NSN6Xrmn1vzcUy+TLxm4=; b=iqymCE2KeomT2WhvLiiUQDmYApok/nB15rVONFBcuuHrfTNcbUSfWoXpvb6dHVnSnc8eAHoXv37QtmeIQ+utlPdQrvGtGLorTpyXHzG398oJkT68RBNNmdKrLpAeQ1tLxvkUZ5ZgaqDVpn3qXZIOadjTYUc9KZwGhbYqHzxCEyPVJR38+xPslcZvmTvi1C2DqiihJGNQYlznw1UOIA18STYZ+h5NVbRMXvsytl+CgyyPftT8d/SCdBYyXj+I2HQdkPiwUB8LLJGV1LrIM0690XT2sFjYvK8FVts65iw4i+0SNVpB6CnYjSmZTknWHcdXVH6Dy14/SKG3hTXgMckBLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bootlin.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=lNHgjB00ALabz0gEfsFji45NSN6Xrmn1vzcUy+TLxm4=; b=o2ZsS1rmi4pYgBjlHhvtzo4nB5mmdqPasnNF+fLwyTWHBc/ZvF5bN7+CcYL1W5ovGfZa/c5n4kIREs2dS3hi0PE1qIGWJ9uRZwCr/HtrZAyWq577gqdgFRS6H2JcP9L8MgMmlDFmfgiHBWSd6i5D7p1a6ObMnmpiCc+HwzTF6T4= Received: from SA0PR12CA0023.namprd12.prod.outlook.com (2603:10b6:806:6f::28) by IA1PR12MB7520.namprd12.prod.outlook.com (2603:10b6:208:42f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Tue, 6 Aug 2024 07:59:10 +0000 Received: from SN1PEPF0002BA51.namprd03.prod.outlook.com (2603:10b6:806:6f:cafe::dc) by SA0PR12CA0023.outlook.office365.com (2603:10b6:806:6f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.35 via Frontend Transport; Tue, 6 Aug 2024 07:59:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002BA51.mail.protection.outlook.com (10.167.242.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Tue, 6 Aug 2024 07:59:10 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 6 Aug 2024 02:59:06 -0500 From: Shyam Sundar S K To: Alexandre Belloni , Jarkko Nikula CC: Guruvendra Punugupati , Krishnamoorthi M , , , Shyam Sundar S K Subject: [PATCH v3 1/5] i3c: mipi-i3c-hci: Add MIPI0100 ACPI ID to the I3C Support List Date: Tue, 6 Aug 2024 13:28:39 +0530 Message-ID: <20240806075843.277969-2-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240806075843.277969-1-Shyam-sundar.S-k@amd.com> References: <20240806075843.277969-1-Shyam-sundar.S-k@amd.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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA51:EE_|IA1PR12MB7520:EE_ X-MS-Office365-Filtering-Correlation-Id: 70cf5027-253d-43ba-a22a-08dcb5eda7b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?YhsBY+RaiSqTcwHFHpGXq6I21eCcnVE28UxfKV/quTjAV/9M7YoCOM7+8fQY?= =?us-ascii?Q?QlV1uYtETXxAeYtdZC+e3XjQk2ysNw+7aMy49mvU4/ygJaVExTXXsrUTVVgG?= =?us-ascii?Q?gvdUV6NOxlfUzS05EQ6RwPa5Es2yzb9ik7zwtHTuDdA6GSfU41dCn09jCXCg?= =?us-ascii?Q?mlGikoNXZKfG68m8qkVV6awcukCIX7HgTiKu90erR3EVu/P5IOM8ymBZb4JC?= =?us-ascii?Q?mT/8z+m/IkPPYU+EoZ0NvsV6WIcSiRGLQ/M2g1kTPnS/XewrM3tpYxlRTMrQ?= =?us-ascii?Q?ljxoAzlb5av15LH9hOdNR2WfVLjjZTJXIlJN+Z3ASWxISpRCHIgwmlBI/VAU?= =?us-ascii?Q?R/MOGJOXBYJeT/BsQg2yZXzm95ct6hSCUFWIpIHS3r7YW3wXaIWlkVQZE81j?= =?us-ascii?Q?bBWOnHZO3r85TnVAoZqxRtCilDuArOo0St4x/8TGGl13qQCzB72vesKM+8Js?= =?us-ascii?Q?cIl4P+PU+AINKHjZ3gg8+HcPi0DIdtztL7tnWrBUdx9jpoPifFBuEyLOY4Ng?= =?us-ascii?Q?WOuPDKgIp2pPvrIlLy+DkEijv7PFtqT8ufVFsmtB2mx9USimxaaxQ2DMmbfp?= =?us-ascii?Q?GxBzs3C4f6vVCrn+6ZrieJ5OFOHon7GLDE44AEK/tdMcGv+BHI0NdBhzDUn3?= =?us-ascii?Q?VmDDaf4FUyZf9lMPC2C9WKeZ3RYbuWpobx9O3GQk+/vpqLBk1+Sf/zWeLdIn?= =?us-ascii?Q?1nqp1zF6kdGObBpBz+UAqo2DGqO5Bknwi3g11BrnS+17CQgh1mND2a5QhrEA?= =?us-ascii?Q?IJAnmYP8KVyfTRvHHsbupGJ45Cwv9UOfLq50WoH5cLTyXrJPHniUMVWHBxlf?= =?us-ascii?Q?y7/VdCEOChjQFY+Ml5zGk7c/hhF1Yz4rH0gOFMzqKSh6BY6VXDTLpqwySmKh?= =?us-ascii?Q?IE5gPHy8WBs+60z5mbFUT0UXw7IL16MKmOL2r181iqN36v9udmsgtuw8Rjtz?= =?us-ascii?Q?LYtR737ddU1VtZd0SAV3ViuceOXXXuAQWF7GMyVbuKTQz0TuP3hLh9q+uT6S?= =?us-ascii?Q?N1fuqe87U/VknH0MZZiH4ZqbKHVwLLnl9h8cgfvd+GEl3WqQEyk57M0434hQ?= =?us-ascii?Q?nc+pqm5dhkEHKzxwEivQFppjKNCEuAJmULrocg3+Rhv4+255GuGvOYh16/CF?= =?us-ascii?Q?ZqYtVK7i5eFoMiyltUiMzOFLDlEdmLL3NUWm/BzPgtgWrJ2NFzCFt8Fgm+BY?= =?us-ascii?Q?BbwcN4KW/TC9Yle4KAvIzYHWLmTTv903q+jjG/Q+WapFm1a8zgrS6m69Pi3L?= =?us-ascii?Q?O9QMZNo+Myrzyh0a2X4PtRPIxwjIhK8EpBAe0vS8FrtBsdXgXiIf8VLWc1+e?= =?us-ascii?Q?u2mwvX9Y2ZTwWbc5Nyz47hCCtj3b/+pfvU4zGHXnDclYGlQoXBBWWwGGXqYK?= =?us-ascii?Q?oKWMD4ozsIrgmlyq3A1PYinHCDByORgKPtneiCi+OIApa6x4bdk7V9sIMWOk?= =?us-ascii?Q?c/+lqPD/ZfsnpR/J5KLH73UKf2S+dvXx?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 07:59:10.4758 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70cf5027-253d-43ba-a22a-08dcb5eda7b8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA51.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7520 Content-Type: text/plain; charset="utf-8" The current driver code lacks the necessary plumbing for ACPI IDs, preventing the mipi-i3c-hci driver from being loaded on x86 platforms that advertise I3C ACPI support. This update adds the MIPI0100 ACPI ID to the list of supported IDs. Signed-off-by: Shyam Sundar S K --- drivers/i3c/master/mipi-i3c-hci/core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mi= pi-i3c-hci/core.c index 4e7d6a43ee9b..5ef848833a81 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -834,12 +834,19 @@ static const __maybe_unused struct of_device_id i3c_h= ci_of_match[] =3D { }; MODULE_DEVICE_TABLE(of, i3c_hci_of_match); =20 +static const struct acpi_device_id i3c_hci_acpi_match[] =3D { + {"MIPI0100"}, + {} +}; +MODULE_DEVICE_TABLE(platform, i3c_hci_acpi_match); + static struct platform_driver i3c_hci_driver =3D { .probe =3D i3c_hci_probe, .remove_new =3D i3c_hci_remove, .driver =3D { .name =3D "mipi-i3c-hci", .of_match_table =3D of_match_ptr(i3c_hci_of_match), + .acpi_match_table =3D i3c_hci_acpi_match, }, }; module_platform_driver(i3c_hci_driver); --=20 2.25.1 From nobody Mon Feb 9 02:58:51 2026 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2088.outbound.protection.outlook.com [40.107.236.88]) (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 74BFF1BCA1D for ; Tue, 6 Aug 2024 07:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931159; cv=fail; b=bq68VhJ1i423Cu3FjLoTq7KYE6DSDjzJTlDdulPeI7BPc2c+ptN0JaYl1xgkimapghN/Fzo+xqXS8KRomq+mamNl0frl7XdHi4M4jFkajArWRUAeVoOBxKqof4060ya0Tl0MNkpelMxIsPIDBtXxbjeYSk4pqRXCMnUEfRbMuhI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931159; c=relaxed/simple; bh=VedF1ZryzOdYpVCvvKZ47uVo9Eh9RbpPAsGlRrqq7DU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n5MgB5X+FvJ0XWXeV7ZvsGC54TprKj4EFBEAJ2zraAyrE1lfCBOsikSukdvYR0l31YyxthEcjy23D73oDZCyZXDBmFFPYCB2/zuRxkovQSouDrRA5JwWBbx1qqarfQuiKDQK02T6bDj5RCN4rGxrU7jFdGFv9jh+rRAS34rm0SE= 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=3uyyqgTJ; arc=fail smtp.client-ip=40.107.236.88 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="3uyyqgTJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N3KPo5DcFcERSaeM6JHuF8fDoKf+0CMsSCscyTDNcWqGf2IYxKcMGgPQ6XiHlG9R2XtZD4yqhFUGcH8z1Jcf8a5Ewu6CGwnZfB9SLcwr9xRqfhZusJKbXlEwyHqK869brWrFgFmty/rxr8jHuXquj+00pryocXhHbZynBm66F9uiQEpeK9p2/PYM7lYy5ZQNddwm4HiFkJ9ehonQxbohj/0grI6YW7S+iVwjOpILArk2VoaG0++tOkoL0wL887vbdXF/TGnvdxdW3d8xgWPZ63zBxLKsUBqJfabqPvwxDeDPGwFVI9rQ/YUYNSUEXP4eyTuyTAYG/tyk8pnYxPGESw== 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=T0GJCDR9Gk85YbbUGbevrx9NjsFokBCv/AO2dZhpGe0=; b=nmS2trdNn80/b/ydI1HPFeE3cs2rPAkST+eJrOW+1+6nHZZyBfGSB3pqNmQOSgLPZIk8ipgObZmO8rTOjSCh2v6ZGzCnHwx9OJQXk2I0X7FJhqgYyD6cEb/Vmcw3Wk+Fi+/V9HR3OOlYTzxQkOz8FPSCRi9Ksy3mQOf5WhlNuWJwQ5eUoFqNDQDMstEGxHHA/+Ypmy8lZIV3h5nKY9lww/7w7oLCJj0/xhKAJstqEfBbXrewRobBM5Nigvr06r0Gqeol15q9cEgcx4hrpxlMPYKdxce9fY4nPpZIp2J3IFqAN52IRgXnrmfLXwjUC01SfSWowXQCChz51Udbwguohg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bootlin.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=T0GJCDR9Gk85YbbUGbevrx9NjsFokBCv/AO2dZhpGe0=; b=3uyyqgTJNsV9SnwLjhP5UfI2ycy+JjADSXJHsLxCLVuEnSuDvFPHH0wPcw+pQ6wxBbLdXXIfnHqJYz5HadcLQA6TnGSdEpgOqf9QK0OESoyd0DM5QHyee7inZtmtUZ7ecqY2nC9jX93dCQO7AELhmhYkPyl8Jps5t2NIa3h88xQ= Received: from SA0PR12CA0018.namprd12.prod.outlook.com (2603:10b6:806:6f::23) by PH7PR12MB5974.namprd12.prod.outlook.com (2603:10b6:510:1d9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Tue, 6 Aug 2024 07:59:11 +0000 Received: from SN1PEPF0002BA51.namprd03.prod.outlook.com (2603:10b6:806:6f:cafe::5) by SA0PR12CA0018.outlook.office365.com (2603:10b6:806:6f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21 via Frontend Transport; Tue, 6 Aug 2024 07:59:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002BA51.mail.protection.outlook.com (10.167.242.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Tue, 6 Aug 2024 07:59:11 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 6 Aug 2024 02:59:08 -0500 From: Shyam Sundar S K To: Alexandre Belloni , Jarkko Nikula CC: Guruvendra Punugupati , Krishnamoorthi M , , , Shyam Sundar S K Subject: [PATCH v3 2/5] i3c: mipi-i3c-hci: Add a quirk to set PIO mode Date: Tue, 6 Aug 2024 13:28:40 +0530 Message-ID: <20240806075843.277969-3-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240806075843.277969-1-Shyam-sundar.S-k@amd.com> References: <20240806075843.277969-1-Shyam-sundar.S-k@amd.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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA51:EE_|PH7PR12MB5974:EE_ X-MS-Office365-Filtering-Correlation-Id: 88ddffc6-7980-41fa-3a25-08dcb5eda832 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?9KXgdUmN1tbIHcNWiZg+MpNw/qSWTPjVZrnOfMnNFUNw3EAdH4YkjhGO7VBa?= =?us-ascii?Q?rakGAXwcsWC2PGoLEco8jTqBcm9qo8B8ONetyMr0eAXJS5n6gW4S2EErga9Q?= =?us-ascii?Q?K5CNjrlLJZICbrHTt8Y14KfuBnpX8sonNsubWLdjjG8rCpzfYyj5Jvu84I3S?= =?us-ascii?Q?V3bBFvp1PQnexX0LyCEI7TB6DXVzEzhFvtaFZoqzGtZ396U4PJQ0XUBI2gft?= =?us-ascii?Q?J9Rtw5uahFqKOOOUoKBf2Ubgf5I604P/LS7gBR5VcC7S2RlVlbj6Y6MN3m0v?= =?us-ascii?Q?F5+g2XesXcVDHEAK4rNJkp1t/ZaIu5qcAgYmmL2VeJ/lI6diDE+IGYcVxKUx?= =?us-ascii?Q?0NVEuoGDSkMZU8uWkuzjzo04No4UvOwz4PtEKV5bXiCXpjtV0Ta0IjVso03B?= =?us-ascii?Q?owU38eSAkF7nnktQfCTMcJf3bcLc+ftuGVgJ5JmufKiu2eK5cUsiqDSNyTsB?= =?us-ascii?Q?sPpRGbrpZP8ev4idMf9AYVYY7ZyDi2m9/JVbdubqUvM9eOM5qi6jL0It2RWA?= =?us-ascii?Q?xUpNROLoRdYm5O+9+DNkufUADOUfsRnGddNe1hgk/AthbT0R4pbdP9THc7q7?= =?us-ascii?Q?IB4lIHUULqIoAC4IEjZM5w4XLn/09fcp7zmxVJfbWRC03p3igoHXfdehStVI?= =?us-ascii?Q?e9ZOAopHM95exeY+J/d+lFL80+b82ik1rz1Q/K3nqwTUpPUGn7llMBn6P91r?= =?us-ascii?Q?Gs4p+7cElGpHRwvb+WFg1GY9L/I07+e9V6XyOcMqtT7xwc1V6hXmiSKaQgvb?= =?us-ascii?Q?0QqfPgilcOCuM0q+aNwwj/GkH436tb53noeLJp1D6lOI7ug306HdwC/0taxa?= =?us-ascii?Q?D4W1KbmnwNo7GW4UAR6X3MgxtGQg+cCysE/lCU9v7opB1Vt5yCkLmvvNx+Q8?= =?us-ascii?Q?SRFcvp73svU8yWS/t+J3U3s41rF7o7i9ouWhU8aAcdpgul8dGx+b5Y0xWU0w?= =?us-ascii?Q?4a53PDi09fGwZ3NiEeg/xie+blDop6Qq2GoRm1tjK1FEdcDvtjdsn4OiQ16R?= =?us-ascii?Q?9qmO82tAEdqAGoJ0/MIlExKXaJDj3w8ejNmgVRBbTXv1sxNEs2jM70T58RY5?= =?us-ascii?Q?oocRzWg73Zlwkn1/E321q8I/IkIWuflQjA2jBRvNfePNFIvl0QuQS591+1sd?= =?us-ascii?Q?S1RQuIHNz6eD9eANk06wLKKmOcQvtoKiEhc2g1cSaxsLMUz5lcX/+d1DsKk1?= =?us-ascii?Q?lEp9VO3230PGV4dOT20toQmrhE0OeDlPa8zyWNrMyk0XPF/2Y34PxEWnk/Cw?= =?us-ascii?Q?6VUH7EiBeR4m8JMgy9cVnOqMTVKcZVER1ByhwFJBz8uSA2jU58cCcolD/4MN?= =?us-ascii?Q?WolXYdTuG0B+azliMqocYi50XcZqLJAcCsoPWQ4x8em0P9MDTh1tp/hZlOB+?= =?us-ascii?Q?ZvBH3Nv3Eo7oXUpfqYoF+DF9oQtyd/yeRNCNEX9OoUxRh6j77FIaHK4LFYtU?= =?us-ascii?Q?hHpEBoHgRoDY4Lt21dwA+SzvTosNFUGA?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 07:59:11.2883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88ddffc6-7980-41fa-3a25-08dcb5eda832 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA51.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5974 Content-Type: text/plain; charset="utf-8" The AMD HCI controller currently only supports PIO mode but exposes DMA rings to the OS, which leads to the controller being configured in DMA mode. To address this, add a quirk to avoid configuring the controller in DMA mode and default to PIO mode. Additionally, introduce a generic quirk infrastructure to the mipi-i3c-hci driver to facilitate seamless future quirk additions. Co-developed-by: Krishnamoorthi M Signed-off-by: Krishnamoorthi M Co-developed-by: Guruvendra Punugupati Signed-off-by: Guruvendra Punugupati Signed-off-by: Shyam Sundar S K --- drivers/i3c/master/mipi-i3c-hci/Makefile | 3 ++- drivers/i3c/master/mipi-i3c-hci/core.c | 15 ++++++++++++++- drivers/i3c/master/mipi-i3c-hci/hci.h | 3 +++ drivers/i3c/master/mipi-i3c-hci/hci_quirks.c | 20 ++++++++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 drivers/i3c/master/mipi-i3c-hci/hci_quirks.c diff --git a/drivers/i3c/master/mipi-i3c-hci/Makefile b/drivers/i3c/master/= mipi-i3c-hci/Makefile index a658e7b8262c..1f8cd5c48fde 100644 --- a/drivers/i3c/master/mipi-i3c-hci/Makefile +++ b/drivers/i3c/master/mipi-i3c-hci/Makefile @@ -3,4 +3,5 @@ obj-$(CONFIG_MIPI_I3C_HCI) +=3D mipi-i3c-hci.o mipi-i3c-hci-y :=3D core.o ext_caps.o pio.o dma.o \ cmd_v1.o cmd_v2.o \ - dat_v1.o dct_v1.o + dat_v1.o dct_v1.o \ + hci_quirks.o diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mi= pi-i3c-hci/core.c index 5ef848833a81..7843a3ac2121 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -33,6 +33,7 @@ #define reg_clear(r, v) reg_write(r, reg_read(r) & ~(v)) =20 #define HCI_VERSION 0x00 /* HCI Version (in BCD) */ +#define HCI_VERSION_V1 0x100 /* MIPI HCI Version number V1.0 */ =20 #define HC_CONTROL 0x04 #define HC_CONTROL_BUS_ENABLE BIT(31) @@ -753,6 +754,14 @@ static int i3c_hci_init(struct i3c_hci *hci) return -EINVAL; } =20 + /* Initialize quirks for AMD platforms */ + amd_i3c_hci_quirks_init(hci); + + regval =3D reg_read(HCI_VERSION); + + if (hci->quirks & HCI_QUIRK_PIO_MODE) + hci->RHS_regs =3D NULL; + /* Try activating DMA operations first */ if (hci->RHS_regs) { reg_clear(HC_CONTROL, HC_CONTROL_PIO_MODE); @@ -768,7 +777,11 @@ static int i3c_hci_init(struct i3c_hci *hci) /* If no DMA, try PIO */ if (!hci->io && hci->PIO_regs) { reg_set(HC_CONTROL, HC_CONTROL_PIO_MODE); - if (!(reg_read(HC_CONTROL) & HC_CONTROL_PIO_MODE)) { + /* + * HC_CONTROL_PIO_MODE bit not present in HC_CONTROL register w.r.t V1.0 + * specification. So skip checking PIO_MODE bit status + */ + if (regval > HCI_VERSION_V1 && !(reg_read(HC_CONTROL) & HC_CONTROL_PIO_M= ODE)) { dev_err(&hci->master.dev, "DMA mode is stuck\n"); ret =3D -EIO; } else { diff --git a/drivers/i3c/master/mipi-i3c-hci/hci.h b/drivers/i3c/master/mip= i-i3c-hci/hci.h index f94d95e024be..91e8a3833f3d 100644 --- a/drivers/i3c/master/mipi-i3c-hci/hci.h +++ b/drivers/i3c/master/mipi-i3c-hci/hci.h @@ -135,6 +135,7 @@ struct i3c_hci_dev_data { =20 /* list of quirks */ #define HCI_QUIRK_RAW_CCC BIT(1) /* CCC framing must be explicit */ +#define HCI_QUIRK_PIO_MODE BIT(2) /* Set PIO mode for AMD platforms */ =20 =20 /* global functions */ @@ -142,4 +143,6 @@ void mipi_i3c_hci_resume(struct i3c_hci *hci); void mipi_i3c_hci_pio_reset(struct i3c_hci *hci); void mipi_i3c_hci_dct_index_reset(struct i3c_hci *hci); =20 +void amd_i3c_hci_quirks_init(struct i3c_hci *hci); + #endif diff --git a/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c b/drivers/i3c/mas= ter/mipi-i3c-hci/hci_quirks.c new file mode 100644 index 000000000000..8a8fbd697175 --- /dev/null +++ b/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * I3C HCI Quirks + * + * Copyright 2024 Advanced Micro Devices, Inc. + * + * Authors: Shyam Sundar S K + * Guruvendra Punugupati + */ + +#include +#include "hci.h" + +void amd_i3c_hci_quirks_init(struct i3c_hci *hci) +{ +#if defined(CONFIG_X86) + if (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_AMD) + hci->quirks |=3D HCI_QUIRK_PIO_MODE; +#endif +} --=20 2.25.1 From nobody Mon Feb 9 02:58:51 2026 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2078.outbound.protection.outlook.com [40.107.223.78]) (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 7990A1BCA0D for ; Tue, 6 Aug 2024 07:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931158; cv=fail; b=vEAbrNu1TM4EDjxF53xpiOtRNH1eemSgcyiTWYZCt+DCQkGy3uZtC5hW+AfOrqQPW0lmPs43SYl44Vpl3QeoWaxoS8DvwUM4YsoE20fNcCWLj7Lj+nn9jkfcp31hUTbWxFl6pMdESkqmUdpJ/h9gI7JBxoty52ctShY51gOM2mo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931158; c=relaxed/simple; bh=/UcjeCdQ5cXbXan9Ux5QyQd/5ucLR65rZBxPTyAeYCs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BaFZg2hKwiZ6/QR21mgUknsccXTfwrBGdCDLUrkH5s8iKBBFCFBRa0+BV74TeRPHP+7PlQSytFDGjRJ79+IzHP0sx/3qWVefdOXaq4XRFUExvpD31SxnO5h1jLgjmt+mzLOh5ef707lMv5/rteOl0WyxGIUAqwSo8N+X7BaBP54= 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=teW7+pvK; arc=fail smtp.client-ip=40.107.223.78 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="teW7+pvK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SLX/Z1yx6uRIcUbKeAmRnocZebFw/CDSUvu1LO88T34L244thmEgDYm7i4UZ8ywbzSVL+iU6LOQyGe6ga3M33sVUxczXJElH/P09k7nKrTJ01SVqkq5xi23uL3tMUdcLlG3lOSo25EvglPEZRTAap9NUDWVFK7hqaKOPLkt5qVVkpKSDOVwd38v7V5ooMzovRxUxH1IVsnUDoRrIHnYmhD7HMQQi8cCAAtEtQzrr8gw1/uv0Qpl1sjGk7jfrysUfSl0aA1tM5BeM/Wz6d+ohrOxFyNsMG31OZKTnpE7uqKTyR69ceM9k+4bNHHOEknC9yn1o0ddcZSADHosbHz4W+Q== 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=OyEJrgrTsFRdzf2iEC9xm5OzcqbgtowxN2k5RjCNlJc=; b=EJ7Sa7BE/TbaG32QUR7dBUI6W9Nxlxt0qocsIWxCaF/4wgXv5Ch+1n3sk118ita0Xx5+Ix9Qmu6YMdsvOlbdJxdPFW3gO5KE8hObKCfBxUKjNj0a9kjshX3v0GMJKSbYBhzezwDtHhnAaHYwBIQs55S6uP5Cx0x0kCmpy0yYhXd5BzoK4Iz3FG/mMsZNZ8yZqyi15OQmf4K0XAytKwcQ/1yECPBnolliWG9ZYe85SAAPku/3uIiNaFGodQlV93XGoGnkTn4j7tQz2GOuglRqF3gh//yBywOO9soPqYt9QuLXCfI2A7m+sCdnLJkJHIP+A0Hr9FyciuEHx2RxE+RBYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bootlin.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=OyEJrgrTsFRdzf2iEC9xm5OzcqbgtowxN2k5RjCNlJc=; b=teW7+pvKqMDK6DZbbjAAngvwxIYUmtdMV+Vi/D8lnmOdp2hjncvcj9baY8F2MpgtEQUlSmmoHE9i4Hzht7SeJ/BLlcw/RZq3AEmtVvkbB3zrQCQPWRp/dGeGREjpNBlb14cbR3fIXLKfPtERXPuLy4wHmIbgI7lz+jMH8vH9ZOw= Received: from SA1P222CA0172.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c3::28) by CY5PR12MB6456.namprd12.prod.outlook.com (2603:10b6:930:34::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Tue, 6 Aug 2024 07:59:14 +0000 Received: from SN1PEPF0002BA50.namprd03.prod.outlook.com (2603:10b6:806:3c3:cafe::50) by SA1P222CA0172.outlook.office365.com (2603:10b6:806:3c3::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Tue, 6 Aug 2024 07:59:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002BA50.mail.protection.outlook.com (10.167.242.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Tue, 6 Aug 2024 07:59:13 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 6 Aug 2024 02:59:10 -0500 From: Shyam Sundar S K To: Alexandre Belloni , Jarkko Nikula CC: Guruvendra Punugupati , Krishnamoorthi M , , , Shyam Sundar S K Subject: [PATCH v3 3/5] i3c: mipi-i3c-hci: Relocate helper macros to HCI header file Date: Tue, 6 Aug 2024 13:28:41 +0530 Message-ID: <20240806075843.277969-4-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240806075843.277969-1-Shyam-sundar.S-k@amd.com> References: <20240806075843.277969-1-Shyam-sundar.S-k@amd.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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA50:EE_|CY5PR12MB6456:EE_ X-MS-Office365-Filtering-Correlation-Id: ac7ddbfb-9ef3-4fba-6030-08dcb5eda9c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jXE2yJM0TxXo5ZAeBrjAtCTa/pw7/o4bX4kQCPlf6JnYzfLWmFSTsrYE5Z0/?= =?us-ascii?Q?rEea9ydjllZEYYsf8lLbgnTOjD0+lcCQeOU7PdtG8S6mYHa8dBYqdnYUM2rd?= =?us-ascii?Q?Hq5qzEj1Z0WDvXGahReJE73c/Z1Su5yWjwkdZe9LcCnQBIV2dmFJaVaS3Sfc?= =?us-ascii?Q?ARK8+Px5Aah29eBhq5+zMFqEEdW7KYQEclPNbVxu9RoBtOnT11+LvXoke9Ns?= =?us-ascii?Q?+dFO8swteClIRZua00VjoDFweYuuETBBNrqb3wLJrUDh3j4uj8ILHP+kRkJZ?= =?us-ascii?Q?Cl3DxYeqNZmCkNGl6fu55WrDqHR8RREifCbVzXzGGJeGIqiSfEgLOaDULLBK?= =?us-ascii?Q?Nyil28N9FGsEuq8tHRER4w0MSkvW6WLKPjshoikSD/yYxmua/dQwn65f26Xv?= =?us-ascii?Q?ebpzaDe71Ce2sMJSklJh/VPj+EjQkZTpABGhe39MR/OanNxDfmZCde37UOVZ?= =?us-ascii?Q?InE9rtPMJSxRMMjtpKf2dW96+sQUCSdcuBFhGk3rx1IY2su/lbd+xA/hpboI?= =?us-ascii?Q?oNMNA9FfqDu1TNvzThGioVnXbqHdaSdDaxZrMA8vGITF3e1+YPy3yujWnUaN?= =?us-ascii?Q?drOjSCTyS1ulq9+Fl4X3nJBIWXL1spWadppGY+l9Y+Tp345sHc+o1knC0Xlf?= =?us-ascii?Q?nFNiDTggvvf7gr4rVPm30Jk80QyNwWDxxJRxWW5FpbvhX3hKtI8PXMWwIWeN?= =?us-ascii?Q?mutOInIkiMyCcJ4HWjf4KvgcP2Dw+0aEW2L0PA0hALbdUU6YnksTHibsOPqF?= =?us-ascii?Q?mH5Z3THvqSs+P7BoPtTOcWi8C+EibSl2SHmAZV//DDEF5tzn0EyzZcMdA7Zd?= =?us-ascii?Q?fZMHFdj8AysxaqSA1pAElre9h9wX6zvz0nvcTXYs4YS+CRPwne8qh1h1PXdL?= =?us-ascii?Q?Jjh9DvkWQMECpWSL81v5yppNUGQ1EXv0Kk/fLkEOaQhPWwCOQGOXivLVRUPW?= =?us-ascii?Q?QJhM76LPD/blAnhG1VLj/HqMde+uRl9uh+a1H2a2RKeRLx+tL77u1jqDhp1+?= =?us-ascii?Q?WlKFDJF8LT+7/8QXW68i5XmeU95MML0jN51ZG8q5H8EjmyfRb2wpdtrjIBVg?= =?us-ascii?Q?AswCIAVClnxsVDS4vukGo9nNxoFQotD9BGvgknKvd9od4vy7zexLhPplXfFh?= =?us-ascii?Q?/w0nT4nbXYW1EtLtIMbwTSascT7kdxBASBy4+/ykW8+OWDkxI4aJjPiTX69W?= =?us-ascii?Q?rkUU7OSfr0OsB9SKFG5u+xfB7FjXtY6DGpmbFW2GdVVWPEo/LbDLx0VNJ7Dh?= =?us-ascii?Q?PH8m9I5IGJacKL3zpWzCe04sT2o9CrtzTiHITQXjRi1yjesI0OrZvj1YpZfK?= =?us-ascii?Q?MhA0z7pEYQ62ExjYaIOorWgLccFhbG8bfjwssUOkOuYue6RMCP3ap413jMBh?= =?us-ascii?Q?DBOr4P9dJa+Z8GkibqLgt7eFZyyurG1i5IZgbsuAXSEyY7dRs8AG2vJeMzC3?= =?us-ascii?Q?cbQ4MM0L3I9YF9tV9BdtpWC+hEY1nZvR?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 07:59:13.9057 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac7ddbfb-9ef3-4fba-6030-08dcb5eda9c6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA50.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6456 Content-Type: text/plain; charset="utf-8" The reg_* helper macros are currently limited to core.c. Moving them to hci.h will allow their functionality to be utilized in other files outside of core.c. Co-developed-by: Guruvendra Punugupati Signed-off-by: Guruvendra Punugupati Signed-off-by: Shyam Sundar S K --- drivers/i3c/master/mipi-i3c-hci/core.c | 6 ------ drivers/i3c/master/mipi-i3c-hci/hci.h | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mi= pi-i3c-hci/core.c index 7843a3ac2121..5c4fcb740856 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -27,11 +26,6 @@ * Host Controller Capabilities and Operation Registers */ =20 -#define reg_read(r) readl(hci->base_regs + (r)) -#define reg_write(r, v) writel(v, hci->base_regs + (r)) -#define reg_set(r, v) reg_write(r, reg_read(r) | (v)) -#define reg_clear(r, v) reg_write(r, reg_read(r) & ~(v)) - #define HCI_VERSION 0x00 /* HCI Version (in BCD) */ #define HCI_VERSION_V1 0x100 /* MIPI HCI Version number V1.0 */ =20 diff --git a/drivers/i3c/master/mipi-i3c-hci/hci.h b/drivers/i3c/master/mip= i-i3c-hci/hci.h index 91e8a3833f3d..2b7560149520 100644 --- a/drivers/i3c/master/mipi-i3c-hci/hci.h +++ b/drivers/i3c/master/mipi-i3c-hci/hci.h @@ -10,6 +10,7 @@ #ifndef HCI_H #define HCI_H =20 +#include =20 /* Handy logging macro to save on line length */ #define DBG(x, ...) pr_devel("%s: " x "\n", __func__, ##__VA_ARGS__) @@ -26,6 +27,10 @@ #define W2_BIT_(x) BIT((x) - 64) #define W3_BIT_(x) BIT((x) - 96) =20 +#define reg_read(r) readl(hci->base_regs + (r)) +#define reg_write(r, v) writel(v, hci->base_regs + (r)) +#define reg_set(r, v) reg_write(r, reg_read(r) | (v)) +#define reg_clear(r, v) reg_write(r, reg_read(r) & ~(v)) =20 struct hci_cmd_ops; =20 --=20 2.25.1 From nobody Mon Feb 9 02:58:51 2026 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2040.outbound.protection.outlook.com [40.107.212.40]) (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 0C2DB1BD4E0 for ; Tue, 6 Aug 2024 07:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931161; cv=fail; b=ZLlGYkTg/bros1hW7o+GkxFF6m/ySLBfma6ILWIHIwt7L3SPTw6KtGG++XoZ6y04x7AMyA1P9/MSvRtvp0CtKx2Rvh68pNkl+zhIu8Fga6upQVWEeso7vTNcvyejGZ4MP547L5KZa3fOLXrwJVRTLbl0EFPqdcN/JLCrn9K4Enk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931161; c=relaxed/simple; bh=FENfOdqMl2Bwzlf+FOvCugSVmQwyXsujt9XUknBwJXI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lAt5hMrjW5fKNZyx0W85SNUEDj94U+ebujnl6n6CzW2rpx3sOD6Zh6u1j5fAVWR66V8P2PAlHup2NAeNi+ykjQSaNVe4G5/8nYAzZUyibrHfRscL8W8jsS+anOTfH6r1B4sQXxz9dBK4uJPhzR6zI3sVioSm8TDtcdHj2jTa058= 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=KcyURGzF; arc=fail smtp.client-ip=40.107.212.40 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="KcyURGzF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N0Dlm5F0HnpLTb87gxKMkHLKAFOQ6IG8hFVFuuJFF1+/xdvc80S0r7CdsZ3nGhq9aHxW4+FQWKH6ZVLafsq5ZMulTiTzYQyCTLBj7A8YvLQQBwGkA4b08rjCGfV3oBXlxg9y5R87VHrgji8jGON4LoIOXeIBpQ2f8+dAnvxDXSTaEyNUQkMn/ylEuiVMUS8ZZlPg9NINSPpy2ObvUMm0eAlYT7ndJ9zZRu574lElmuARCkbNe+nPiGgiq+coKQhVi1Rte1+DUn7AeYP5Facqewicq5sdb4MWksL7in3pbgq8WIe7+V1YoINU25uRv+q6hVPq1tB15oF1ka1kJIKs7A== 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=Fu6+K686Dt5XCNF6lBu7lrGF24EzmvRoVMOApH89cAg=; b=tTNUFqkVWJG94ffWqmrqAT78dZNCn6MM3pO7aqTJ4SSih6ihhnOCEBgt1RrF3V93/o6wHCcgg+Ctz5318H5BQeopH1uTXSFrHdfPaCf8TnnSoMZ7trisuGfgWsQBrg2Q+vUrhR02gL2rwLUaozBJ5qAamcjY51JeRloabXAiPWcJCxLqsrwzWYjLkPE+UyI7u6qy8gVm/baAdVzV+xgYkHD7obKA9sHaaSYLFQi0K4W6+t+5r3bN8R0EBstsFLrWX2RPhib1Fpz3AUarGUTo77DDjAhSiLi1TofTxJQzZV3qyxdjDrXGQ2+VPCbqXx/gTLF6o59E8GrV2kl8pbDrrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bootlin.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=Fu6+K686Dt5XCNF6lBu7lrGF24EzmvRoVMOApH89cAg=; b=KcyURGzFIu3jhKpN8jfWuiCcSDky8Q3yuiv6tzdx5/yCusfERiQEpsqExTk/s+zXdIZynz/7NYM8HWU09APaaTqGeDMV1Mocy4YkLuKN0fne11AV5Gn6KIeRwyDpN3/+wBhFVH+VbMnODNc8db4Nd4rVHOmQiQELW4uPLd3HsQU= Received: from SA1PR04CA0009.namprd04.prod.outlook.com (2603:10b6:806:2ce::25) by SJ2PR12MB9211.namprd12.prod.outlook.com (2603:10b6:a03:55e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Tue, 6 Aug 2024 07:59:16 +0000 Received: from SN1PEPF0002BA4E.namprd03.prod.outlook.com (2603:10b6:806:2ce:cafe::1a) by SA1PR04CA0009.outlook.office365.com (2603:10b6:806:2ce::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.23 via Frontend Transport; Tue, 6 Aug 2024 07:59:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002BA4E.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Tue, 6 Aug 2024 07:59:16 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 6 Aug 2024 02:59:13 -0500 From: Shyam Sundar S K To: Alexandre Belloni , Jarkko Nikula CC: Guruvendra Punugupati , Krishnamoorthi M , , , Shyam Sundar S K Subject: [PATCH v3 4/5] i3c: mipi-i3c-hci: Add a quirk to set timing parameters Date: Tue, 6 Aug 2024 13:28:42 +0530 Message-ID: <20240806075843.277969-5-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240806075843.277969-1-Shyam-sundar.S-k@amd.com> References: <20240806075843.277969-1-Shyam-sundar.S-k@amd.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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4E:EE_|SJ2PR12MB9211:EE_ X-MS-Office365-Filtering-Correlation-Id: 60d66725-0736-41d2-d650-08dcb5edab03 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?tvVCvjxkyUF1bAj4V6jkkWJherKErA+dDeFj98/sD0MJz0Q5FpWj0QqSuNx8?= =?us-ascii?Q?lx9ZbLxb6M4d2F+vsn0nIQtlp+p9KcYB0OkGpkjWiL/Io5/3FhjHpMn3HHDM?= =?us-ascii?Q?5W7sE3M25AcABQpCNRY/q9ya8Vd6HwrB5OgoQSURau3Vl67KqUZOxIW0YeIx?= =?us-ascii?Q?uZ23Cx0FByg796uHZANh7skpWchhCKk08/yqWyLGz99jH54kKOmat512w3Sf?= =?us-ascii?Q?1Fr1S23c8RFZ4AEnhhNpXD6SBiMX9bCWvxuqDj4tRARbSrBcwlRFiZAJmCze?= =?us-ascii?Q?2q+UsubPxMJP3xK3NJbtZvNJUJ0EHRaLbBVv7gHfFLwsr1rlmRMvKsNSr+VA?= =?us-ascii?Q?mbMF3tV91oxrWIXKegd+imr+pyHWHdfMdyJVlkq8XdqrZj8AWygVX5peMto5?= =?us-ascii?Q?6e6UEvguJrXVuqomwqvQbBbv+SlGoCOPlj/ivR7wOQRJNnSpVBozF8CK+vgS?= =?us-ascii?Q?HTvNt6ZSzas/Q/c/lCnl5DIYvYqr7yNLL5h5jeln/SxQ1zGmIihrR+/MSCvx?= =?us-ascii?Q?ef7jX97YCc+K9tSoEg3CWQ9SpN/AkLzNnFBdkzEiQUfRwGqDcvck9PP8gGOY?= =?us-ascii?Q?WBEuE05N9unz4ByvcqyQTs16XwW5uJ2cHDaAMXUyOx/8e68djSfKD4VXkkdE?= =?us-ascii?Q?pknUTJVrKPe734EeZPjlt5ER/CnSfkrqYXBOx430b0slwmG+kac0RhKZsGOI?= =?us-ascii?Q?nv+r5TcT5g1XvLVEQ1nC+jwgF/qNTPOAGSITjRQrUCLitNXjhULJLvA57eg/?= =?us-ascii?Q?HWipfjP+bpFGIz28UMBeAVyePi6OdN34y4BQu2WJ1Q1IYQoHi8ft184ifkQj?= =?us-ascii?Q?SqBzgGctcX93KVuDLsdVDqKjo7gNhcDgEa4WA8nGi1tp20yA3C45ZM6bWo5E?= =?us-ascii?Q?zvRUU1gic/FRTqKljd86j/tB1MQ7iyn/eqkOJ1nadOvPchWk96FcpFHkmMTT?= =?us-ascii?Q?FYCKDYBwMPjUT6AFGEEQ9/Alr54G0D/SEfWe3vHJkOBCRDI3g92HZCUPjIdN?= =?us-ascii?Q?BAngDF5fwMXDNPfmiVdjwaNBU/1a0T/zEbXfQNG9NrzEVMUyjPrrRuRYMqGo?= =?us-ascii?Q?924dFFaczrIOGeYtN5Ugpv/xHOXaPsE4/rRNDHr1Vrx75RHhMvzwG2FhWD7Y?= =?us-ascii?Q?dZVMwd2W6TPyLPRCoWEl+k4BnLMbDFJZk4FGFBivfxsfSGhJ4/e1/m3Gj8e1?= =?us-ascii?Q?APCd3yPIhEGXokMgZArpAvrwcUzbzP/zE1gbO86h1wT4kzGQKWdc8DNTyx60?= =?us-ascii?Q?FHjVcM+VHcBZwHM6B5EuJrJptvI20RNVJerO7S/LDBaqH1I8mDOkVKwCDeOB?= =?us-ascii?Q?nk3HrQIe12WrD0lwgqa+7IgFWYfWiyq2Ci5gBXDZgv/s0aUD3hJcA1nkEOnb?= =?us-ascii?Q?neOKuW02zGfLJC5QV55mxbUn0TwItXSratL9dPC2k4uS6dO9ztS+mNaPynqe?= =?us-ascii?Q?iB+I60tn1SnKI7v1HNdzACutD9ce1T2R?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 07:59:16.0018 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60d66725-0736-41d2-d650-08dcb5edab03 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA4E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9211 Content-Type: text/plain; charset="utf-8" The AMD HCI controller is currently unstable at 12.5 MHz. To address this, a quirk is added to configure the clock rate to 9 MHz as a workaround, with proportional adjustments to the Open-Drain (OD) and Push-Pull (PP) values. Co-developed-by: Guruvendra Punugupati Signed-off-by: Guruvendra Punugupati Signed-off-by: Shyam Sundar S K --- drivers/i3c/master/mipi-i3c-hci/core.c | 4 ++++ drivers/i3c/master/mipi-i3c-hci/hci.h | 2 ++ drivers/i3c/master/mipi-i3c-hci/hci_quirks.c | 25 +++++++++++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mi= pi-i3c-hci/core.c index 5c4fcb740856..baec2c42e0e0 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -791,6 +791,10 @@ static int i3c_hci_init(struct i3c_hci *hci) return ret; } =20 + /* Configure OD and PP timings for AMD platforms */ + if (hci->quirks & HCI_QUIRK_OD_PP_TIMING) + amd_set_od_pp_timing(hci); + return 0; } =20 diff --git a/drivers/i3c/master/mipi-i3c-hci/hci.h b/drivers/i3c/master/mip= i-i3c-hci/hci.h index 2b7560149520..e1a65cfb43c8 100644 --- a/drivers/i3c/master/mipi-i3c-hci/hci.h +++ b/drivers/i3c/master/mipi-i3c-hci/hci.h @@ -141,6 +141,7 @@ struct i3c_hci_dev_data { /* list of quirks */ #define HCI_QUIRK_RAW_CCC BIT(1) /* CCC framing must be explicit */ #define HCI_QUIRK_PIO_MODE BIT(2) /* Set PIO mode for AMD platforms */ +#define HCI_QUIRK_OD_PP_TIMING BIT(3) /* Set OD and PP timings for AMD p= latforms */ =20 =20 /* global functions */ @@ -149,5 +150,6 @@ void mipi_i3c_hci_pio_reset(struct i3c_hci *hci); void mipi_i3c_hci_dct_index_reset(struct i3c_hci *hci); =20 void amd_i3c_hci_quirks_init(struct i3c_hci *hci); +void amd_set_od_pp_timing(struct i3c_hci *hci); =20 #endif diff --git a/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c b/drivers/i3c/mas= ter/mipi-i3c-hci/hci_quirks.c index 8a8fbd697175..a222bfab0676 100644 --- a/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c +++ b/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c @@ -11,10 +11,33 @@ #include #include "hci.h" =20 +/* Timing registers */ +#define HCI_SCL_I3C_OD_TIMING 0x214 +#define HCI_SCL_I3C_PP_TIMING 0x218 +#define HCI_SDA_HOLD_SWITCH_DLY_TIMING 0x230 + +/* Timing values to configure 9MHz frequency */ +#define AMD_SCL_I3C_OD_TIMING 0x00cf00cf +#define AMD_SCL_I3C_PP_TIMING 0x00160016 + void amd_i3c_hci_quirks_init(struct i3c_hci *hci) { #if defined(CONFIG_X86) - if (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_AMD) + if (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_AMD) { hci->quirks |=3D HCI_QUIRK_PIO_MODE; + hci->quirks |=3D HCI_QUIRK_OD_PP_TIMING; + } #endif } + +void amd_set_od_pp_timing(struct i3c_hci *hci) +{ + u32 data; + + reg_write(HCI_SCL_I3C_OD_TIMING, AMD_SCL_I3C_OD_TIMING); + reg_write(HCI_SCL_I3C_PP_TIMING, AMD_SCL_I3C_PP_TIMING); + data =3D reg_read(HCI_SDA_HOLD_SWITCH_DLY_TIMING); + /* Configure maximum TX hold time */ + data |=3D W0_MASK(18, 16); + reg_write(HCI_SDA_HOLD_SWITCH_DLY_TIMING, data); +} --=20 2.25.1 From nobody Mon Feb 9 02:58:51 2026 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2065.outbound.protection.outlook.com [40.107.236.65]) (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 C0F291BDA93 for ; Tue, 6 Aug 2024 07:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931167; cv=fail; b=JRuukzXnXK/bN7egcFD9a6GstY08lwmP+5cqRjtMmYnsEoOWVBinuW9H9t+a+NH/cyGPYp5TrFRkWsOqyLA7BLTxuZrURyJP37LG78MQhKv6LhxDv4RmPhA/UxbaWPEPq3qMP2jSkqknLBt0se44Qvx0RVGh74lMqR+r9ypXwiA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722931167; c=relaxed/simple; bh=xcDCWcMfpXkk9wQkD0vwkTGIINqPkF31a1KH8yeZMRQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oVt8ucr8Yb71/1H59u35XkJJzM8OZgBx7S25jnysPAQYTyD2z6pgrtVklqKg0ogoDLHt2kER0vR6WsaGDdPYIBqJTPq7Ek46N7JJBi9mbmWFm+yqKiTspuJtpau6HZQTtn3q451dq7SlYGzelKtHEenyA0UxWI3Dw7b9BL+txPw= 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=BNZTqeVs; arc=fail smtp.client-ip=40.107.236.65 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="BNZTqeVs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yDRDjECauwaVln+sMuYrtyy+w3Cqro5Mp2VvAhADFGPbZcmgxCtgl+EQugxSxCmwpevZldBQcpONYsRU+22ZdyGWf3MTeu+O8ZSx6WQhkiGP2ps3HLVuVmb7sUGZkb9QHyYw0anEjPiKEV9okj5mkSM0Z+oibt9qUOSjIr7BtW2bvQIwDHXORTw7Ld0Y8JznZdW56lfJA4LjQC+K7hvSXSbhgs2mW3vrs4b02Qh9TVS77jCCJ1ILEKEs15nz9zDah0zVucXJWQ3xO3ippSP5eU6xvIy946Zzli9yCyaDneF6AxqXLFfQrN7pl3lw4ii6kzRhrzpT2Yw8dxxNalC8gw== 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=B+MpG3FQ6f6K1sK65Q3xCvKHWgQD8wi90mDlKI+icwk=; b=QqGe201aqsan39XNJMxNIbNaRvFnwPVf/O0qsK3KCIQDGj9InsvRxZa9Q4GNghCsqo7EhVMXZeggpVzbZ73bW9ri0YXnNhSwvQdKvYG6i+nVFsLBv1T9OwZ2i3qVNR+wbuTwXQaaxGJruL+uAECFh3chQvBf6UZSXFt8PXJADSS1QEdomS48qHNntZdFNO0ibh36AXfv/y4Xk78YpVIZSc7h38UzDXkpOSrGqxTZpkL6n2BWM9/yKZgXWVImrt3AgTCoGKo6FDqsXXpQuyfbSVhqM78vbwC5T9CGTxdGNrHV+m2wm6FiFKjGIQM9Rxtrgz/4RRvV7xwh0iPqOWTpew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bootlin.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=B+MpG3FQ6f6K1sK65Q3xCvKHWgQD8wi90mDlKI+icwk=; b=BNZTqeVsMNRrYqsumjenkxQ7q64aobJwTTGgC7B/eHS0m7TZt9dibyXVIEcY3g/jiCDYtxtucYp3th+un0n0gT2TaTELa6GAouXJ3vP3VtuS6u7C9HibG5zm7nCRvTKIIGfJrqJxUrWkx4AHBIS/x6D/6u1tOSsNkto9dagipqI= Received: from PH7PR03CA0001.namprd03.prod.outlook.com (2603:10b6:510:339::26) by CH2PR12MB4053.namprd12.prod.outlook.com (2603:10b6:610:7c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.27; Tue, 6 Aug 2024 07:59:20 +0000 Received: from SN1PEPF0002BA4C.namprd03.prod.outlook.com (2603:10b6:510:339::4) by PH7PR03CA0001.outlook.office365.com (2603:10b6:510:339::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.27 via Frontend Transport; Tue, 6 Aug 2024 07:59:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002BA4C.mail.protection.outlook.com (10.167.242.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Tue, 6 Aug 2024 07:59:20 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 6 Aug 2024 02:59:15 -0500 From: Shyam Sundar S K To: Alexandre Belloni , Jarkko Nikula CC: Guruvendra Punugupati , Krishnamoorthi M , , , Shyam Sundar S K Subject: [PATCH v3 5/5] i3c: mipi-i3c-hci: Add a quirk to set Response buffer threshold Date: Tue, 6 Aug 2024 13:28:43 +0530 Message-ID: <20240806075843.277969-6-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240806075843.277969-1-Shyam-sundar.S-k@amd.com> References: <20240806075843.277969-1-Shyam-sundar.S-k@amd.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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4C:EE_|CH2PR12MB4053:EE_ X-MS-Office365-Filtering-Correlation-Id: 48b494f7-04d8-46ce-cc11-08dcb5edad8b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?kiaUt6MqE7x6OHy2j8tEYASPE5SjMzbVFxI9XmFD1TzX/XiLMCOMA3VsuPf4?= =?us-ascii?Q?ZkfNgjFz81qJVDegMvTX1K7n9fD7gw5IM9rlf6NSSSZIPpe8sAY1mdBfP8Z5?= =?us-ascii?Q?Gxil+9/hMAKykHxLT+6dLipXSVs6Cu7aXCPXFdA1Qq+f5VJEPX+GV1BOFL4c?= =?us-ascii?Q?cgBHz3nwWGgN9Co/F7DzhLFA0P8wqxxdZcRaCbQDtK+5W8TLsK1uPQ2Lq82F?= =?us-ascii?Q?cvmOWHGtxh5OwwYDTIdJnrn03kw4YGywVmQqZwyn28tyyyAjrjpT0r/9mOg3?= =?us-ascii?Q?KTSsf+Ghv3wMfF7ZuutxjhETuvcuy4LGLWg7YPV9hbbWRwp5Mm2LqYldW5RC?= =?us-ascii?Q?VkvX0glJCT0fVuUxhZf7P2Px/308AsLBpC7eM5ZaotwiWqrOzk4Yhv0GYzzQ?= =?us-ascii?Q?lQtJg02HZyNnvjdwTEaoHneXQXjNrDAprXwmQf4ckKTcL2Q7CjDyoVdMGUxD?= =?us-ascii?Q?i5ZaUhm/+ldLtwabSte29Bbut6H8ptyd/rUUvaHUegRQJRwWYze3/DfTL+JR?= =?us-ascii?Q?VrdhmFbEVpc2aG2LCYwdQtxCUPysYYCfpcT2IQKX3iZFV5gFRSWp5DfmFSvx?= =?us-ascii?Q?IF4N6LXzcQ8qGFNHiyrjdGGxl2xjZVAq7Lwxkl+UeAJQP6H8gy2+Ku8s1h4P?= =?us-ascii?Q?A0umtE5XlUu1YE3DY2Zj5EXNHR0ux4KTcoeOgd5K25dAIvquvvopYeWKLCbw?= =?us-ascii?Q?3Ntc1AJ2cd6hp4i4I1iutahBHyXNYZkyMFJ8Bu9rYyOO4+zdwft9DvJF7lR+?= =?us-ascii?Q?FTwzCzwolFo5Rr0PZHDOIGKIOQPxsQbwZmQ0Pjwdj2nQu9jhgoreqUrwB8Zb?= =?us-ascii?Q?qHUBw2sUQvmIWa9VLetgZ9983pw0HXsKzChQXUgZng/sZJULKmH9FdNeMZ11?= =?us-ascii?Q?QA7xZ7fKNNxUH9cchhkhecWvR7xtfN6ejgfcXpkgLGv9VTm3GFxAPLURIauH?= =?us-ascii?Q?Xm2DEDD8Dw/zdNVg2UNvR91Zw1uJ3ezNjpOV+XpgiyE8USzjYvb9tYpspJMO?= =?us-ascii?Q?n4S1wK8SejRSFiz75clRYi1B3YeGhwxNeJ9jyUicCwnMeah6gbIVWojLR9Qw?= =?us-ascii?Q?NamqL4CBPDtXjNyodxh4hTpl959beZy6m4QXZTbf98jBy0BFqNP03w0yDSlI?= =?us-ascii?Q?D/zKpceoNZTUEwszsYtIbsjwx/Kc1VT4hzPijyK8NtFJ+R0BqlUmCljxMzmR?= =?us-ascii?Q?OWuy8q2dn9jfuZJ7ZBozRegzKprIy/iD69yCXSd5TpKTyYb1sExsGiEXjoP7?= =?us-ascii?Q?N8Ad/IuV0OXfm/cOxYVKK8tbjbckuYa8wZbkQr2P3TcaahpLSY/MYFTOLf+V?= =?us-ascii?Q?KYNOMm2G/fUM5lxjBA8bK23wzWSMPQJ9tBh7NvLHeTX5TqnpzchnsvTfN6Np?= =?us-ascii?Q?rPJIKtwcMkd5ebfQB2g0tjyzx1O6Egs8lv6KUaoRKohtHjpPGBczDi9Jo3z5?= =?us-ascii?Q?FmVqWNAQk00KH26jGRkv2uOwq8AojIJF?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 07:59:20.2483 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 48b494f7-04d8-46ce-cc11-08dcb5edad8b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA4C.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4053 Content-Type: text/plain; charset="utf-8" The current driver sets the response buffer threshold value to 1 (N+1, 2 DWORDS) in the QUEUE THRESHOLD register. However, the AMD I3C controller only generates interrupts when the response buffer threshold value is set to 0 (1 DWORD). Therefore, a quirk is added to set the response buffer threshold value to 0. Co-developed-by: Krishnamoorthi M Signed-off-by: Krishnamoorthi M Co-developed-by: Guruvendra Punugupati Signed-off-by: Guruvendra Punugupati Signed-off-by: Shyam Sundar S K --- drivers/i3c/master/mipi-i3c-hci/core.c | 4 ++++ drivers/i3c/master/mipi-i3c-hci/hci.h | 2 ++ drivers/i3c/master/mipi-i3c-hci/hci_quirks.c | 12 ++++++++++++ 3 files changed, 18 insertions(+) diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mi= pi-i3c-hci/core.c index baec2c42e0e0..248f07f41c16 100644 --- a/drivers/i3c/master/mipi-i3c-hci/core.c +++ b/drivers/i3c/master/mipi-i3c-hci/core.c @@ -147,6 +147,10 @@ static int i3c_hci_bus_init(struct i3c_master_controll= er *m) if (ret) return ret; =20 + /* Set RESP_BUF_THLD to 0(n) to get 1(n+1) response */ + if (hci->quirks & HCI_QUIRK_RESP_BUF_THLD) + amd_set_resp_buf_thld(hci); + reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE); DBG("HC_CONTROL =3D %#x", reg_read(HC_CONTROL)); =20 diff --git a/drivers/i3c/master/mipi-i3c-hci/hci.h b/drivers/i3c/master/mip= i-i3c-hci/hci.h index e1a65cfb43c8..b6f1b97f9e04 100644 --- a/drivers/i3c/master/mipi-i3c-hci/hci.h +++ b/drivers/i3c/master/mipi-i3c-hci/hci.h @@ -142,6 +142,7 @@ struct i3c_hci_dev_data { #define HCI_QUIRK_RAW_CCC BIT(1) /* CCC framing must be explicit */ #define HCI_QUIRK_PIO_MODE BIT(2) /* Set PIO mode for AMD platforms */ #define HCI_QUIRK_OD_PP_TIMING BIT(3) /* Set OD and PP timings for AMD p= latforms */ +#define HCI_QUIRK_RESP_BUF_THLD BIT(4) /* Set resp buf thld to 0 for AMD= platforms */ =20 =20 /* global functions */ @@ -151,5 +152,6 @@ void mipi_i3c_hci_dct_index_reset(struct i3c_hci *hci); =20 void amd_i3c_hci_quirks_init(struct i3c_hci *hci); void amd_set_od_pp_timing(struct i3c_hci *hci); +void amd_set_resp_buf_thld(struct i3c_hci *hci); =20 #endif diff --git a/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c b/drivers/i3c/mas= ter/mipi-i3c-hci/hci_quirks.c index a222bfab0676..43210882ec4d 100644 --- a/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c +++ b/drivers/i3c/master/mipi-i3c-hci/hci_quirks.c @@ -20,12 +20,15 @@ #define AMD_SCL_I3C_OD_TIMING 0x00cf00cf #define AMD_SCL_I3C_PP_TIMING 0x00160016 =20 +#define QUEUE_THLD_CTRL 0xD0 + void amd_i3c_hci_quirks_init(struct i3c_hci *hci) { #if defined(CONFIG_X86) if (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_AMD) { hci->quirks |=3D HCI_QUIRK_PIO_MODE; hci->quirks |=3D HCI_QUIRK_OD_PP_TIMING; + hci->quirks |=3D HCI_QUIRK_RESP_BUF_THLD; } #endif } @@ -41,3 +44,12 @@ void amd_set_od_pp_timing(struct i3c_hci *hci) data |=3D W0_MASK(18, 16); reg_write(HCI_SDA_HOLD_SWITCH_DLY_TIMING, data); } + +void amd_set_resp_buf_thld(struct i3c_hci *hci) +{ + u32 data; + + data =3D reg_read(QUEUE_THLD_CTRL); + data =3D data & ~W0_MASK(15, 8); + reg_write(QUEUE_THLD_CTRL, data); +} --=20 2.25.1