Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1357957rdb; Tue, 30 Jan 2024 16:40:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4KRIuBkOK5qgU2eDdFCaaCIq6gU2b6tavvQ0ybwrOI/cFN/xQ4HuMgZPwabUrvdHkiSTU X-Received: by 2002:a17:906:f296:b0:a30:e4d8:2e46 with SMTP id gu22-20020a170906f29600b00a30e4d82e46mr28475ejb.20.1706661620684; Tue, 30 Jan 2024 16:40:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706661620; cv=pass; d=google.com; s=arc-20160816; b=tN/i8uo4cyrVI1dfyRPXcTXnFnc+J83qhvLI+BCWSiqts+okJY/VuUCvvl9+3ZTPmM z7LFV4x3YYQh2eQ2pAocBMt25XGDtFMQGs651tSviftVwjY/3gimKtPfndai6Sk9Dd11 y7urBYcxtcP5KBSOlq4GUE/LKpwNfirrTmHL111gmLbc2/qMub6twoUuH2mbhNxF6UIy pJkqDPUTsKRsEwSz9Te1B6ck08TQjae1KIaUt3ccpdPD2aOfWeV9ME8TFOwUOreD5zfc JgHBYW7b+p6tkRFX8P5jhFFM9T1rLGi/EM67hFK2bQVocvqX4YoSkj7UzoPcVfQRomn9 I+MA== 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=QWigbctVlzjkxsBbZQ1Y47XS9owR9Y5JqOgjf+q4VGI=; fh=8TCykkePj/FazsgBCcRH+g6jSnREIO7InJeCIFaLkgQ=; b=r59FBdCbfAU9n0dTQVCjHmZqaARKabkLxOYmWIe/Tn9Yu7FF5cXVb4TWXkPEN58VG5 gkV9bKM3LHtH8mWWJU5WMPtyYVMSqVV9LFgnQRvkHEDpm1fvFcN/c+oZKFehBKMeQHEy gy/4zmVYaSiDw14aZKZAkB282wNv4wPWvjFeAoeukeaiRgSj3kie3qi7jUoMO32YlNIL nCZpcAlwvP0etWrdqzZ2toCbakor2eURc/Bzi+Cwx9WOq2dZthGrmCYvt0fnwE+b4mDQ GZAOnTIXA+ZRWI5s2bXWcVANE1tWrDntC4V12ESMoxcvSPM/iv6fQP56AIbGoQP29HMf 1e6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Kr591s/Y"; 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-45533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=1; AJvYcCX0lEm75IXNkVyfvLte+5xiCn6a/2t0w2RbNTlIX2d+uwTpamH92uJlvC8ganPt8bzpVz09Lse6HHY4UdzOoeDPZN/LmVuQDBRfe0KV4g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id rh24-20020a17090720f800b00a35dce64af7si2064745ejb.211.2024.01.30.16.40.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 16:40:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Kr591s/Y"; 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-45533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45533-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6528A1F26765 for ; Wed, 31 Jan 2024 00:40:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F92F1EEF9; Wed, 31 Jan 2024 00:37:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Kr591s/Y" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 802C123A3; Wed, 31 Jan 2024 00:37:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706661446; cv=none; b=uSdemH2FvOv2/VRSTM6EiD9vps3Btx3dePoVRB61UCgmBCHFvfQNLUtrQ7IpcTuxlVBugqiU4IuWTTLPmprTicoulTlA2hQXHsWKkUZmq3LmeTNjSD6qTEmnXfyEuR1VWEmbA87TKF1n1S8d7EBgI180WvlNQfYxeJWZOhLsXuk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706661446; c=relaxed/simple; bh=BOIMfpJd4wjoTPa05l1nYj4kGi90/ceQ2kjZ91/SPNc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Xth93IyuNTsge4h98FMXEe6Nt8lUOeaU0VaKH8gIysu65HtDsVY5NaLN7YsX0OcrsJgddwO3S292XOGuNOcKbhYsNz2x37f6AyEy5NwONH4Fq6q3vGTmmZny01YVFW4HY/IetOcdI3J2CDYuO/J0gXPbxub8nSJR2pGQX4au7CE= 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=Kr591s/Y; arc=none smtp.client-ip=198.47.23.248 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 lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40V0bF9O034651; Tue, 30 Jan 2024 18:37:15 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706661435; bh=QWigbctVlzjkxsBbZQ1Y47XS9owR9Y5JqOgjf+q4VGI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Kr591s/Y+VWQxGZjMzjiDsejRTtZiCsN9wHN/Sawlxg/NnFFu0Tvfrq0dShEUxZfq NpOIZAOtGwK9aL+PUZJyBypSS5SwxJuXMMTJVezt+12iWr5n3PU4AP3ZluVcXI9O8x Aq8iWnc0eQl/58P78xQ7FqyOxzB8qzHLJxSoULEg= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40V0bFe4030604 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Jan 2024 18:37:15 -0600 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 30 Jan 2024 18:37:15 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE108.ent.ti.com (157.170.170.38) 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, 30 Jan 2024 18:37:15 -0600 Received: from judy-hp.dhcp.ti.com (judy-hp.dhcp.ti.com [128.247.81.105]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40V0bEwB026520; Tue, 30 Jan 2024 18:37:15 -0600 From: Judith Mendez To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Adrian Hunter , , , Nishanth Menon , Vignesh Raghavendra , Andrew Davis , Udit Kumar , Roger Quadros , , Randolph Sapp Subject: [RFC PATCH 04/13] drivers: mmc: host: sdhci_am654: Add ITAPDLYSEL in sdhci_j721e_4bit_set_clock Date: Tue, 30 Jan 2024 18:37:05 -0600 Message-ID: <20240131003714.2779593-5-jm@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240131003714.2779593-1-jm@ti.com> References: <20240131003714.2779593-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. Signed-off-by: Judith Mendez --- drivers/mmc/host/sdhci_am654.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 35e02f4128a7..61f95aad3f80 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -321,6 +321,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,17 @@ static void sdhci_j721e_4bit_set_clock(struct sdhci_host *host, mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK; 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.34.1