Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp406408pxh; Tue, 9 Nov 2021 12:39:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4fatWYVhe8axfBOByd1QIzuer0g4kHnBJ3aFH+/wsUmZwocjbcMGRWoUfC5aKVViEvy93 X-Received: by 2002:a05:6402:1e8e:: with SMTP id f14mr14019959edf.250.1636490357631; Tue, 09 Nov 2021 12:39:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636490357; cv=none; d=google.com; s=arc-20160816; b=dPWsbDLCCpGqpQqJImWjG/f4R1sxTpLUhgcgYar6ssRgTWXnYcKcWkv/ASsk2G1o/y V0vA4q929XJWCGIxI1obSzj3+M2gywm63H6gabPwRdB3t+P4VbVIbNX1DToyn1S8BXbf dcdxW53pM3Zju9bk2MgNbFXu5cS0H9oP2F9pdrhDS0YX9giIu3bJ/jhB9SSTpFkaiOXa 5nbtzKzbV/WwNf35FJGXBnwFXxqKtW9OXIRWfKqarEkuvfP4K5t2QP6tG4XAADwJKNeY RxMTC95N6jP7TxTcu6lK+Qx0A6B1FPUqVs7gUOIp/n27dIlsglu4Evp6aDpWwZ9BN56L +yJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=1r+tDK+Qnh3XkoVRwTQe1/DCmIkBRf9pHrspFklDjhc=; b=rOk6toCV1QWk6nrQLeqZ/1urYxNIlWvNBlxzsJBlZoB0OU7qltKkBCtFsMHCWJFa77 pCQ9PMwHAFS2MC3Rzo4/Z+oIDv85O4RmoLvZp+z0b6SqBSQm+9oShrCtVP+O6vmVeTCJ ZLbpWyKZt/m2vnPUGNKubgcQlX0qtECWzUqvMArq1ZV4ioXHxtNlNyolYIYk5uhgqk1/ +5R8hzAx3yFxCQxLQk1HAGzdJUOc33buKpAAp6spL9Z1cW+kxOLN/vSM14rSZu8uY9xn Qa4Aw+vHPj5DdtdZpLUZhd8HKN00YC5Y38lAqgRKMzt/MkbiOIqexJNDQW2FqT7MvtgC rp3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si39856672edd.600.2021.11.09.12.38.50; Tue, 09 Nov 2021 12:39:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245376AbhKIKit (ORCPT + 99 others); Tue, 9 Nov 2021 05:38:49 -0500 Received: from mga03.intel.com ([134.134.136.65]:4311 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245372AbhKIKio (ORCPT ); Tue, 9 Nov 2021 05:38:44 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10162"; a="232368055" X-IronPort-AV: E=Sophos;i="5.87,220,1631602800"; d="scan'208";a="232368055" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2021 02:35:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,220,1631602800"; d="scan'208";a="503453998" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga008.jf.intel.com with ESMTP; 09 Nov 2021 02:35:56 -0800 From: lakshmi.sowjanya.d@intel.com To: linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org, wsa@kernel.org, jarkko.nikula@linux.intel.com, bala.senthil@intel.com, pandith.n@intel.com, lakshmi.sowjanya.d@intel.com Subject: [PATCH v1 2/2] i2c: designware-pci: Set ideal timing parameters for Elkhart Lake PSE Date: Tue, 9 Nov 2021 16:05:52 +0530 Message-Id: <20211109103552.18677-2-lakshmi.sowjanya.d@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211109103552.18677-1-lakshmi.sowjanya.d@intel.com> References: <20211109103552.18677-1-lakshmi.sowjanya.d@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lakshmi Sowjanya D Set optimal HCNT, LCNT and hold time values for all the speeds supported in Intel Programmable Service Engine I2C controller in Intel Elkhart Lake. Signed-off-by: Lakshmi Sowjanya D --- drivers/i2c/busses/i2c-designware-pcidrv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 174938fc7a7e..3418148f8bb5 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -84,6 +84,19 @@ static struct dw_scl_sda_cfg hsw_config = { .sda_hold = 0x9, }; +/* Elkhart Lake HCNT/LCNT/SDA hold time */ +static struct dw_scl_sda_cfg ehl_config = { + .ss_hcnt = 0x190, + .fs_hcnt = 0x4E, + .fp_hcnt = 0x1A, + .hs_hcnt = 0x1F, + .ss_lcnt = 0x1d6, + .fs_lcnt = 0x96, + .fp_lcnt = 0x32, + .hs_lcnt = 0x36, + .sda_hold = 0x1E, +}; + /* NAVI-AMD HCNT/LCNT/SDA hold time */ static struct dw_scl_sda_cfg navi_amd_config = { .ss_hcnt = 0x1ae, @@ -200,6 +213,7 @@ static struct dw_pci_controller dw_pci_controllers[] = { }, [elkhartlake] = { .bus_num = -1, + .scl_sda_cfg = &ehl_config, .get_clk_rate_khz = ehl_get_clk_rate_khz, }, [navi_amd] = { -- 2.17.1