Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp14916rdh; Tue, 6 Feb 2024 17:15:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6fkqSzby1hng7sUX60LAlfaeh6sYgwN/eaKxufMdG55SCitDQxLGms4y4agE6vwKK0Z6g X-Received: by 2002:a05:6a20:841c:b0:19e:29c2:f8db with SMTP id c28-20020a056a20841c00b0019e29c2f8dbmr2870539pzd.47.1707268546684; Tue, 06 Feb 2024 17:15:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707268546; cv=pass; d=google.com; s=arc-20160816; b=dG5+Q6K+4anySibtdZrb889kKSr0IKyetoNrqndTAId0n+Re9t63Q3Ima5Hg56Ly7L k3m14d6nwv8YnKyY/i+kmVpHH2gweA2XkIUBvLtz5ulM3gQ9N8ecbqg93y3Mn1n2Jcra Xcg+zZosCyCWQ8ZrhIo78TBNH/NjFt6fpyBh7fJRHfgqRHmti2QwknamgwdgEuoU5C2L swQiW0x8uFQIeWd6HfoIcNazEH8BD10OB+PvImtbUzfJxkMt6H8eyjMx05KtrZAGYxs4 S8MIJU71ERQsSNATPO6LSYEdXed0vF9MkRD+RWCZvUKvaDM0PdCuZPixD3lIpvi7w6Mv Q8bQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mR83B5voDb5d+02ZNHP5nZeXRuP4J2lPClTfUNn3ry8=; fh=dURrTbPBxhgFQ+Zmd5qakl0D+P8A3bzQnt2mD0IHD+c=; b=brP0ZxAI1wqEi/TW8YFeuAuEabYy+y+LVnJaAkJL10F+2kiSB22RarUPgVOSGUL2Zf u1nVxp13PE1L5P4rlypt8JPLI3NtSRTRCCesstRXuu2dEHmTwqe9GxmdzWNII+bDjz7w rM+LoYPuT2neX9c/A8AgIoiVhX4lFlwA+bpmf/LL87/+tUKnO2LGtNo/c9Cu0BYXyJyd xKT16r+WJYhvXtsq6f1Uep4UGObUpZPDbvRPtF43RMlBcilOn2stR0kPzdsaLxYjrAj9 C+VRYH043V2/sXSyU+isnfyKZDNPJ4XeH8XSDt/VOmQYo5ly+kLgZEBV5QnzrjsJ9uus Yosg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JhsS2UaR; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-55780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=2; AJvYcCWqgRFAEENKQ0l7Z42lehQSN2DgyP/TivnjY2vMZiAKEvxiyMBOOgAHdZvh2lOLn4yVNVv/hEZmFJ+i2hRMUCiPalf4ej2oYVFPRDVQpg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o15-20020a17090a744f00b00295b5d5c91csi2066818pjk.137.2024.02.06.17.15.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 17:15:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JhsS2UaR; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-55780-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B3A63B24206 for ; Wed, 7 Feb 2024 01:15:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFF31D528; Wed, 7 Feb 2024 01:15:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="JhsS2UaR" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 4E5E08F6A; Wed, 7 Feb 2024 01:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707268525; cv=none; b=IjH9L75XsMPwWHnw2gMCjGokpN3PQ9Hfdu63nNphR+RyJfyzM+uScQscrYT3FYAKPizYgaJCzK7HLhc/X1GBi7aGCmMso4RkDI2tkFkd1X7deZ+tko22zkUFpBklbwDw2muOXZ1FpemOP3CUdhG5oLROJWizfl7hhGmSrzoz1hM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707268525; c=relaxed/simple; bh=/2zRx6WEiyhPw79//cAwPxGnjGR3xBJXUGQqMX9Ma2g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PMRYUP1Nhd0fG+TC/dH1XtFdht7S8r9iMhcb3Siy1foPuhVZh6SBQq+c9wX6J1Z0VIjerBTfqSJlITh8B5sC9vVTZcB2955y1w8u7OkYI9kHg8dmjpCmH8e/gbMKxU86UqTOviaeZI/Q2uFQaTr0AvgdEz5VXk3zZQMg7+MQPx4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=JhsS2UaR; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4171FLEk053897; Tue, 6 Feb 2024 19:15:21 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707268521; bh=mR83B5voDb5d+02ZNHP5nZeXRuP4J2lPClTfUNn3ry8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=JhsS2UaR/rr6MROP9T4MQTa+k2TXs7X/JwwjfCUBHPGZN07KdQSXJw5sLK2JOhtPj DQHZNG+CPRk0rUAD6V7cGxLnRrHLFnFNnSuQRoaCDCb0bcoD9f2ZBuc1A5r1V5mGfW C9gCX1SL8rCYDfg8fjz95NOMJmhZbGdSgsmfpVwk= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4171FKLh109421 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Feb 2024 19:15:20 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 6 Feb 2024 19:15:20 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 6 Feb 2024 19:15:20 -0600 Received: from judy-hp.dhcp.ti.com (judy-hp.dhcp.ti.com [128.247.81.105]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4171FKMu122103; Tue, 6 Feb 2024 19:15:20 -0600 From: Judith Mendez To: Ulf Hansson CC: Adrian Hunter , , Subject: [PATCH v2 6/7] mmc: sdhci_am654: Add ITAPDLYSEL in sdhci_j721e_4bit_set_clock Date: Tue, 6 Feb 2024 19:15:19 -0600 Message-ID: <20240207011520.3128382-7-jm@ti.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207011520.3128382-1-jm@ti.com> References: <20240207011520.3128382-1-jm@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Add ITAPDLYSEL to sdhci_j721e_4bit_set_clock function. This allows to set the correct ITAPDLY for timings that do not carry out tuning. Fixes: 1accbced1c32 ("mmc: sdhci_am654: Add Support for 4 bit IP on J721E") Signed-off-by: Judith Mendez --- drivers/mmc/host/sdhci_am654.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 3755a015f328..f98cce69a286 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -320,6 +320,7 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, unsigned char timing = host->mmc->ios.timing; u32 otap_del_sel; u32 itap_del_ena; + u32 itap_del_sel; u32 mask, val; /* Setup Output TAP delay */ @@ -329,12 +330,18 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, val = (0x1 << OTAPDLYENA_SHIFT) | (otap_del_sel << OTAPDLYSEL_SHIFT); + /* Setup Input TAP delay */ itap_del_ena = sdhci_am654->itap_del_ena[timing]; + itap_del_sel = sdhci_am654->itap_del_sel[timing]; - mask |= ITAPDLYENA_MASK; - val |= (itap_del_ena << ITAPDLYENA_SHIFT); + mask |= ITAPDLYENA_MASK | ITAPDLYSEL_MASK; + val |= (itap_del_ena << ITAPDLYENA_SHIFT) | + (itap_del_sel << ITAPDLYSEL_SHIFT); + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, + 1 << ITAPCHGWIN_SHIFT); regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val); + regmap_update_bits(sdhci_am654->base, PHY_CTRL4, ITAPCHGWIN_MASK, 0); regmap_update_bits(sdhci_am654->base, PHY_CTRL5, CLKBUFSEL_MASK, sdhci_am654->clkbuf_sel); -- 2.43.0