From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA728C433ED for ; Tue, 11 May 2021 11:54:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F4BA61007 for ; Tue, 11 May 2021 11:54:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231312AbhEKL4C (ORCPT ); Tue, 11 May 2021 07:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230519AbhEKL4C (ORCPT ); Tue, 11 May 2021 07:56:02 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74815C061574 for ; Tue, 11 May 2021 04:54:55 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgQyM-0006g1-F2; Tue, 11 May 2021 13:54:46 +0200 Message-ID: <0aa51fabade743fbaac70a149a771f37e7d05165.camel@pengutronix.de> Subject: Re: [PATCH v2 3/3] mmc: core: add support for disabling HS400 mode via DT From: Lucas Stach To: Ulf Hansson , Chris Ruehl Cc: Adrian Hunter , Haibo Chen , Rob Herring , NXP Linux Team , Sascha Hauer , linux-mmc , DTML , Linux ARM Date: Tue, 11 May 2021 13:54:33 +0200 In-Reply-To: References: <20210510190400.105162-1-l.stach@pengutronix.de> <20210510190400.105162-3-l.stach@pengutronix.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.1 (3.40.1-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Ulf, Am Dienstag, dem 11.05.2021 um 13:14 +0200 schrieb Ulf Hansson: > + Chris Ruehl > > On Mon, 10 May 2021 at 21:04, Lucas Stach wrote: > > > > From: Lucas Stach > > > > On some boards the data strobe line isn't wired up, rendering HS400 > > support broken, even if both the controller and the eMMC claim to > > support it. Allow to disable HS400 mode via DT. > > Before I review the series, I just wanted to highlight that quite > recently we got a related series posted from Chris [1]. I made some > comments, but he hasn't replied yet. > > In any case, if I understood it correctly, it looks like some > controllers may support HS400 ES, but not HS200. Could that be the > case here as well? Or is this a different problem? > > That's not the issue I'm trying to solve here. HS400 modes, whether ES nor not, require the data strobe line to work. ES mode just defines how this line is used. I know for a fact that the board I'm dealing with here, just hasn't wired up this line between the SoC and the eMMC. Thus HS400 modes fail to work, even though both controller and eMMC support this mode. When HS400 is disabled, like in this series, communication falls back to HS200 mode and works fine this way. Regards, Lucas > Kind regards > Uffe > > [1] > https://patchwork.kernel.org/project/linux-mmc/patch/20201208061839.21163-7-chris.ruehl@gtsys.com.hk/ > > > > > Signed-off-by: Lucas Stach > > --- > > v2: > > - move to core > > - actually disable all HS400 modes > > --- > > drivers/mmc/core/host.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c > > index 9b89a91b6b47..0e066c5f5243 100644 > > --- a/drivers/mmc/core/host.c > > +++ b/drivers/mmc/core/host.c > > @@ -351,6 +351,9 @@ int mmc_of_parse(struct mmc_host *host) > > host->caps2 |= MMC_CAP2_NO_SD; > > if (device_property_read_bool(dev, "no-mmc")) > > host->caps2 |= MMC_CAP2_NO_MMC; > > + if (device_property_read_bool(dev, "no-mmc-hs400")) > > + host->caps2 &= ~(MMC_CAP2_HS400_1_8V | MMC_CAP2_HS400_1_2V | > > + MMC_CAP2_HS400_ES); > > > > /* Must be after "non-removable" check */ > > if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) { > > -- > > 2.31.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0139BC43460 for ; Tue, 11 May 2021 13:16:32 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5014C616EB for ; Tue, 11 May 2021 13:16:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5014C616EB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Date:Cc:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hslIkb1VQpo22fMMfjQ1ZjABs1UVyBbiQWP5OvMl4ZM=; b=eyVgbiEz2InqbHzGB4J/5QnZb J0qZU+N4gyAWzNvJ1Hv2G2d5aU94Xur4RPDY6DUUXFdDtCqoVtux3U6P8ZmlZM0QeudlxoKn0E+E9 G/se+WBQQhP/7Fiwwqel/bjrvMXUCXBFdLdu1aZRODEVcKN/Ae6+8IBwcnP6lz40vyenj38dk2/gE WXHxaa10ZdCwzW+41MfjIyKpBXNBCfxIXi7sDZ+l26rZifqA8ujoYBZoyczT51EwZZpxtCL/yuaAp mO8cUq1bpgbvpfaIh+M2lkDDrzOaDZN29fA1VMce5k14zE8y5EiWUp8sypSM9YbwMVrCQa2/BHBZ0 MUcBh39fQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgSDx-0001UJ-Ka; Tue, 11 May 2021 13:14:57 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgQyY-00HEtH-QL for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 11:55:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=srL1LvWjsEejhDaNSn+3RqIr0tdqzgKvJwkfNrZ3UOE=; b=ZphkRpInPD9J3U4Q9njBMzwE62 oyn8RWs8pXmOvN1fNlmAMVIlTgSV6gCcjbkhFwXxLJpZd7DDJhcP6+NHvfvceqJd3TQ12xxBykfyw dJemS1fSp1UgJN0qPMcLW6I4zygFnHpMzvllTgslB8m8FjXoVHBX2TmkyHGngKlmFWP58qEqMvFpq kdSwcFrl0Z9jU9fy0hTfTyAc96/S7HBwhSiqYOmKUd9JwdGCjWhTUxr+iQNjX/uBprkMxBVBBjv9y 4LjpcIn4UmZGMUYLsWbyndvAH0VSD7Nn1itK60uqcnZvV9f1oAFZa06bqfPdEaeRWMy5tKJv0KXC/ vuQBJU9Q==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgQyW-009XWp-4S for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 11:54:57 +0000 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgQyM-0006g1-F2; Tue, 11 May 2021 13:54:46 +0200 Message-ID: <0aa51fabade743fbaac70a149a771f37e7d05165.camel@pengutronix.de> Subject: Re: [PATCH v2 3/3] mmc: core: add support for disabling HS400 mode via DT From: Lucas Stach To: Ulf Hansson , Chris Ruehl Cc: Adrian Hunter , Haibo Chen , Rob Herring , NXP Linux Team , Sascha Hauer , linux-mmc , DTML , Linux ARM Date: Tue, 11 May 2021 13:54:33 +0200 In-Reply-To: References: <20210510190400.105162-1-l.stach@pengutronix.de> <20210510190400.105162-3-l.stach@pengutronix.de> User-Agent: Evolution 3.40.1 (3.40.1-1.fc34) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_045456_205254_0437D1C3 X-CRM114-Status: GOOD ( 27.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Ulf, Am Dienstag, dem 11.05.2021 um 13:14 +0200 schrieb Ulf Hansson: > + Chris Ruehl > > On Mon, 10 May 2021 at 21:04, Lucas Stach wrote: > > > > From: Lucas Stach > > > > On some boards the data strobe line isn't wired up, rendering HS400 > > support broken, even if both the controller and the eMMC claim to > > support it. Allow to disable HS400 mode via DT. > > Before I review the series, I just wanted to highlight that quite > recently we got a related series posted from Chris [1]. I made some > comments, but he hasn't replied yet. > > In any case, if I understood it correctly, it looks like some > controllers may support HS400 ES, but not HS200. Could that be the > case here as well? Or is this a different problem? > > That's not the issue I'm trying to solve here. HS400 modes, whether ES nor not, require the data strobe line to work. ES mode just defines how this line is used. I know for a fact that the board I'm dealing with here, just hasn't wired up this line between the SoC and the eMMC. Thus HS400 modes fail to work, even though both controller and eMMC support this mode. When HS400 is disabled, like in this series, communication falls back to HS200 mode and works fine this way. Regards, Lucas > Kind regards > Uffe > > [1] > https://patchwork.kernel.org/project/linux-mmc/patch/20201208061839.21163-7-chris.ruehl@gtsys.com.hk/ > > > > > Signed-off-by: Lucas Stach > > --- > > v2: > > - move to core > > - actually disable all HS400 modes > > --- > > drivers/mmc/core/host.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c > > index 9b89a91b6b47..0e066c5f5243 100644 > > --- a/drivers/mmc/core/host.c > > +++ b/drivers/mmc/core/host.c > > @@ -351,6 +351,9 @@ int mmc_of_parse(struct mmc_host *host) > > host->caps2 |= MMC_CAP2_NO_SD; > > if (device_property_read_bool(dev, "no-mmc")) > > host->caps2 |= MMC_CAP2_NO_MMC; > > + if (device_property_read_bool(dev, "no-mmc-hs400")) > > + host->caps2 &= ~(MMC_CAP2_HS400_1_8V | MMC_CAP2_HS400_1_2V | > > + MMC_CAP2_HS400_ES); > > > > /* Must be after "non-removable" check */ > > if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) { > > -- > > 2.31.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel