From patchwork Tue Apr 23 09:02:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 162665 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3540830jan; Tue, 23 Apr 2019 02:02:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqza49Nz319FCKDSjYKDy6SyW+kwz9jV4IiISR4KKvgT05NKfNZYA3rB6tQX6Pc5xUEIJbBk X-Received: by 2002:a65:5941:: with SMTP id g1mr23719230pgu.51.1556010167521; Tue, 23 Apr 2019 02:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556010167; cv=none; d=google.com; s=arc-20160816; b=UwOHgOY4eKTZhaUNIwY8iGP76ZEpmGcQiQpk7kKGjLvMCTmeWiYPSoCt8X/8SxJG5o nZvtnlke3MuRJ34F2pjE4ndJnBegZIfiam43wyDV8/YCBNVOnLTX09dVegfDf9187wso lcfr5FUzkNJVzdVgBolm1pXDqt/09O9Ot7ZsS09ERm0Oo6lsuE8uuxg0V1ORxMozdUDW 4XAfnDbFwr0c6R8uNFfJFQUUzg8k4l8oESzeSYbZujptiDznUBd0sK8MrMm6iIFJEZuA aDX4f93kTgzIDhLBiW0UsQFUlwx8EYoCUJwpK+5e1v+nm6rJcJGlFM8aHJBuI1Dy06XD j78A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wyL5ADK3nwxHUDhFNjCi37nI3TDxQUy8c72Bnz6n+18=; b=iCtoJcQIMZK5VQN5K92VSkSlu9FnmkclVeDNUGWnSqh/KIh02K9hkldU7V26iRiMda 9i1N7h6jk8/0pnA285uOeAJkxgFlczPOSVWLvBfzEytz5q+Dcjak3LfsKLy8OX8+fAio qoe57/uO18DmUO+LUsJrTD40yfOi86bynmVfz3unYUm/B7oa6aK35nKn93ZyyJiCscX1 IolXuqknmFstuH2U3n3JH5xrU160Q25h6WJ5sK7eXr7bj4aJp6NYIYUYpEiCvmuFK0Ko 7mFQJM0P50XUd/hqcxgHzGziuoxM297dGgUkn41y5UCOYSLPlXYIY9gfKwCJ59YTu4Uv PWpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=w2KEZVK+; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si4720486pln.91.2019.04.23.02.02.47; Tue, 23 Apr 2019 02:02:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=w2KEZVK+; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbfDWJCq (ORCPT + 5 others); Tue, 23 Apr 2019 05:02:46 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50506 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbfDWJCq (ORCPT ); Tue, 23 Apr 2019 05:02:46 -0400 Received: by mail-wm1-f66.google.com with SMTP id 10so1218480wmk.0 for ; Tue, 23 Apr 2019 02:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wyL5ADK3nwxHUDhFNjCi37nI3TDxQUy8c72Bnz6n+18=; b=w2KEZVK+BwdjPFCdgjID66L2FGqc2zRlZxbbfLTRwYH84oFyER2j8p1qEdsnV/7gNY Wz9HkOorsiTL7+3/rlUBp0rXnNzeU93Y6gDIkKeXIoPjAB6wqwiY1AemP0u+myYSRAu7 YDRbQdykDawAHuJ9i5pvkN5l9Yv5Ul2nQFDLfn7j6FuQhrNgykwHKpWAw4dOxnGhUhxR 33z3DGvp52l3QG1UABb/mk+auSj5kqGqsXwZ5yLtT6+WEFmZVAi3EnAPHDR0EVgiB1pW GpZNwS1ryg8x/EHFkzdxGidIfCWoW02Y2b+dRSSVpGz63auqJq0geYcqDOLT049czoKz /YKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wyL5ADK3nwxHUDhFNjCi37nI3TDxQUy8c72Bnz6n+18=; b=LLHW1tAcnqVp0P6mVgwx7pEjl/UHJgpszdMnKnR9TDQAOQ+cfxTmiCZ6NHc7B6W3H6 CNLeM8Hs/Z/zQ386H1saAbtq7xsIv1tbjRhi/esoVQ95NjIpsokXdVczF+OiSlHPsdYd br05uCiNf40pd/6PxBLTtEUKsYS66dgdlUpUt03+6IAuT9k6iR7U8rRlRomEkhVlLRu5 qhlSCs5PsPLHMhCV5LvIHqizXVI1ffcCA0IOLXx8Zglt9Cp0ERmT4/sV7SNmFDf8yJkX I0cg/v9wYkZXBK5IqU62v6BUvrAaGTr42cB35vtUUrwtwGq4kVil9syD+UDFtRyoccxM +ggg== X-Gm-Message-State: APjAAAVCahgEhN6IY7uMrqvY83idn9WkQNeKG4miHFp2uKTb2Pi9h8hf f4iCn81AuJkyQLjWhi5J3qlKmA== X-Received: by 2002:a05:600c:211a:: with SMTP id u26mr1535558wml.74.1556010164784; Tue, 23 Apr 2019 02:02:44 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id z23sm12361894wma.0.2019.04.23.02.02.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Apr 2019 02:02:43 -0700 (PDT) From: Jerome Brunet To: Ulf Hansson , Kevin Hilman Cc: Jerome Brunet , linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/7] mmc: meson-gx: clean up and tuning update Date: Tue, 23 Apr 2019 11:02:28 +0200 Message-Id: <20190423090235.17244-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The purpose of this series is too improve reliability of the amlogic mmc driver on new (g12a) and old ones (axg, gxl, gxbb, etc...) * The 3 first patches are just harmless clean ups. * Patch 4 makes sure HS400 can't be enabled, we still have not been able to crack this modes. * Patch 5 removes some clock glitches when switching to DDR modes * Patch 6 and 7 changes the tuning method from Rx phase to signal resampling. It could have been done in a single patch but the unified diff was extremely ugly. The change has been split in two patches to ease review. The last tuning update that went through was meant to improve the axg support. Since then, it was reported to break some other boards, like the s912 vim2. Also with the current tuning method, it was impossible to find phase settings which would work on all the SoCs, including the new ones. After redoing all the tests from scratch, it appeared that Rx phase made (strangely) almost no difference, especially on g12a and axg. However, it showed that it is important to have a phase shift between the Core and Tx clock, 180 works best. I discussed the test results with Amlogic. They suggested to use 180/0 or 0/180 for the Core and Tx phase. For tuning, they suggested to use signal resampling. So far, so good ... here the platform and modes tested: NanoPi-K2 (S905): SD UHS SDR50/DDR50, SDIO HS Odroid-C2 (S905): SD UHS SDR50/DDR50, eMMC DDR52/HS200 (16GB module) Khadas Vim (S905X): SD HS, SDIO HS, eMMC HS200 Libretech CC (S905X): SD HS, eMMC HS200 Khadas Vim2 (S912): SD HS, SDIO HS, eMMC HS200 S400 (A113D): SDIO UHS SDR104, eMMC DDR52/HS200 U200 (S905D2): SD HS, eMMC DDR52/HS200 SEI510 (S905X2): SD HS, eMMC DDR52/HS200 Changes since v1 [0]: * Add missing writel in patch 5 (error when switching width) * Change patch 3 commit description [0]: https://lkml.kernel.org/r/20190417204355.469-1-jbrunet@baylibre.com Jerome Brunet (7): mmc: meson-gx: remove open coded read with timeout mmc: meson-gx: ack only raised irq mmc: meson-gx: correct irq flag mmc: meson-gx: disable HS400 mmc: meson-gx: avoid clock glitch when switching to DDR modes mmc: meson-gx: remove Rx phase tuning mmc: meson-gx: add signal resampling tuning drivers/mmc/host/meson-gx-mmc.c | 419 +++++++++----------------------- 1 file changed, 114 insertions(+), 305 deletions(-) -- 2.20.1 Acked-by: Martin Blumenstingl Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Reviewed-by: Kevin Hilman