From patchwork Thu Oct 8 08:59:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 1378451 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 4C6QC63pG4z9sSC for ; Thu, 8 Oct 2020 20:00:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5118682393; Thu, 8 Oct 2020 10:59:58 +0200 (CEST) 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 542BB82254; Thu, 8 Oct 2020 10:59:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by phobos.denx.de (Postfix) with ESMTP id B588A8219C for ; Thu, 8 Oct 2020 10:59:51 +0200 (CEST) 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.77,350,1596466800"; d="scan'208";a="59029572" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 08 Oct 2020 17:59:48 +0900 Received: from localhost.localdomain (unknown [172.29.51.154]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id AB55F4236A27; Thu, 8 Oct 2020 17:59:46 +0900 (JST) From: Biju Das To: Peng Fan Cc: Biju Das , u-boot@lists.denx.de, Marek Vasut , Nobuhiro Iwamatsu , Chris Paterson , Prabhakar Mahadev Lad Subject: [PATCH v5 2/2] mmc: renesas-sdhi: Add R8A774A1 SDHI quirks Date: Thu, 8 Oct 2020 09:59:41 +0100 Message-Id: <20201008085941.3600-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201008085941.3600-1-biju.das.jz@bp.renesas.com> References: <20201008085941.3600-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 various SDHI quirks for R8A774A1 SoC. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar --- v5 : New Patch --- drivers/mmc/renesas-sdhi.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index d80b3fc28f..40e01ed890 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -870,7 +870,8 @@ static void renesas_sdhi_filter_caps(struct udevice *dev) /* HS400 is not supported on H3 ES1.x and M3W ES1.0, ES1.1 */ if (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7795) && (rmobile_get_cpu_rev_integer() <= 1)) || - ((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) && + (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) || + (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A774A1)) && (rmobile_get_cpu_rev_integer() == 1) && (rmobile_get_cpu_rev_fraction() < 2))) plat->cfg.host_caps &= ~MMC_MODE_HS400; @@ -878,7 +879,8 @@ static void renesas_sdhi_filter_caps(struct udevice *dev) /* H3 ES2.0, ES3.0 and M3W ES1.2 and M3N bad taps */ if (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7795) && (rmobile_get_cpu_rev_integer() >= 2)) || - ((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) && + (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) || + (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A774A1)) && (rmobile_get_cpu_rev_integer() == 1) && (rmobile_get_cpu_rev_fraction() == 2)) || (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A77965)) @@ -894,7 +896,8 @@ static void renesas_sdhi_filter_caps(struct udevice *dev) } /* M3W ES1.2 can use HS400 with manual adjustment */ - if ((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) && + if (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) || + (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A774A1)) && (rmobile_get_cpu_rev_integer() == 1) && (rmobile_get_cpu_rev_fraction() == 2)) { priv->adjust_hs400_enable = true; @@ -904,7 +907,8 @@ static void renesas_sdhi_filter_caps(struct udevice *dev) } /* M3W ES1.x for x>2 can use HS400 with manual adjustment and taps */ - if ((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) && + if (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) || + (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A774A1)) && (rmobile_get_cpu_rev_integer() == 1) && (rmobile_get_cpu_rev_fraction() > 2)) { priv->adjust_hs400_enable = true; @@ -933,7 +937,8 @@ static void renesas_sdhi_filter_caps(struct udevice *dev) /* H3 ES1.x, ES2.0 and M3W ES1.0, ES1.1, ES1.2 uses 4 tuning taps */ if (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7795) && (rmobile_get_cpu_rev_integer() <= 2)) || - ((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) && + (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) || + (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A774A1)) && (rmobile_get_cpu_rev_integer() == 1) && (rmobile_get_cpu_rev_fraction() <= 2))) priv->nrtaps = 4; @@ -943,7 +948,8 @@ static void renesas_sdhi_filter_caps(struct udevice *dev) /* H3 ES1.x and M3W ES1.0 uses bit 17 for DTRAEND */ if (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7795) && (rmobile_get_cpu_rev_integer() <= 1)) || - ((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) && + (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) || + (rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A774A1)) && (rmobile_get_cpu_rev_integer() == 1) && (rmobile_get_cpu_rev_fraction() == 0))) priv->read_poll_flag = TMIO_SD_DMA_INFO1_END_RD;