From patchwork Fri Nov 27 14:52:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 1407269 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CjHhM1HF4z9s1l for ; Sat, 28 Nov 2020 01:54:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D26468271B; Fri, 27 Nov 2020 15:53:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D691F82721; Fri, 27 Nov 2020 15:53:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by phobos.denx.de (Postfix) with ESMTP id 9E62A826D0 for ; Fri, 27 Nov 2020 15:53:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=biju.das.jz@bp.renesas.com X-IronPort-AV: E=Sophos;i="5.78,374,1599490800"; d="scan'208";a="64118211" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 27 Nov 2020 23:53:11 +0900 Received: from localhost.localdomain (unknown [172.29.53.236]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 5688741A5E91; Fri, 27 Nov 2020 23:53:09 +0900 (JST) From: Biju Das To: Peng Fan , Marek Vasut Cc: Biju Das , u-boot@lists.denx.de, Jaehoon Chung , Nobuhiro Iwamatsu , Chris Paterson , Prabhakar Mahadev Lad Subject: [PATCH v7 3/4] mmc: renesas-sdhi: Add SDHI quirks for R-Car M3-N and RZ/G2N Date: Fri, 27 Nov 2020 14:52:59 +0000 Message-Id: <20201127145300.7359-4-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201127145300.7359-1-biju.das.jz@bp.renesas.com> References: <20201127145300.7359-1-biju.das.jz@bp.renesas.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add SDHI quirks for R-Car M3-N and RZ/G2N SoC. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Reviewed-by: Jaehoon chung --- v7: * No Change. v6: * New patch. quirks using soc_device_match. --- drivers/mmc/renesas-sdhi.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index 7e3ea92cbf..b84cfaa9a3 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -890,6 +890,11 @@ static const struct renesas_sdhi_quirks sdhi_quirks_r8a7796_es13 = { .hs400_calib_table = r8a7796_rev3_calib_table, }; +static const struct renesas_sdhi_quirks sdhi_quirks_r8a77965 = { + .hs400_bad_taps = BIT(2) | BIT(3) | BIT(6) | BIT(7), + .hs400_calib_table = r8a77965_calib_table, +}; + /* * Note for r8a7796 / r8a774a1: we can't distinguish ES1.1 and 1.2 as of now. * So, we want to treat them equally and only have a match for ES1.2 to enforce @@ -912,6 +917,9 @@ static const struct soc_attr sdhi_quirks_match[] = { .revision = "ES1.3", .data = &sdhi_quirks_r8a7796_es13 }, + { .soc_id = "r8a774b1", + .data = &sdhi_quirks_r8a77965 + }, { .soc_id = "r8a7796", .revision = "ES1.0", .data = &sdhi_quirks_4tap_nohs400_b17_dtrend @@ -928,6 +936,9 @@ static const struct soc_attr sdhi_quirks_match[] = { .revision = "ES1.3", .data = &sdhi_quirks_r8a7796_es13 }, + { .soc_id = "r8a77965", + .data = &sdhi_quirks_r8a77965 + }, { /* Sentinel. */ }, }; @@ -957,7 +968,8 @@ static void renesas_sdhi_add_quirks(struct tmio_sd_plat *plat, priv->adjust_hs400_enable = true; priv->adjust_hs400_calib_table = quirks->hs400_calib_table[!rmobile_is_gen3_mmc0(priv)]; - if (quirks == &sdhi_quirks_r8a7796_es12) + if (quirks == &sdhi_quirks_r8a7796_es12 || + quirks == &sdhi_quirks_r8a77965) priv->adjust_hs400_offset = 3; else if (quirks == &sdhi_quirks_r8a7796_es13) priv->adjust_hs400_offset = 0;