Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1934681pxu; Fri, 9 Oct 2020 03:48:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU37uizQr5AvSooB1RzRvtUUGfi1m3cX+hjyuRf10qrCpioNR302UdYkJAhv/cs7KYZB5m X-Received: by 2002:a05:6402:2076:: with SMTP id bd22mr14217535edb.197.1602240497742; Fri, 09 Oct 2020 03:48:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602240497; cv=none; d=google.com; s=arc-20160816; b=dfYg7OmZKwlLaY6dNqwJk64hNjha11VGx/+qI2KubrMjr0rBBqtIEuvnyC0ziSCfEs r3khtkAwvSSpCV/LxBo/ruCPFyyL83tWgKF4xTwt3SrDGKiD4+MvZ9b0xDMLvD1TGvVV i5z18YgEp9ZS4UgmpXpFcBp91ef8AHpkiBWG2N0gOOajjIx+sBCf9G7ZOqQysn95OtmN WMSTyfYnVYW5ALha4Ykpz6cGRxwmaflTo7mfUA0cor29GVTm2D7pg7IZAbJaD9t3hj6T DVWxnnLMd9BV7n6r8lAKW76HWCpZ8FO/lqcKlpk8jTj7WA0OUHKTMBPevPPVUUmoBTfP EoKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=DeUuxzkGc/PDj/8FcISImg2Zcr8Rv/oPyJJNhor4yTE=; b=Hu6M1CsWXGhh4f1Kw325MFZtVAolS3Ab37i1KRKpoPwR9tgGUpMw9WLcZAtRIi8r0L TMwlWXWXpWs+0KAJ2nD/nKeDmGvA/T5HEalGQ0wfi3bpUXdpyIU5GZUu4bKtwAd0Lk7w cMswEozHLC4f1LDzqQc4dGO89pN4v3TDYMR1BqELxO1xh/atEX4Je1NJ+Bx9M+gzsd7F EvSRMtyLk3vk2Aa9ZSZw9M17WZwqJGNaeNhKcd0x+Y9ntKF4LEgtz1j8jlDFTzNFZQnT Hjw5aE5bFVKMfpO3sVutjra8t34N9kxg7x4dwC4JfpzxXn4f1i7OCxOG4c5SLxn9Cb84 2FXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=io9PCzXK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=pX8GdSEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gv14si5588866ejb.400.2020.10.09.03.47.54; Fri, 09 Oct 2020 03:48:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=io9PCzXK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=pX8GdSEp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732149AbgJIHg5 (ORCPT + 99 others); Fri, 9 Oct 2020 03:36:57 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45153 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731328AbgJIHg5 (ORCPT ); Fri, 9 Oct 2020 03:36:57 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5FB2F5C00F9; Fri, 9 Oct 2020 03:36:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 09 Oct 2020 03:36:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=DeUuxzkGc/PDj/8FcISImg2Zcr8 Rv/oPyJJNhor4yTE=; b=io9PCzXK2CVWFa7sdYVq7bB+4BEhyG/VbPai4R+XHho /jlCWAG6JaZkYcj6lzdFNugxTdY9S3sZiuXvxNotc9fQr4UKaz9BPDNXAh82Xq6D jW+vf5R1OV9LsbEQwIK9eCmxXBoaxlm8Rmp8CpTd/oBpdfEcTLz6846ZIua5mQD0 uYgpofnlu8nTdQ75/p9zhaqjGvLDCqyjxIz/IluSt4dfaf7uq2Y5xUqnKq/60VQF unXAZqJe2GQZBQdlJo3h1bA0Zi7bOwIbm2NTe5kjZh0KkbD8+/4OvIBBfWYB5uls 8YPMdc4bbnnpb/nwHvgh25ljqnWmqMqZM38jIJroY/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=DeUuxz kGc/PDj/8FcISImg2Zcr8Rv/oPyJJNhor4yTE=; b=pX8GdSEpaNDx2S5DLroMLN ppQP57mCcOxN0G6j9+h7Z21kR9R8qjvHsol5pcc6mwZbR74XjQ0/a3f7pg23/VSz LxcMRfMaDOsKgFiPHKo/Lm2x87tqcF/SS3cO5HXYIYQH+m/mPZvwls4AblFXZkVa CZMflrvQRIbHhHuOgt/Wh94Ftqvt+l0dmhM/UuCiRsFM7LRL/ygWf9HSlerA4Zm6 fj0XeX7Gq49oZnZeEBpHSCii4NHQeJL5Vh6mGJPL2fxph9L1yjU9Q4kt/Nn+lesA g1Bvb9xyQe+DEXVfs04aQzfsg9SpMUpEMQQ931+Vh31plf+yQHAEMv+FYRNy1dcg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrhedtgdduvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddunecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnheptefgjedtleegffffiedthfdtvdefieejffetleekhfelvdevgffgudejgeei gefhnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepledtrdekledrieekrd ejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehm rgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 686B6328005E; Fri, 9 Oct 2020 03:36:53 -0400 (EDT) Date: Fri, 9 Oct 2020 09:36:51 +0200 From: Maxime Ripard To: =?utf-8?B?Q2zDqW1lbnQgUMOpcm9u?= Cc: Rob Herring , Chen-Yu Tsai , devicetree , linux-arm-kernel , linux-kernel , linux-sunxi , Jernej Skrabec Subject: Re: [PATCH v2] arm64: dts: allwinner: h6: add eMMC voltage property for Beelink GS1 Message-ID: <20201009073651.izvvjpqiqiivhknl@gilmour.lan> References: <20201003092001.405238-1-peron.clem@gmail.com> <20201005092145.wdu4m4pwxydv76ou@gilmour.lan> <20201008151022.ryhijbj42y7kgzvb@gilmour.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cuc3il2vmfdnuxue" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cuc3il2vmfdnuxue Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 08, 2020 at 10:00:06PM +0200, Cl=E9ment P=E9ron wrote: > Hi Maxime, >=20 > Adding linux-sunxi and Jernej Skrabec to this discussion. >=20 > On Thu, 8 Oct 2020 at 17:10, Maxime Ripard wrote: > > > > Hi Cl=E9ment, > > > > On Mon, Oct 05, 2020 at 08:47:19PM +0200, Cl=E9ment P=E9ron wrote: > > > On Mon, 5 Oct 2020 at 11:21, Maxime Ripard wrote: > > > > > > > > Hi Cl=E9ment, > > > > > > > > On Sat, Oct 03, 2020 at 11:20:01AM +0200, Cl=E9ment P=E9ron wrote: > > > > > Sunxi MMC driver can't distinguish at runtime what's the I/O volt= age > > > > > for HS200 mode. > > > > > > > > Unfortunately, that's not true (or at least, that's not related to = your patch). > > > > > > > > > Add a property in the device-tree to notify MMC core about this > > > > > configuration. > > > > > > > > > > Fixes: 089bee8dd119 ("arm64: dts: allwinner: h6: Introduce Beelin= k GS1 board") > > > > > Signed-off-by: Cl=E9ment P=E9ron > > > > > --- > > > > > arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.= dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts > > > > > index 049c21718846..3f20d2c9bbbb 100644 > > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts > > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts > > > > > @@ -145,6 +145,7 @@ &mmc2 { > > > > > vqmmc-supply =3D <®_bldo2>; > > > > > non-removable; > > > > > cap-mmc-hw-reset; > > > > > + mmc-hs200-1_8v; > > > > > bus-width =3D <8>; > > > > > status =3D "okay"; > > > > > }; > > > > > > > > I'm not really sure what you're trying to fix here, but as far as M= MC > > > > goes, eMMC's can support io voltage of 3.3, 1.8 and 1.2V. Modes up = until > > > > HS DDR (50MHz in DDR) will use an IO voltage of 3.3V, higher speed = modes > > > > (HS200 and HS400) supporting 1.8V and 1.2V. > > > > > > Some users report that the eMMC is not working properly on their > > > Beelink GS1 boards. > > > > > > > The mmc-hs200-1_8v property states that the MMC controller supports= the > > > > HS200 mode at 1.8V. Now, I can only assume that since BLDO2 is set = up at > > > > 1.8V then otherwise, the MMC core will rightfully decide to use the > > > > highest supported mode. In this case, since the driver sets it, it = would > > > > be HS-DDR at 3.3V, which won't work with that fixed regulator. > > > > > > > > I can only assume that enabling HS200 at 1.8V only fixes the issue = you > > > > have because otherwise it would use HS-DDR at 3.3V, ie not actually > > > > fixing the issue but sweeping it under the rug. > > > > > > > > Trying to add mmc-ddr-1_8v would be a good idea > > > > > > Thanks for the explanation, this is indeed the correct one. > > > So It looks like the SDIO controller has an issue on some boards when > > > using HS-DDR mode. > > > > > > Is this patch acceptable with the proper commit log? > > > > If HS-DDR works, yes, but I assume it doesn't? >=20 > After discussing with Jernej about this issue, I understood that: > - Automatic delay calibration is not implemented > - We also miss some handling of DDR related bits in control register >=20 > So none of H5/H6 boards should actually work. > (Some 'lucky' boards seem to work enough to switch to HS200 mode...) >=20 > To "fix" this the H5 disable the HS-DDR mode in sunxi mmc driver : > https://github.com/torvalds/linux/blob/master/drivers/mmc/host/sunxi-mmc.= c#L1409 I find it suspicious that some boards would have traces not good enough for HS-DDR (50MHz in DDR) but would work fine in HS200 (200MHz in SDR). If there's some mismatch on the traces, it will only be worse in HS200. And for the delay calibration, iirc, that's only necessary for HS400 that we don't support? > I'm not sure about A64 but it looks like the property "mmc-hs200-1_8v" > for the PineBook shows the same issue. >=20 > The proper way would of course be to implement the missing feature > mentioned above. > But this could take some time and as the eMMC driver is actually > broken wouldn't it be better to disable the HS-DDR for H6 in the mmc > driver like it's done for H5 ? Have you tested with only the mmc-ddr-1_8v property? Maxime --cuc3il2vmfdnuxue Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX4ATEwAKCRDj7w1vZxhR xTVaAQCIC4GxG0AMpq4aBg6dskIOx+bHvQ1lIysXG++6SLpYiQEA8QTiPrmBS0bg fAqGPBKbgt3exqy0mc6357vdFILjggE= =kH8r -----END PGP SIGNATURE----- --cuc3il2vmfdnuxue--